Picat 1.0 - Is Logic Programming Making A Comeback?
Written by Lucy Black   
Tuesday, 07 April 2015

Picat is a newish language that has just reached a version 1.0 release. It has some interesting features, but the fact that it supports logic programming is the most important.


picaticon

 

Logic programming is best known as the basis of the Prolog programming language. Prolog was invented in the early 1970s but didn't really make much impression until the 1980s. At the time programming was making slow progress from random spaghetti code, through the early days of structured modular programing and into the waiting arms of object-oriented programming. These were primitive times and logic programming seemed like a technology from outer space. It was arguably the last of the big programming paradigms to be invented although you can also argue that Prolog just clarified the ideas that were already around.

Logic programming never created the revolution that people predicted for it and slowly the wider interest died away, leaving enthusiasts and niche applications to carry the torch. Even today an encounter with Prolog can be a huge shock to programmers who think that functional or object-oriented are the only two approaches possible. 

Picat is an open source language that bundles logic programming with approaches that fit in with it or that extend it - functional programming, dynamic programming and constraint programming. What is special about the approach is that, unlike other approaches to programming, you can write down a set of conditions and the language will automatically find values that satisfy them. You can use this approach to write programs to solve scheduling problems, logical problems, route planning problems and so on. Basically you write down the static description of the problem and the language system finds solutions. 

 

picatbanner

 

What really suprises people when they first encounter logic programming is that it seems clever and powerful, but not very general purpose. However, it is - both Prolog and Picat are Turing complete, which means you can write any program that can be written using them. Of course, you don't get the advantages of the problem solving unless the program actually makes use of them, but Picat is a general purpose language.

If you would like to see the sort of thing that Picat is being used for then checkout the Picat page.

Another interesting illustration of how useful the language is can be found in a recent paper describing how to solve Google Code Jam problems using Picat. It makes you think that choosing to use Picat in this year's Code Jam might be such a big advantages that it would have to be banned. What more recommendation does a new language need! 

Oh, and did I point out that its name is Pi and Cat? Both revered mathematical objects.

picaticon

Banner


VLOGGER - AI Does Talking Heads
24/03/2024

Developed by Google researchers VLOGGER AI is a system that can create realistic videos of people talking and moving from a single still image and an audio clip as input. 



Is PHP in Trouble?
10/04/2024

The April 2024 headline for the TIOBE Index, which ranks programming languages in terms of their popularity, reads, "Is PHP losing its mojo" asking this question because this month PHP has dropped out [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Tuesday, 07 April 2015 )