Abstract
Constraint Handling Rules (CHR) is a high-level programming language based on multi-headed guarded rules. The original high-level operational semantics of CHR is very nondeterministic. Recently, instantiations of the high-level operational semantics have been proposed and implemented, removing sources of nondeterminism and hence allowing better execution control. Rule guards may be redundant under a more instantiated semantics while being necessary in the general high-level semantics. Expert CHR programmers tend to remove such redundant guards. Although this tends to improve the performance, it also destroys the local logical reading of CHR rules: in order to understand the meaning of a rule, the entire program and the details of the instantiated operational semantics have to be taken into account. As a solution, we propose compiler optimizations that automatically detect and remove redundant guards.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abdennadher, S., Frühwirth, T.: Operational equivalence of CHR programs and constraints. In: Jaffar, J. (ed.) CP 1999. LNCS, vol. 1713, pp. 43–57. Springer, Heidelberg (1999)
Abdennadher, S., Rigotti, C.: Automatic generation of CHR constraint solvers. In: Abdennadher, S., Frühwirth, T., Holzbaur, C. (eds.) Special Issue on Constraint Handling Rules. TPLP, vol. 5(4–5), pp. 403–418 (2005)
De Koninck, L., Schrijvers, T., Demoen, B.: User-definable rule priorities for CHR. In: Leuschel, M., Podelski, A. (eds.) PPDP 2007: Proc. 9th Intl. Conf. Princ. Pract. Declarative Programming, Wroclaw, Poland, pp. 25–36 (Jully 2007)
Duck, G., Stuckey, P., GarcÃa de la Banda, M., Holzbaur, C.: Extending arbitrary solvers with Constraint Handling Rules. In: PPDP 2003: Proc. 5th Intl. Conf. Princ. Pract. Declarative Programming, Uppsala, Sweden (2003)
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. In: Stuckey, P., Marriot, K. (eds.) Special Issue on Constraint Logic Programming, Journal of Logic Programming, vol. 37(1–3) (October 1998)
Henderson, F., Somogyi, Z., Conway, T.: Determinism analysis in the Mercury compiler. In: Proceedings of the 19th Australian Computer Science Conference, Melbourne, Australia, pp. 337–346 (January 1996)
Holzbaur, C., GarcÃa de la Banda, M., Jeffery, D., Stuckey, P.: Optimizing compilation of Constraint Handling Rules. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol. 2237, pp. 74–89. Springer, Heidelberg (2001)
Holzbaur, C., GarcÃa de la Banda, M., Stuckey, P., Duck, G.: Optimizing compilation of Constraint Handling Rules in HAL. In: Abdennadher, S., Frühwirth, T., Holzbaur, C. (eds.) Special Issue on Constraint Handling Rules. TPLP, vol. 5(4–5), pp. 503–531 (2005)
Holzbaur, C., Frühwirth, T.: Compiling Constraint Handling Rules into Prolog with attributed variables. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702. Springer, Heidelberg (1999)
Sarna-Starosta, B., Schrijvers, T.: Indexing techniques for CHR based on program transformation. Technical Report CW 500, K.U.Leuven, Dept. Computer Science (August 2007)
Schrijvers, T., Demoen, B.: Antimonotony-based Delay Avoidance for CHR. Technical Report CW 385, K.U.Leuven, Department of Computer Science (July 2004)
Schrijvers, T., Demoen, B.: The K.U.Leuven CHR system: implementation and application. In: Frühwirth, T., Meister, M. (eds.) First Workshop on Constraint Handling Rules: Selected Contributions, vol. 2004-01 (2004)
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.: Guard and continuation optimization for occurrence representations of CHR. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 83–97. Springer, Heidelberg (2005)
Sneyers, J., Schrijvers, T., Demoen, B.: Guard simplification in CHR programs. In: Wolf, A., Frühwirth, T., Meister, M. (eds.) Proceedings of the 19th Workshop on (Constraint) Logic Programming (W(C)LP 2005), Ulm, Germany. Ulmer Informatik-Berichte, vol. 2005-01, pp. 123–134 (February 2005)
Sneyers, J., Van Weert, P., De Koninck, L., Schrijvers, T.: As time goes by: Constraint Handling Rules — A survey of CHR research between 1998 and 2007. In: TPLP (submitted, 2008)
Demoen, B.: hProlog home page, http://www.cs.kuleuven.be/~bmd/hProlog
Kaeser, M., et al.: WebCHR., http://chr.informatik.uni-ulm.de/~webchr/
Schrijvers, T.: CHR benchmarks and programs. K.U.Leuven CHR home page, http://www.cs.kuleuven.be/~toms/Research/CHR/
Wielemaker, J.: SWI-Prolog home page, http://www.swi-prolog.org
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Sneyers, J., Schrijvers, T., Demoen, B. (2008). Guard Reasoning in the Refined Operational Semantics of CHR. In: Schrijvers, T., Frühwirth, T. (eds) Constraint Handling Rules. Lecture Notes in Computer Science(), vol 5388. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-92243-8_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-92243-8_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-92242-1
Online ISBN: 978-3-540-92243-8
eBook Packages: Computer ScienceComputer Science (R0)