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


Ai-Da's Portrait of Alan Turing At Auction
01/11/2024

Sotheby's Digital Art Day Action, now underway, features a large-scale portrait of  Alan Turing created by Ai-Da, the humanoid robot artist whose work, including this canvas, was exhibited at the [ ... ]



Apollo Adds REST APIs For GraphQL
29/10/2024

Apollo has added a simpler way to integrate REST APIs into a federated GraphQL environment. Available now in public preview, can be used to map REST API endpoints to their GraphQL schema using a decla [ ... ]


More News

 

espbook

 

Comments




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

 

Last Updated ( Tuesday, 07 April 2015 )