Academia.edu no longer supports Internet Explorer.
To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to upgrade your browser.
1993, Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '93
Central to constraint logic programming (CLP) languages is the notion of a global constraint solver which is queried to direct execution and to which constraints are monotonically added. We present a methodology for use in the compilation of CLP languages which is designed to reduce the overhead of the global constraint solver. This methodology is based on three optimizations. The first, refinement, involves adding new constraints, which in effect make information available earlier in the computation, guiding subsequent execution away from unprofitable choices. The second, removal, involves eliminating constraints from the solver when they are redundant. The last, reordering, involves moving constraint addition later and constraint remowd earlier in the computation. Determining the applicability of each optimization requires sophisticated global analysis. These analyses are based on abstract interpretation and provide information about potential and definite interaction between constraints.
ACM Transactions on Programming Languages and Systems, 1996
This paper presents and illustrates a practical approach to the dataflow analysis of constraint logic programming languages using abstract interpretation. It is first argued that, from the framework point of view, it suffices to propose relatively simple extensions of traditional analysis methods which have already been proved useful and practical and for which efficient fixpoint algorithms exist. This is shown by proposing a simple extension of Bruynooghe's traditional framework which allows it to analyze constraint logic programs. Then, and using this generalized framework, two abstract domains and their required abstract functions are presented: the first abstract domain approximates definiteness information and the second one freeness. Finally, an approach for combining those domains is proposed. The two domains and their combination have been implemented and used in the analysis of CLP() and Prolog-III applications. Results from this implementation showing its performance and accuracy are also presented.
Journal of Logic Programming, 1998
The Constraint Logic Programming (CLP) Scheme was introduced by Jaar and Lassez. The scheme gave a formal framework, based on constraints, for the basic operational, logical and algebraic semantics of an extended class of logic programs. This paper presents for the ®rst time the semantic foundations of CLP in a self-contained and complete package. The main contributions are threefold. First, we extend the original conference paper by presenting de®nitions and basic semantic constructs from ®rst principles, giving new and complete proofs for the main lemmas. Importantly, we clarify which theorems depend on conditions such as solution compactness, satisfaction completeness and independence of constraints. Second, we generalize the original results to allow for incompleteness of the constraint solver. This is important since almost all CLP systems use an incomplete solver. Third, we give conditions on the (possibly incomplete) solver which ensure that the operational semantics is con¯uent, that is, has independence of literal scheduling. Ó 1998 Elsevier Science Inc. All rights reserved.
The Journal of Logic Programming, 1998
The Constraint Logic Programming (CLP) Scheme was introduced by Jaar and Lassez. The scheme gave a formal framework, based on constraints, for the basic operational, logical and algebraic semantics of an extended class of logic programs. This paper presents for the ®rst time the semantic foundations of CLP in a self-contained and complete package. The main contributions are threefold. First, we extend the original conference paper by presenting de®nitions and basic semantic constructs from ®rst principles, giving new and complete proofs for the main lemmas. Importantly, we clarify which theorems depend on conditions such as solution compactness, satisfaction completeness and independence of constraints. Second, we generalize the original results to allow for incompleteness of the constraint solver. This is important since almost all CLP systems use an incomplete solver. Third, we give conditions on the (possibly incomplete) solver which ensure that the operational semantics is con¯uent, that is, has independence of literal scheduling.
KBSDE is a knowledge compiler that usee a classification-based approach to map solution constraints in a taek specification onto particular search algorithm components that will be responsible for satisfying those constraints '-,y., local constraints are incorporated in generat: 14' global constraints are incorporated in either .ba*ters or hillclimbing patchen). Associated with each type of search algorithm component is a subcompiler that specialisea in mapping constraints into components of that type. Each of these subcompilem in turn una e classification-baaed approach, matching a constraint p d to it against one of several schemes, .and applying a compilation technique associated with that schema. While much progene h a occurred in our research since we first laid out our classification-bad a p p r o d [TonSl], we focus in this paper on our reformulation research. Two important reformula. tion issuer that arise out of the choice of a schemabased approach are: Compilobility. Can e constraint that does not directly match any of a particular subcompiler's schemaa be reformulated into one that doea? If the efficiency of the compiled search algorithm depends on the compiler's performance, and the compiler'r perforxnance depends on the form in which the constraint waa expressed, can we find forma for constraints which compile better, or reformulak constraints whose forma c m be recognized as ones that compile poorly? In this paper, we deecribe a set of techniques we are developing for partially addressing these i s 0 EfFciency. sua.
Software: Practice and Experience, 2004
Logic programming requires that the programmer convert a problem into a set of constraints based on predicates. Choosing the predicates and introducing appropriate constraints can be intricate and error-prone. If the problem domain is structured enough, we can let the programmer express the problem in terms of more abstract, higherlevel constraints. A compiler can then convert the higher-level program into a logicprogramming formalism. The compiler writer can experiment with alternative lowlevel representations of the higher-level constraints in order to achieve a high-quality translation. The programmer can then take advantage of both a reduction in complexity and an improvement in runtime speed for all problems within the domain.
Artificial Intelligence, 1992
Van Hentenryck, P., H. Simonis and M. Dincbas, Constraint satisfaction using constraint logic programming, Artificial Intelligence 58 (1992) 113-159.
this paper we argue the benets of global constraints as a basis for such an integration. We demonstrate the advantages of modelling with global constraints, explain their operational benets and illustrate this with a series of case studies. (Integer Programming, Constraint Programming, Global Constraints, Integration, Hybrid Methods) 1 Introduction Since its origins, Constraint Programming (CP) has integrated algorithms from dierent areas [25] such as Mathematical Programming, Networks and Computational Logic. Earliest Constraint Logic Programming systems like Prolog III [16], CHIP [17] and CLP(R) [26] solve constraints in dierent algebra using constraint solving algorithms such as the simplex method (for solving linear constraints) [33], boolean unication or resolution (for logical constraints) [16], constraint propagation techniques (for solving constraints on nite domain variables)
Journal of Logic Programming, 1996
We present the clp(FD) system: a Constraint Logic Programming language with finite domain constraints. We detail its implementation and present an abstract instruction set for the constraint solver that can be smoothly integrated into the WAM architecture. It is based on the use of a single primitive constraint X in r that embeds the core propagation mechanism. Complex user constraints such as linear equations or inequations are compiled into X in r expressions that encode the propagation scheme chosen to solve the constraint. The uniform treatment of a single primitive constraint leads to a better understanding of the overall constraint solving process and allows three main general optimizations that encompass many previous particular optimizations of "black-box" finite domain solvers. Implementation results show that this approach combines both simplicity and efficiency. Our clp(FD) system is about four times faster than CHIP on average, with peak speedup reaching eight. We also show that, following the "glass-box" approach, clp(FD) can be naturally enhanced with various new constraints such as constructive disjunction, boolean constraints, non-linear constraints and symbolic constraints. ¡ Address correspondence toPhilippe Codognet and Daniel Diaz, INRIA-Rocquencourt,
Lecture Notes in Computer Science, 2015
We present a new declarative compilation of logic programs with constraints into variable-free relational theories which are then executed by rewriting. This translation provides an algebraic formulation of the abstract syntax of logic programs. Management of logic variables, unification, and renaming apart is completely elided in favor of algebraic manipulation of variable-free relation expressions. We prove the translation is sound, and the rewriting system complete with respect to traditional SLD semantics.
Constraints
This paper compares the efficiency of a number of Constraint Logic Programming (CLP) systems in the setting of finite domains as well as a specific aspect of their expressiveness (that concerning reification and meta-constraints). There are two key reasons for adopting CLP technology for solving a problem. The first is its expressiveness enabling a declarative solution with readable code which is vital for maintenance and the second is the provision of an efficient implementation for the computationally expensive procedures. However, CLP systems differ significantly both in how solutions may be expressed and the efficiency of their execution and it is important that both these factors are taken into account when choosing the best CLP system for a particular application. This paper aids this choice by illustrating differences between the systems, indicating their particular strengths and weaknesses.
ACM Transactions on Programming Languages and Systems, 2000
Global analyzers traditionally read and analyze the entire program at once, in a nonincremental way. However, there are many situations which are not well suited to this simple model and which instead require reanalysis of certain parts of a program which has already been analyzed. In these cases, it appears inefficient to perform the analysis of the program again from scratch, as needs to be done with current systems. We describe how the fixed-point algorithms used in current generic analysis engines for (constraint) logic programming languages can be extended to support incremental analysis. The possible changes to a program are classified into three types: addition, deletion, and arbitrary change. For each one of these, we provide one or more algorithms for identifying the parts of the analysis that must be recomputed and for performing the actual recomputation. The potential benefits and drawbacks of these algorithms are discussed. Finally, we present some experimental results o...
The last years have witnessed continuous progress in the technology available both for academic and commercial computing environments. Examples include more processor performance, increased memory capacity and bandwidth, faster networking technology, operating system support for cluster computing and the generalized use of mutiprocessor systems, including in particular multicore microprocessors. These improvements, combined with recent advances in compilation and implementation technologies, are causing high-level languages to be regarded as good candidates for programming complex, real world applications. Techniques aiming at achieving flexibility in the language design make powerful extensions easier to implement; on the other hand, implementations which reach good performance in terms of speed and memory consumption make declarative languages and systems amenable to develop non-trivial applications.
The Journal of Logic Programming, 1998
This paper describes the design, implementation, and applications of the constraint logic language cc(FD). cc(FD) is a declarative nondeterministic constraint logic language over nite domains based on the cc framework 33], an extension of the CLP scheme 21]. Its constraint s o l v er includes (non-linear) arithmetic constraints over natural numbers which are approximated using domain and interval consistency. The main novelty o f cc(FD) is the inclusion of a number of general-purpose combinators, in particular cardinality, constructive disjunction, and blocking implication, in conjunction with new constraint operations such as constraint e n tailment a n d generalization. These combinators signi cantly improve the operational expressiveness, extensibility, and exibility of CLP languages and allow issues such as the de nition of non-primitive constraints and disjunctions to be tackled at the language level. The implementation o f cc(FD) (about 40,000 lines of C) includes a WAM-based engine 44], optimal arc-consistency algorithms based on AC-5 40], and incremental implementation of the combinators. Results on numerous problems, including scheduling, resource allocation, sequencing, packing, and hamiltonian paths are reported and indicate that cc(FD) comes close to procedural languages on a number of combinatorial problems. In addition, a small cc(FD) program was able to nd the optimal solution and prove optimality to a famous 10/10 disjunctive s c heduling problem 29], which w as left open for more than 20 years and nally solved in 1986.
Journal of Symbolic Computation, 1989
Constraint logic programming (CLP) is an extension of logic programming by introducing the facility of writing and solving constraints in a certain domain. CAL (Contrainte avec Logique) is a CLP language in which (possibly non-linear) polynomial equations can be written as constraints, while almost all the other CLP languages proposed so far have concentrated only on linear equations and inequations. This paper describes a general semantics of CLP including CAL, and shows the validity of CAL in this framework.
Global constraints represent invaluable modeling tools for Constraint Programming (CP). Efficiently solving recurrent subproblems is a key point for CP successes. However, global constraints mainly remain strongly attached to a given constraint solver. Indeed, they heavily rely on internal mechanisms in order to be as efficient as possible. In this paper, we emphasize the interest of decoupling global constraint implementations from the underlying solver. We show, on a tree constraint, that even more decoupling it by providing fully dynamic algorithms enhances efficiency and, which is much more important, allow an efficient portability of the constraint. We illustrate this for the Choco and Gecode solvers.
Theory and Practice of Logic Programming, 2002
One recurring problem in program development is that of understanding how to re-use code developed by a third party. In the context of (constraint) logic programming, part of this problem reduces to figuring out how to query a program. If the logic program does not come with any documentation, then the programmer is forced to either experiment with queries in an ad hoc fashion or trace the control-flow of the program (backward) to infer the modes in which a predicate must be called so as to avoid an instantiation error. This paper presents an abstract interpretation scheme that automates the latter technique. The analysis presented in this paper can infer moding properties which if satisfied by the initial query, come with the guarantee that the program and query can never generate any moding or instantiation errors. Other applications of the analysis are discussed. The paper explains how abstract domains with certain computational properties (they condense) can be used to trace control-flow backward (right-to-left) to infer useful properties of initial queries. A correctness argument is presented and an implementation is reported.
Electronic Notes in Theoretical Computer Science, 2000
We address the problem of specializing a constraint logic program w.r.t. a constrained atom which speci es the context of use of the program. We f o l l o w a n approach based on transformation rules and strategies. We i n troduce a novel transformation rule, called contextual constraint replacement, to be combined with variants of the traditional unfolding and folding rules. We present a general Partial Evaluation Strategy for automating the application of these rules, and two additional strategies: the Context Propagation Strategy which is instrumental for the application of our contextual constraint replacement rule, and the Invariant Promotion Strategy for taking advantage of invariance properties of the computation. We show through some examples the power of our method and we compare it with existing methods for partial deduction of constraint logic programs based on extensions of Lloyd and Shepherdson's approach.
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.