An Optimizing Compiler for CLP(R). Kelly, A. D., Macdonald, A., Marriott, K., Søndergaard, H., Stuckey, P. J., & Yap, R. H. C. In Montanari, U. & Rossi, F., editors, Principles and Practice of Constraint Programming—CP'95, volume 976, of Lecture Notes in Computer Science, pages 222–239, 1995. Springer.
doi  abstract   bibtex   
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(R), 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.
@Inproceedings{Kel-Mac-Mar-Son-Stu-Yap_CP95,
  author    = {Andrew D. Kelly and 
		Andrew Macdonald and 
		Kim Marriott and
            	Harald S{\o}ndergaard and 
		Peter J. Stuckey and 
		Roland H. C. Yap},
  title     = {An Optimizing Compiler for {CLP(R)}},
  editor    = {U. Montanari and F. Rossi},
  booktitle = {Principles and Practice of Constraint Programming---CP'95},
  series    = {Lecture Notes in Computer Science},
  volume    = {976},
  pages     = {222--239},
  publisher = {Springer},
  year      = {1995},
  doi       = {10.1007/3-540-60299-2_14},
  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(R), 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 <i>analyzer</i> and the <i>optimizer</i>, 
		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.},
  keywords  = {Constraint programming, Logic programming, Static analysis, Program transformation, Compilation},
}

Downloads: 0