We demonstrate how constraint programming can be achieved in Common LISP, and share our experience of the Common LISP Constraints Package, SCREAMER. We found the package to be a very useful basis for constraint programming in LISP, but were surprised to see that it provides very little support for combining constraints with many typical LISP data structures. We have addressed these shortcomings by providing an additional library of functions, called SCREAMER+. This extension develops the constraint handling package of SCREAMER in three major directions. Firstly, it provides facilities for expressing and manipulating constraints on LISP lists (including lists interpreted as sets). Secondly, it extends the capabilities for combining constraints with higher order1 functions in LISP (including logical predicates such as some, and every). Lastly, it includes functions for dealing with constraints on object-oriented representations in the form of CLOS objects.
[1]
Jr. Guy L. Steele,et al.
Common LISP: the language (2nd ed.)
,
1990
.
[2]
Pascal Van Hentenryck.
Constraint satisfaction in logic programming
,
1989,
Logic programming.
[3]
David A. McAllester,et al.
Screamer: A Portable Efficient Implementation of Nondeterministic Common LISP
,
1993
.
[4]
David A. McAllester,et al.
Nondeterministic Lisp as a Substrate for Constraint Logic Programming
,
1993,
AAAI.
[5]
Leon Sterling,et al.
The Art of Prolog - Advanced Programming Techniques
,
1986
.