We propose an implementation of constraint solving over nite domains, as pioneered by CHIP, on top of any Prolog system that provides a delay mechanism and backtrackable assignment. The aim is to propose a simple, portable, easily-maintenable, but yet eecient package. The performances of our system are of the same order of magnitude than a "wired" implementation of nite domains such as CHIP, even on quite large programs. We have also designed some basic low-level (WAM) extension to Prolog's delay mechanism to make it more suited for handling constraint solving, such as priority queues for scheduling woken goals, that allow to preferentially treat cheap primitive constraints and investigate various constraint solving heuristics. Moreover, we propose an intelligent backtracking scheme for Finite Domain CLP Languages. Intelligent backtracking consists in determining, upon unsolvability of the constraint system, a pertinent choice-point which can "cure" the failure , and departs from the naive approach usually found in logic programming which always goes to the most recent choice-point, whether it is pertinent or not. As non-determinism is used in CLP to express disjunctive constraints (eg. disjunctive scheduling) or heuristic search techniques, our method can be used to improve the eeciency in such problems. We propose an implementation of this scheme by using the nite domains constraint solver on top of a Prolog compiler with intelligent backtracking. Interestingly, our framework also leads to a new (and eecient) execution model for Hierarchical Constraint Languages, and can be the basis for general incre-mental constraint solving.
[1]
Michael J. Maher,et al.
Constraint Hierarchies and Logic Programming
,
1989,
ICLP.
[2]
Philippe Codognet,et al.
Extending the WAM for Intelligent Backtracking
,
1991,
ICLP.
[3]
Gilberto Filé,et al.
Yet Another Intelligent Backtracking Method
,
1988,
ICLP/SLP.
[4]
Pascal Van Hentenryck,et al.
Solving Large Combinatorial Problems in Logic Programming
,
1990,
J. Log. Program..
[5]
Nicolas Beldiceanu,et al.
Time Stamps Techniques for the Trailed Data in Constraint Logic Programming Systems
,
1990,
SPLT.
[6]
Jon Doyle,et al.
A Truth Maintenance System
,
1979,
Artif. Intell..
[7]
Alain Colmerauer,et al.
Opening the Prolog III universe
,
1987
.
[8]
Luís Moniz Pereira,et al.
Deduction Revision by Intelligent Backtracking
,
1984,
Implementations of Prolog.
[9]
Dana S. Scott,et al.
Concurrent constraint programming languages
,
1989
.
[10]
Pascal Van Hentenryck.
Constraint satisfaction in logic programming
,
1989,
Logic programming.
[11]
Maurice Bruynooghe.
Intelligent backtracking for an interpreter of Horn clause logic programs
,
1978
.
[12]
Mats Carlsson,et al.
Freeze, Indexing, and Other Implementation Issues in the WAM
,
1987,
ICLP.
[13]
Robert M. Haralick,et al.
Increasing Tree Search Efficiency for Constraint Satisfaction Problems
,
1979,
Artif. Intell..