Chapter 12 - Constraint Logic Programming
Section snippets
Example 12.1.
For example, the cryptarithmetic problem where each letter represents a different digit, is naturally conceptually modeled by the following CLP program: (we will use the concrete syntax of ECLiPSe [20] throughout this chapter)
The first line initiates a rule to define a new predicate (or user-defined constraint) smm which has the variables of the problem as arguments. The remainder of the rule definessmm in terms of other constraints. The second line defines that each variable is
The Origins of CLP
The core ideas behind constraint logic programming were developed by three largely independent research teams: that of Colmeraur in Marseilles; that of Jaffar and Lassez in Melbourne (Australia) (then IBM T.J. Watson Research Center at Yorktown Heights); and the CHIP team led by Dincbas at the European Computer-Industry Research Center (ECRC) in Munich.
Constraint logic programming emerged as a generalization of logic programming. In the CLP view of logic programming, standard logic programming
Semantics of Constraint Logic Programs
CLP languages extend logic-based programming languages by allowing constraints with a pre-defined interpretation. The key insight of Jaffar and Lassez's CLP Scheme is that for these languages, the operational semantics, declarative semantics and the relationship between these can be parameterized by a choice of constraints, solver and an algebraic and logical semantics for the constraints. Our presentation of the main results follows:
We assume that the reader is familiar with the basics of
CLP for Conceptual Modeling
Constraint logic programs provide an ideal conceptual modeling language since they provide a very expressive subset of first-order logic including existential quantification, and implications defining new constraints in terms of conjunctions and disjunctions of other constraints. We first demonstrate how CLP can be used to model constraint satisfaction problems (CSP) and then discuss how CLP provides considerably more concise and powerful ways of modeling problems than does the standard CSP
CLP for Design Modeling
Constraint logic programming not only provides a conceptual modeling language but also a design modeling language since the primitive constraints expressed in the conceptual model can be directly executed using the underlying constraint solver(s).
Search in CLP
Search is an implicit part of constraint logic programming. Execution searches through the possible derivations in a depth-first left right manner. Because of this it is relatively straightforward to define specific search routines in constraint logic programs.
The aim of search is to overcome the incompleteness of the solver or its weakness in modeling the constraints required by the user (hence requiring multiple rules). In the first case the constraint programmer will add search predicates to
Research initiated in CLP, and covered in this volume
CLP provides a powerful and practical framework for thinking about constraint satisfaction and optimization problems. Indeed it was within the CLP paradigm that many of the concepts and research directions described in this handbook were first introduced. For example global constraints were introduced in CLP [14]; it was within the CLP paradigm that multiple cooperating constraint solvers were introduced [15]; it is within the CLP community that much of the research has taken place exploring
Future of CLP and Interesting Research Questions
It is almost exactly 20 years since the CLP paradigm was introduced. It has been an important component in the success of CP, providing the initial reason for the “programming” component. One impact has been on logic programming. CLP is now a cornerstone of logic programming theory, systems and applications. Standard logic programming systems, such as GNU-Prolog and SICStus Prolog now provide constraint solving libraries. It has also received substantial interest from researchers into
Bibliography (124)
- et al.
Logic programming and negation: A survey
Journal of Logic Programming
(1994) - et al.
A transformational approach to negation in logic programming
Journal of Logic Programming
(1990) - et al.
Introducing global constraints in CHIP
Mathematical and Computer Modelling
(1994) Constructive negation by pruning
Journal of Logic Programming
(1997)Theory and practice of constraint handling rules
Journal of Logic Programming
(1998)- et al.
Semantics of infinite tree logic programming
Theoretical Computer Science
(1986) - et al.
The semantics of constraint logic programs
Journal of Logic Programming
(1998) - et al.
Aclp: Abductive constraint logic programming
Journal of Logic Programming
(2000) - et al.
Constraint query languages
Journal of Computer and System Science
(1995) Negation in logic programming
Journal of Logic Programming
(1987)
A language and a program for stating and solving combinatorial problems
Artificial Intelligence
Inductive logic programming: Theory and methods
Journal of Logic Programming
Automatic generation of rule-based solvers for intentionally defined constraints
International Journal of Artificial Intelligence Tools
Extending CHIP in order to solve complex scheduling problems
Constraint logic programming language CAL
LIFE: A natural language for natural language
Technical Report ACA-ST-074-88, MCC
LOGIN: A logic programming language with built-in inheritance
Journal of Logic Programming
Warren's Abstract Machine: A Tutorial reconstruction
Constraint programming viewed as rule-based programming
Theory and Practice of Logic Programming
Contributions to the theory of logic programming
JACM
Intensional negation of logic programs: Examples and implementation techniques
Global constraints as graph properties on a structured network of elementary constraints of the same type
Combinatorial problem solving in constraint logic programming with cooperating solvers
A resolution principle for constrained logics
Artificial Intelligence
Entailment of finite domain constraints
Freeze, indexing, and other implementation issues in the WAM
Constructive negation based on the completed database
ECLiPSe
Negation as failure
A relational language for parallel programming
IC-Prolog – language feature
Logical arithmetic
Future Computing Systems
PROLOG II reference manual and theoretical model
Technical report, Groupe Intelligence Artificielle, Université Aix — Marseille II
Opening the PROLOG-III universe
BYTE Magazine
Equations and inequations on finite and infinite trees
Hybrid branch-and-price for multicast network design
First-order constrained lambda calculus
A new perspective on integrating functional and logic languages
Independence in CLP languages
ACM Transactions on Programming Languages and Systems
A minimal extension of the WAM for clp (FD)
The constraint logic programming language CHIP
A Mathematical Introduction to Logic
REF-ARF: A system for solving problems stated as procedures
Artificial Intelligence Journal
Absys1: An incremental compiler for assertions: An introduction
The design and implementation of Kaleidoscope'90: A constraint imperative programming language
Constraint simplification rules
To the gates of HAL: a HAL tutorial
Cited by (6)
Computing difference abstractions of linear equation systems
2021, Theoretical Computer ScienceModeling and Reasoning in Event Calculus using Goal-Directed Constraint Answer Set Programming
2021, Theory and Practice of Logic ProgrammingHeuristic Planning for Hybrid Dynamical Systems with Constraint Logic Programming
2023, CEUR Workshop ProceedingsA Predicate Construct for Declarative Programming in Imperative Languages
2022, ACM International Conference Proceeding SeriesA history of the Oz multiparadigm language
2020, Proceedings of the ACM on Programming Languages