Memory Reuse for CHR
Two Constraint Handling Rules compiler optimizations that drastically reduce the memory footprint of CHR programs are introduced. The reduction is the result of reusing suspension terms, the internal CHR constraint representation, and avoiding the overhead of constraint removal followed by insertion. The optimizations are defined formally and their correctness is proved. Both optimizations were implemented in the K.U.Leuven CHR system. Significant memory savings and speedups were measured on classical and well-known benchmarks.
KeywordsOperational Semantic Garbage Collection Cache Size Propagation History Execution State
Unable to display preview. Download preview PDF.
- 1.The K.U.Leuven CHR system, http://www.cs.kuleuven.be/~toms/Research/CHR/
- 2.Demoen, B.: The hProlog home page, http://www.cs.kuleuven.be/~bmd/hProlog/
- 6.Mazur, N.: Compile-time Garbage Collection for the Declarative Language Mercury. PhD thesis, K.U.Leuven, Leuven, Belgium (May 2004)Google Scholar
- 8.Schrijvers, T.: Analyses, Optimizations and Extensions of Constraint Handling Rules. PhD thesis, K.U.Leuven, Leuven, Belgium (June 2005)Google Scholar
- 9.Schrijvers, T., Stuckey, P., Duck, G.: Abstract Interpretation for Constraint Handling Rules. In: Proceedings of the 7th Intl. Conference on Principles and Practice of Declarative Programming (PPDP 2005), Lisbon, Portugal (July 2005)Google Scholar
- 10.Sneyers, J., Schrijvers, T., Demoen, B.: The computational power and complexity of Constraint Handling Rules. In: Proc. 2nd Workshop on Constraint Handling Rules (CHR 2005), Sitges, Spain, pp. 3–17 (October 2005)Google Scholar
- 11.Sneyers, J., Schrijvers, T., Demoen, B.: Suspension optimization and in-place updates for optimizing CHR compilation. Technical Report CW 433, K.U.Leuven, Dept. CS (December 2005)Google Scholar