Compiling Constraints in clp(FD)

We present the clp(FD) system: a Constraint Logic Programming language with finite domain constraints. We detail its implementation and present an abstract instruction set for the constraint solver that can be smoothly integrated into the WAM architecture. It is based on the use of a single primitive constraint X in r that embeds the core propagation mechanism. Complex user constraints such as linear equations or inequations are compiled into X in r expressions that encode the propagation scheme chosen to solve the constraint. The uniform treatment of a single primitive constraint leads to a better understanding of the overall constraint solving process and allows three main general optimizations that encompass many previous particular optimizations of “black-box” finite domain solvers. Implementation results show that this approach combines both simplicity and eciency. Our clp(FD) system is about four times faster than CHIP on average, with peak speedup reaching eight. We also show that, following the “glass-box” approach, clp(FD) can be naturally enhanced with various new constraints such as constructive disjunction, boolean constraints, non-linear constraints and symbolic constraints.

[1]  Vijay A. Saraswat The category of constraint systems is Cartesian-closed , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[2]  Philippe Codognet,et al.  A Minimal Extension of the WAM for clp(FD) , 1993, ICLP.

[3]  Frédéric Benhamou,et al.  Programming in CLP(BNR) , 1993, PPCP.

[4]  Helmut Simonis,et al.  Propositional Calculus Problems in CHIP , 1993, WCLP.

[5]  Antoine Rauzy Using Enumerative Methods for Boolean Unification , 1991, WCLP.

[6]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[7]  Philippe Kerlirzin,et al.  Using clp(FD) to Support Air Traffic Flow Management , 1994 .

[8]  Alan K. Mackworth Consistency in Networks of Relations , 1977, Artif. Intell..

[9]  Jean-Luc Massat Using Local Consistency Techniques to Solve Boolean Constraints , 1991, WCLP.

[10]  Pascal Van Hentenryck Constraint satisfaction in logic programming , 1989, Logic programming.

[11]  Laurent Oxusoff,et al.  L'évaluation sémantique en calcul propositionnel , 1989 .

[12]  Pascal Van Hentenryck,et al.  A Generic Arc-Consistency Algorithm and its Specializations , 1992, Artif. Intell..

[13]  Pascal Van Hentenryck,et al.  The Cardinality Operator: A New Logical Connective for Constraint Logic Programming , 1990, WCLP.

[14]  Randal E. Bryant,et al.  Graph-Based Algorithms for Boolean Function Manipulation , 1986, IEEE Transactions on Computers.

[15]  Wolfram Büttner,et al.  Embedding Boolean Expressions into Logic Programming , 1987, J. Symb. Comput..

[16]  Roland H. C. Yap,et al.  A methodology for managing hard constraints in CLP systems , 1991, PLDI '91.

[17]  Seif Haridi,et al.  Kernel Andorra Prolog and its Computation Model , 1990, ICLP.

[18]  Nicolas Beldiceanu,et al.  Constraint Logic Programming , 2010, 25 Years GULP.

[19]  Alain Colmerauer,et al.  An introduction to Prolog III , 1989, CACM.

[20]  Pascal Van Hentenryck,et al.  Constraint processing in cc(fd) , 1992 .

[21]  Philippe Codognet,et al.  A Metalevel Compiler of CLP(FD) and Its Combination with Intelligent Backtracking , 1993, WCLP.

[22]  Mats Carlsson,et al.  Entailment of Finite Domain Constraints , 1994, ICLP.

[23]  Roland H. C. Yap,et al.  An abstract machine for CLP(R) , 1992, PLDI '92.

[24]  Alain Colmerauer,et al.  Constraint logic programming: selected research , 1993 .

[25]  Pascal Van Hentenryck,et al.  Solving the Car-Sequencing Problem in Constraint Logic Programming , 1988, ECAI.

[26]  Pascal Van Hentenryck,et al.  Solving Large Combinatorial Problems in Logic Programming , 1990, J. Log. Program..

[27]  Robert M. Haralick,et al.  Increasing Tree Search Efficiency for Constraint Satisfaction Problems , 1979, Artif. Intell..

[28]  Daniel Diaz,et al.  Etude de la compilation des langages logiques de programmation par contraintes sur les domaines finis : le système clp (FD) , 1995 .

[29]  Philippe Codognet,et al.  clp(B): Combining Simplicity and Efficiency in Boolean Constraint Solving , 1994, PLILP.

[30]  Dana S. Scott,et al.  Concurrent constraint programming languages , 1989 .

[31]  Nicolas Beldiceanu,et al.  Overview of the CHIP Compiler System , 1993, WCLP.

[32]  Giorgio Gallo,et al.  Algorithms for Testing the Satisfiability of Propositional Formulae , 1989, J. Log. Program..

[33]  Rong Yang,et al.  The Andorra-I Engine: A Parallel Implementation of the Basic Andorra Model , 1991, ICLP.

[34]  Alexander Bockmayr Logic Programming with Pseudo-Boolean Constraints , 1991, WCLP.

[35]  Philippe Codognet,et al.  Boolean Constraint Solving Using clp(FD) , 1993, ILPS.

[36]  Alan K. Mackworth Constraint Satisfaction , 1985 .

[37]  Jean Jourdan,et al.  The Versatility of Handling Disjunctions as Constraints , 1993, PLILP.

[38]  Hassan Aït-Kaci,et al.  Warren's Abstract Machine: A Tutorial Reconstruction , 1991 .

[39]  Hassan Aït-Kaci Warren's Abstract Machine , 1991, ICLP.

[40]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[41]  Philippe Codognet,et al.  A Prototype Compiler for Prolog with Boolean Constraints , 1993, GULP.

[42]  Pierre Deransart,et al.  Programming Languages Implementation and Logic Programming , 1989, Lecture Notes in Computer Science.

[43]  Pascal Van Hentenryck,et al.  Design, Implementation, and Evaluation of the Constraint Language cc(FD) , 1994, Constraint Programming.

[44]  Philippe Codognet,et al.  WAMCC: Compiling Prolog to C , 1995, ICLP.

[45]  Tobias Nipkow,et al.  Boolean Unification - The Story So Far , 1989, J. Symb. Comput..

[46]  Pascal Van Hentenryck,et al.  Constraint Satisfaction Using Constraint Logic Programming , 1992, Artif. Intell..