Monadic constraint programming

A constraint programming system combines two essential components: a constraint solver and a search engine. The constraint solver reasons about satisfiability of conjunctions of constraints, and the search engine controls the search for solutions by iteratively exploring a disjunctive search tree defined by the constraint program. In this paper we give a monadic definition of constraint programming in which the solver is defined as a monad threaded through the monadic search tree. We are then able to define search and search strategies as first-class objects that can themselves be built or extended by composable search transformers. Search transformers give a powerful and unifying approach to viewing search in constraint programming, and the resulting constraint programming system is first class and extremely flexible.

[1]  Johan Jeuring,et al.  Polytypic Unification , 1998, J. Funct. Program..

[2]  Amr Sabry,et al.  Backtracking, interleaving, and terminating monad transformers: (functional pearl) , 2005, ICFP '05.

[3]  Jacob Brunekreef,et al.  Alma-O: an imperative language that supports declarative programming , 1997, TOPL.

[4]  François Laburthe,et al.  SALSA: A Language for Search Algorithms , 1998, Constraints.

[5]  Simon L. Peyton Jones,et al.  Type checking with open type functions , 2008, ICFP.

[6]  Bernd Brassel,et al.  On a Tighter Integration of Functional and Logic Programming , 2007, APLAS.

[7]  Jean-Pierre Jouannaud Proc. of a conference on Functional programming languages and computer architecture , 1985 .

[8]  Manuel V. Hermenegildo,et al.  A Syntactic Approach to Combining Functional Notation, Lazy Evaluation, and Higher-Order in LP Systems , 2006, FLOPS.

[9]  K. Barraclough Eclipse , 2006, BMJ : British Medical Journal.

[10]  Nicolas Beldiceanu,et al.  Constraint Logic Programming , 1997 .

[11]  Pascal Van Hentenryck,et al.  Nondeterministic Control for Hybrid Search , 2006, Constraints.

[12]  Gert Smolka,et al.  The Oz Programming Model , 1996, Computer Science Today.

[13]  Richard S. Bird Functional Pearl: A program to solve Sudoku , 2006, J. Funct. Program..

[14]  Pascal Van Hentenryck,et al.  Search and strategies in OPL , 2000, TOCL.

[15]  Koen Claessen,et al.  Typed Logical Variables in Haskell , 2001, ACM SIGPLAN Symposium/Workshop on Haskell.

[16]  Pascal Van Hentenryck,et al.  High-Level Nondeterministic Abstractions in , 2006, CP.

[17]  Christian Schulte Comparing Trailing and Copying for Constraint Programming , 1999, ICLP.

[18]  Philip Wadler,et al.  Packrat parsing:: simple, powerful, lazy, linear time, functional pearl , 2002, ICFP '02.

[19]  William R. Cook,et al.  A denotational semantics of inheritance , 1989 .

[20]  Zoltan Somogyi,et al.  The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language , 1996, J. Log. Program..

[21]  Thom W. Frühwirth,et al.  Theory and Practice of Constraint Handling Rules , 1998, J. Log. Program..

[22]  Peter J. Stuckey,et al.  Programming with Constraints: An Introduction , 1998 .

[23]  Gert Smolka Principles and Practice of Constraint Programming-CP97 , 1997, Lecture Notes in Computer Science.

[24]  Christian Schulte,et al.  Programming Constraint Inference Engines , 1997, CP.

[25]  Ralf Hinze,et al.  Prolog's Control Constructs in a Functional Setting - Axioms and Implementation , 2001, Int. J. Found. Comput. Sci..

[26]  Jean-Charles Régin,et al.  A Filtering Algorithm for Constraints of Difference in CSPs , 1994, AAAI.

[27]  Pascal Van Hentenryck The OPL optimization programming language , 1999 .