By Roman Bartak (1) and Tom Schrijvers (2)
(1) Charles University in Prague
(2) University of Ghent.
Constraint Logic Programming (CLP) integrates constraint satisfaction techniques in logic programming (LP). Constraint reasoning was always a fundamental part of LP in the form of unification. Equality over the Herbrand Universe is LP’s designated constraint relation, implemented by unification. Adding support for additional constraint relations and variables over other domains was a natural step that led to the development of constraint logic programming. In some sense, constraint logic programming started the era of constraint programming where constraint satisfaction is integrated in various programming platforms. The reader interested in knowing how it all started is referred to article “Constraint Logic Programming: a Personal Perspective” by Pascal Van Hentenryck published in ALP Newsletter Vol. 20 no. 1, February/March 2007.
Nowadays, CLP still has several significant advantages over other constraint-based programming systems. Firstly, the tight integration of constraints into logic programming makes using them very natural. Secondly, depth-first search as a common solving paradigm for both logic programming and constraint solving makes writing custom search strategies in CLP easy. Last but not least, CLP goes beyond the classical constraint satisfaction problem by allowing interleaving of constraint modelling and constraint solving. The constraints can be incrementally added during search (and removed upon backtracking) so the constraint models can be built dynamically based on search decisions. This simplifies modelling and solving problems in areas such as planning where the variables in the solution are unknown in advance.
The current issue of the ALP Newsletter is devoted to the above described extension of logic programming – constraint logic programming. In particular, three articles present recent developments in logic programming systems supporting constraints. Mats Carlsson covers finite domain constraints in SICStus Prolog, Markus Triska addresses constraint logic programming in SWI-Prolog, and Neng-Fa Zhou et al. describe how BPSolver tackles the 3rd ASP Competition.