Optimizing compilation of CLP( R )

  • Authors:
  • Andrew D. Kelly;Kim Marriott;Andrew MacDonald;Peter J. Stuckey;Roland Yap

  • Affiliations:
  • Monash Univ., Clayton, Australia;Monash Univ., Clayton, Australia;Univ. of Melbourne, Parkville, Australia;Univ. of Melbourne, Parkville, Australia;National Univ. of Singapore, Singapore

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Constraint Logic Programming (CLP) languages extend logic programming by allowing the use of constraints from different domains such as real numbers or Boolean functions. They have proved to be ideal for expressing problems that require interactive mathematical modeling and complex combinatorial optimization problems. However, CLP languages have mainly been considered as research systems, useful for rapid prototyping, by not really competitive with more conventional programming languages where efficiency is a more important consideration. One promising approach to improving the performance of CLP systems is the use of powerful program optimizations to reduce the cost of constraint solving. We extend work in this area by describing a new optimizing compiler for the CLP language CLP( R ). The compiler implements six powerful optimizations: reordering of constraints, removal of redundant variables, and specialization of constraints which cannot fail. Each program optimization is designed to remove the overhead of constraint solving when possible and keep the number of constraints in the store as small as possible. We systematically evaluate the effectiveness of each optimization in isolation and in combination. Our empirical evaluation of the compiler verifies that optimizing compilation can be made efficient enough to allow compilation of real-world programs and that it is worth performing such compilation because it gives significant time and space performance improvements.