Tech Report CS-90-23

Operational Semantics of Constraint Logic Programming over Finite Domains

Pascal Van Hentenryck and Yves Deville

October 1990


Although constraint logic programming (CLP) theory [7] is an elegant generalization of LP theory, it has some difficulties in capturing some operational aspects of actual CLP languages. A difficulty comes from the intentional incompleteness of some constraint-solvers. Some constraints are simply delayed until they can be decided by the constraint-solver. Others are approximated, providing an active pruning of the search space without being actually decided by the constraint-solver.

This paper presents an extension of the {\em ask \& tell} framework in order to give a simple and precise operational semantics to (a class of) CLP languages with an incomplete constraint-solver. The basic idea is to identify a subset of the constraints (the basic constraints) for which there exists an efficient and complete constraint-solver. Non-basic constraints are handled through two new combinators, relaxed ask and relaxed tell, that are in fact relaxations of the standard ask and tell.

The extended framework is instantiated to CLP on finite domains, say CLP(F). Arc-consistency is shown to be an efficient and complete constraint-solver for basic constraints. We also present how non-basic constraints can be approximated in CLP(F). The resulting semantics precisely describes the operational semantics of the language, enables the programmer to reason easily about the correctness and efficiency of his programs, and clarifies the links of CLP(F) with the CLP and {\em ask \& tell} theories. It is believed that this approach can be used as well to endow other CLP languages such as BNR-Prolog, CLP($SIGMA ^ * $), and parts of Trilogy with a precise operational semantics.

(complete text in pdf)