Skip to main content

Guard Reasoning in the Refined Operational Semantics of CHR

  • Chapter
Constraint Handling Rules

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 5388))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. 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)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. 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)

    Chapter  Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. 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)

    Google Scholar 

  12. Schrijvers, T., Demoen, B.: Antimonotony-based Delay Avoidance for CHR. Technical Report CW 385, K.U.Leuven, Department of Computer Science (July 2004)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. 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 

  15. 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)

    Chapter  Google Scholar 

  16. 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)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. Demoen, B.: hProlog home page, http://www.cs.kuleuven.be/~bmd/hProlog

  19. Kaeser, M., et al.: WebCHR., http://chr.informatik.uni-ulm.de/~webchr/

  20. Schrijvers, T.: CHR benchmarks and programs. K.U.Leuven CHR home page, http://www.cs.kuleuven.be/~toms/Research/CHR/

  21. Wielemaker, J.: SWI-Prolog home page, http://www.swi-prolog.org

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics