Optimizing compilation of CLP(R)

Citation
Ad. Kelly et al., Optimizing compilation of CLP(R), ACM T PROGR, 20(6), 1998, pp. 1223-1250
Citations number
27
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
ISSN journal
01640925 → ACNP
Volume
20
Issue
6
Year of publication
1998
Pages
1223 - 1250
Database
ISI
SICI code
0164-0925(199811)20:6<1223:OCOC>2.0.ZU;2-D
Abstract
Constraint Logic Programming (CLP) languages extend logic programming by al lowing the use of constraints from different domains such as real numbers o r Boolean functions. They have proved to be ideal for expressing problems t hat require interactive mathematical modeling and complex combinatorial opt imization problems. However, CLP languages have mainly been considered as r esearch systems, useful for rapid prototyping, but not really competitive w ith more conventional programming languages where efficiency is a more impo rtant consideration. One promising approach to improving the performance of CLP systems is the use of powerful program optimizations to reduce the cos t of constraint solving. We extend work in this area by; describing a new o ptimizing compiler for the CLP language CLP(R). The compiler implements six powerful optimizations: reordering of constraints, bypass of the constrain t solver, splitting and dead-code elimination, removal of redundant constra ints, removal of redundant variables, and specialization of constraints whi ch cannot fail. Each program optimization is designed to remove the overhea d of constraint solving when possible and keep the number of constraints in the store as small as possible. We systematically evaluate the effectivene ss of each optimization in isolation and in combination. Our empirical eval uation of the compiler verifies that optimizing compilation can be made eff icient enough to allow compilation of real-world programs and that it is wo rth performing such compilation because it gives significant time and space performance improvements.