Some Global Compile-Time Optimizations for CLP(R)

Generation of eecient code for constraint logic programming (CLP) languages poses new problems. It is not yet clear which techniques from Prolog compilation will be important nor what sort of domain speciic techniques can be developed. As a case study, we describe and evaluate four global optimizations for use in the compilation of the language CLP(R). The rst three are variants of optimizations used in Prolog compilation. The fourth is novel, and is based on nding constraints which are \future redundant" in the sense that at some point in the future they will be implied by other constraints. Finally, we give evidence in the form of preliminary tests that these optimizations can signiicantly improve performance.

[1]  Timothy J. Hickey,et al.  Global Compilation of Prolog , 1989, J. Log. Program..

[2]  Kim Marriott,et al.  Analysis of Constraint Logic Programs , 1990, NACLP.

[3]  Chris Mellish,et al.  Some Global Optimizations for a Prolog Compiler , 1985, J. Log. Program..

[4]  Jeffrey D. Ullman,et al.  Efficient tests for top-down termination of logical rules , 1988, JACM.

[5]  Saumya K. Debray,et al.  Static inference of modes and data dependencies in logic programs , 1989, TOPL.

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

[7]  Saumya K. Debray,et al.  Functional computations in logic programs , 1989, TOPL.

[8]  Andrew Taylor,et al.  LIPS on a MIPS: Results from a Prolog Compiler for a RISC , 1990, ICLP.

[9]  Neil D. Jones,et al.  Program flow analysis - theory and applications , 1981, Prentice Hall software series.

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

[11]  Joxan Jaffar,et al.  Methodology and Implementation of a CLP System , 1987, ICLP.

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

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

[14]  Peter Van Roy,et al.  The Benefits of Global Dataflow Analysis for an Optimizing Prolog Compiler , 1990, NACLP.

[15]  Saumya K. Debray,et al.  Unfold/fold transformations and loop optimization of logic programs , 1988, PLDI '88.

[16]  Saumya K. Debray,et al.  On the Practicality of Global Flow Analysis of Logic Programs , 1988, ICLP/SLP.