On the Cooperation of the Constraint Domains H, R and FD in CFLP

Reading time: 6 minute
...

📝 Original Info

  • Title: On the Cooperation of the Constraint Domains H, R and FD in CFLP
  • ArXiv ID: 0904.2136
  • Date: 2009-04-15
  • Authors: Researchers from original ArXiv paper

📝 Abstract

This paper presents a computational model for the cooperation of constraint domains and an implementation for a particular case of practical importance. The computational model supports declarative programming with lazy and possibly higher-order functions, predicates, and the cooperation of different constraint domains equipped with their respective solvers, relying on a so-called Constraint Functional Logic Programming (CFLP) scheme. The implementation has been developed on top of the CFLP system TOY, supporting the cooperation of the three domains H, R and FD, which supply equality and disequality constraints over symbolic terms, arithmetic constraints over the real numbers, and finite domain constraints over the integers, respectively. The computational model has been proved sound and complete w.r.t. the declarative semantics provided by the $CFLP$ scheme, while the implemented system has been tested with a set of benchmarks and shown to behave quite efficiently in comparison to the closest related approach we are aware of. To appear in Theory and Practice of Logic Programming (TPLP)

💡 Deep Analysis

Deep Dive into On the Cooperation of the Constraint Domains H, R and FD in CFLP.

This paper presents a computational model for the cooperation of constraint domains and an implementation for a particular case of practical importance. The computational model supports declarative programming with lazy and possibly higher-order functions, predicates, and the cooperation of different constraint domains equipped with their respective solvers, relying on a so-called Constraint Functional Logic Programming (CFLP) scheme. The implementation has been developed on top of the CFLP system TOY, supporting the cooperation of the three domains H, R and FD, which supply equality and disequality constraints over symbolic terms, arithmetic constraints over the real numbers, and finite domain constraints over the integers, respectively. The computational model has been proved sound and complete w.r.t. the declarative semantics provided by the $CFLP$ scheme, while the implemented system has been tested with a set of benchmarks and shown to behave quite efficiently in comparison to the

📄 Full Content

Constraint Programming relies on constraint solving as a powerful mechanism for tackling practical applications. The well-known CLP Scheme (Jaffar and Lassez 1987;Jaffar and Maher 1994;Jaffar et al. 1998) provides a powerful and practical framework for constraint programming which inherits the clean semantics and declarative style of logic programming. Moreover, the combination of CLP with functional programming has given rise to various so-called CF LP (Constraint Functional Logic Programming) schemes, developed since 1991 and aiming at a very expressive combination of the constraint, logical and functional programming paradigms.

This paper tackles foundational and practical issues concerning the efficient use of constraints in CF LP languages and systems. Both the CLP and the CF LP schemes must be instantiated by a parametrically given constraint domain D which provides specific data values, constraints based on specific primitive operations, and a dedicated constraint solver. Therefore, there are different instances CLP (D) of the CLP scheme for various choices of D, and analogously for CF LP , whose instances CF LP (D) provide a declarative framework for any chosen domain D. Useful ‘pure’ constraint domains include the Herbrand domain H which supplies equality and disequality constraints over symbolic terms; the domain R which supplies arithmetic constraints over real numbers; and the domain F D which supplies arithmetic and finite domain constraints over integers. Practical applications, however, often involve more than one ‘pure’ domain, and sometimes problem solutions have to be artificially adapted to fit a particular choice of domain and solver.

Combining decision procedures for theories is a well-known problem, thoroughly investigated since the seminal paper of Nelson and Oppen (Nelson and Oppen 1979). In constraint programming, however, the emphasis is placed in computing answers by the interaction of constraint solvers with user given programs, rather than in deciding satisfiability of formulas. The cooperative combination of constraint domains and solvers has evolved during the last decade as a relevant research issue that is raising an increasing interest in the CLP community. Here we mention (Baader and Schulz 1995;Benhamou 1996;Monfroy 1996;Monfroy 1998;Granvilliers et al. 2001;Marin et al. 2001;Hofstedt 2001;Monfroy and Castro 2004;Hofstedt and Pepper 2007) as a limited selection of references illustrating various approaches to the problem. An important idea emerging from the research in this area is that of ‘hybrid’ constraint domain, built as a combination of simpler ‘pure’ domains and designed to support the cooperation of its components, so that more declarative and efficient solutions for practical problems can be promoted.

The first aim of this paper is to present a computational model for the cooperation of constraint domains in the CF LP context, where sophisticated functional programming features such as higher-order functions and lazy evaluation must collaborate with constraint solving. Our computational model is based on the CF LP scheme and goal solving calculus recently proposed in (López-Fraguas et al. 2004;López-Fraguas et al. 2007), which will be enriched with new mechanisms for modeling the intended cooperation. Moreover, we rely on the domain cooperation techniques proposed in our previous papers (Estévez-Martín et al. 2007;Estévez-Martín et al. 2007;Estévez-Martín et al. 2008), where we have introduced so-called bridges as a key tool for communicating constraints between different domains.

Bridges are constraints of the form X #== di,dj Y which relate the values of two variables X :: d i , Y :: d j of different base types, requiring them to be equivalent. For instance, X #== int,real Y (abbreviated as X #== Y in the rest of the paper) constrains the real variable Y :: real to take an integral real value equivalent to that of the integer variable X :: int. Note that the two types int and real are kept distinct and their respective values are not confused.

Our cooperative computation model keeps different stores for constraints corresponding to various domains and solvers. In addition, there is a special store where the bridge constraints which arise during the computation are placed. A bridge constraint X #== Y available in the bridge store can be used to project constraints involving the variable X into constraints involving the variable Y, or vice versa. For instance, the R constraint RX <= 3.4 (based on the inequality primitive <= -’less or equal’ -for the type real) can be projected into the F D constraint X #<= 3 (based on the inequality primitive #<= -’less or equal’ -for the type int) in case that the bridge X #== RX is available. Projected constraints are submitted to their corresponding store, with the aim of improving the performance of the corresponding solver. In this way, projections behave as an important cooperation mechanism, enabling certain solvers t

…(Full text truncated)…

📸 Image Gallery

cover.png

Reference

This content is AI-processed based on ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut