Abstract Domains for Reordering CLP(RLin) Programs

In order to address the multi-directional nature of constraint logic programs, recent optimizing compilers generate several versions of a procedure and optimize them independently. Reordering, i.e., moving constraints towards the end of a clause, plays a fundamental role in this optimization: it may lead to significant improvements in performance by bypassing the constraint solver entirely. This paper focuses on CLP over linear real constraints, and studies two abstract domains, i.e., LSign and LInt, which can be used to decide at compile time when constraints can be safely reordered. The domain LSign was originally proposed by Marriott and Stuckey. Its fundamental ideas consist of abstracting coefficients by signs and of keeping multiplicity information on constraints. LInt is a new, and infinite, domain which is similar in nature to LSign, except that signs are replaced by intervals of rational numbers. A comprehensive description of the two domains is given, together with some very preliminary evidence showing that the domains are precise enough to perform the intended optimizations on small programs. (C) 2000 Elsevier Science Inc. All rights reserved.

[1]  Manuel V. Hermenegildo,et al.  Abstract Specialization and Its Application to Program Parallelization , 1996, LOPSTR.

[2]  Gerda Janssens,et al.  Towards a Practical Full Mode Inference System for CLP(H, N) , 1994, ICLP.

[3]  W. Older,et al.  Extending Prolog with Constraint Arithmetic on Real Intervals , 1990 .

[4]  Peter J. Stuckey,et al.  Incremental Analysis of Logic Programs , 1995, ICLP.

[5]  Bart Demoen,et al.  Abstract Interpretation: Towards the Global Optimization of Prolog Programs , 1987, SLP.

[6]  Gerda Janssens,et al.  Global analysis of constraint logic programs , 1996, TOPL.

[7]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.

[8]  David S. Warren,et al.  Freeness Analysis in the Presence of Numerical Constraints , 1993 .

[9]  Peter J. Stuckey,et al.  The 3 R's of optimizing constraint logic programs: refinement, removal and reordering , 1993, POPL '93.

[10]  Pascal Van Hentenryck,et al.  Cardinality Analysis of Prolog , 1994, ILPS.

[11]  Roland H. C. Yap,et al.  An abstract machine for CLP(R) , 1992, PLDI '92.

[12]  Krzysztof R. Apt Proceedings of the joint international conference and symposium on logic programming on Logic programming , 1992 .

[13]  Wolfram Büttner,et al.  Embedding Boolean Expressions into Logic Programming , 1987, J. Symb. Comput..

[14]  Pascal Van Hentenryck,et al.  Combinations of abstract domains for logic programming , 1994, POPL '94.

[15]  John C. Shepherdson,et al.  Unfold/fold transformations of logic programs , 1992, Mathematical Structures in Computer Science.

[16]  Manuel V. Hermenegildo,et al.  A Practical Approach to the Global Analysis of CLP Programs , 1993, ILPS.

[17]  Pascal Van Hentenryck,et al.  LSign Reordered , 1995, SAS.

[18]  Peter J. Stuckey,et al.  Approximating Interaction between Linear Arithmetic Constraints , 1994, ILPS.

[19]  Pascal Van Hentenryck,et al.  Backtracking without trailing in CLP (RLin) , 1994, PLDI '94.

[20]  Francesca Rossi,et al.  Principles and Practice of Constraint Programming — CP '95 , 1995, Lecture Notes in Computer Science.

[21]  Pascal Van Hentenryck,et al.  CLP(Rlin) Revised , 1996, JICSLP.

[22]  Pascal Van Hentenryck,et al.  Type Analysis of Prolog Using Type Graphs , 1995, J. Log. Program..

[23]  Roland H. C. Yap,et al.  Effectiveness of Optimizing Compilation for CLP(R) , 1996, JICSLP.

[24]  Roland H. C. Yap,et al.  The CLP( R ) language and system , 1992, TOPL.

[25]  Spiro Michaylov,et al.  Optimizing Compilation of Linear Arithmetic in a Class of Constraint Logic Programs , 1994, ILPS.

[26]  Pascal Van Hentenryck,et al.  Type analysis of Prolog using type graphs , 1994, PLDI '94.

[27]  Gilberto Filé,et al.  Improving Abstract Interpretations by Systematic Lifting to the Powerset , 1994, ILPS.

[28]  Pascal Van Hentenryck,et al.  An Optimizing Compiler for CLP(RLin) , 1998 .

[29]  Manuel V. Hermenegildo,et al.  Implementation of multiple specialization in logic programs , 1995, PEPM '95.

[30]  Alain Colmerauer,et al.  An introduction to Prolog III , 1989, CACM.

[31]  Roland H. C. Yap,et al.  An Optimizing Compiler for CLP(R) , 1995, CP.

[32]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[33]  Pascal Van Hentenryck Constraint satisfaction in logic programming , 1989, Logic programming.

[34]  Pascal Van Hentenryck,et al.  Experimental evaluation of a generic abstract interpretation algorithm for Prolog , 1992, ICCL.

[35]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1984, JACM.

[36]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[37]  Patrick Cousot,et al.  Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation , 1992, PLILP.

[38]  Nicolas Beldiceanu,et al.  Constraint Logic Programming , 1997 .