Abstract
The considerable expressive power and flexibility gained by combining constraint programming with logic programming is not without cost. Implementations of constraint logic programming (CLP) languages must include expensive constraint solving algorithms tailored to specific domains, such as trees, Booleans, or real numbers. The performance of many current CLP compilers and interpreters does not encourage the widespread use of CLP. We outline an optimizing compiler for CLP(ℛ), a CLP language which extends Prolog by allowing linear arithmetic constraints. The compiler uses sophisticated global analyses to determine the applicability of different program transformations. Two important components of the compiler, the analyzer and the optimizer, work in continual interaction in order to apply semantics-preserving transformations to the source program. A large suite of transformations are planned. Currently the compiler applies three powerful transformations, namely “solver bypass”, “dead variable elimination” and “nofail constraint detection”. We explain these optimizations and their place in the overall compiler design and show how they lead to performance improvements on a set of benchmark programs.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have