Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
The K.U.Leuven CHR system, http://www.cs.kuleuven.be/~toms/Research/CHR/
Demoen, B.: The hProlog home page, http://www.cs.kuleuven.be/~bmd/hProlog/
Duck, G.J., Stuckey, P.J., GarcÃa de la Banda, M., Holzbaur, C.: The Refined Operational Semantics of Constraint Handling Rules. In: Demoen, B., Lifschitz, V. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 90–104. Springer, Heidelberg (2004)
Frühwirth, T.: Theory and practice of Constraint Handling Rules. Journal of Logic Programming 37(1–3), 95–138 (1998)
Holzbaur, C., Frühwirth, T.: Compiling constraint handling rules into Prolog with attributed variables. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 117–133. Springer, Heidelberg (1999)
Mazur, N.: Compile-time Garbage Collection for the Declarative Language Mercury. PhD thesis, K.U.Leuven, Leuven, Belgium (May 2004)
Mazur, N., Ross, P., Janssens, G., Bruynooghe, M.: Practical Aspects for a Working Compile Time Garbage Collection System for Mercury. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol. 2237, p. 105. Springer, Heidelberg (2001)
Schrijvers, T.: Analyses, Optimizations and Extensions of Constraint Handling Rules. PhD thesis, K.U.Leuven, Leuven, Belgium (June 2005)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sneyers, J., Schrijvers, T., Demoen, B. (2006). Memory Reuse for CHR. In: Etalle, S., Truszczyński, M. (eds) Logic Programming. ICLP 2006. Lecture Notes in Computer Science, vol 4079. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11799573_8
Download citation
DOI: https://doi.org/10.1007/11799573_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-36635-5
Online ISBN: 978-3-540-36636-2
eBook Packages: Computer ScienceComputer Science (R0)