The 3 R's of optimizing constraint logic programs: refinement, removal and reordering

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 methododology 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 removal 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.

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

[2]  Dana S. Scott,et al.  Concurrent constraint programming languages , 1989 .

[3]  Hisao Tamaki,et al.  Enumeration of Success Patterns in Logic Programs , 1983, Theor. Comput. Sci..

[4]  Gabriel M. Kuper,et al.  Constraint Query Languages , 1995, J. Comput. Syst. Sci..

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

[6]  Michael M. Gorlick,et al.  Mockingbird: A Logical Methodology for Testing , 1990, J. Log. Program..

[7]  Stephen Bennett Johnson Mathematical building blocks , 1987 .

[8]  Vijay A. Saraswat,et al.  Concurrent constraint programming , 1989, POPL '90.

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

[10]  Kim Marriott,et al.  Some Global Compile-Time Optimizations for CLP(R) , 1991, ISLP.

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

[12]  Gabriel M. Kuper,et al.  Constraint query languages (preliminary report) , 1990, PODS '90.

[13]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

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

[15]  Yike Guo,et al.  A New Perspective on Integrating Functional and Logic Languages , 1992, FGCS.

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