Skip to main content

Aggregates for CHR through Program Transformation

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 2007)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4915))

Abstract

We propose an extension of Constraint Handling Rules (CHR) with aggregates such as sum, count, findall, and min. This new feature significantly improves the conciseness and expressiveness of the language. In this paper, we describe an implementation based on source-to-source transformations to CHR (extended with some low-level compiler directives). We allow user-defined aggregates and nested aggregate expressions over arbitrary guarded conjunctions of constraints. Both an on-demand and an incremental aggregate computation strategy are supported.

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. The CHR Home Page. http://www.cs.kuleuven.be/~dtai/projects/CHR/ .

  2. De Koninck, L., Schrijvers, T., Demoen, B.: User-definable rule priorities for CHR. In: 9th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming, Wrocław, Poland, July 2007, pp. 25–36 (2007)

    Google Scholar 

  3. Duck, G.J., Stuckey, P.J., de la Banda, M.G., 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 

  4. Frühwirth, T.: Theory and practice of Constraint Handling Rules. Journal of Logic Programming 37(1–3), 95–138 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  5. Kiczales, G., Lamping, J., Mendhekar, A., Meda, C., Lopes, C., Loingtier, J.-M., Irwing, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  6. Schrijvers, T., Demoen, B.: The K.U.Leuven CHR system: Implementation and application. In: Selected Contributions, First Workshop on Constraint Handling Rules, (May 2004), http://www.cs.kuleuven.be/~toms/CHR/

  7. Sneyers, J., Schrijvers, T., Demoen, B.: The computational power and complexity of Constraint Handling Rules. In: Second Workshop on Constraint Handling Rules, October 2005, pp. 3–17. Sitges, Spain (2005)

    Google Scholar 

  8. Sneyers, J., Van Weert, P., Schrijvers, T., Demoen, B.: Aggregates in CHR. In: Fourth Workshop on Constraint Handling Rules (2007) (to appear)

    Google Scholar 

  9. Sneyers, J., Van Weert, P., Schrijvers, T., Demoen, B.: Aggregates in CHR. Technical Report CW481, Dept. Computer Science, K.U.Leuven (2007)

    Google Scholar 

  10. ISO/IEC 9075:2003: Information technology – Database languages – SQL

    Google Scholar 

  11. Van Weert, P., Sneyers, J., Schrijvers, T., Demoen, B.: Extending CHR with negation as absence. In: Third Workshop on Constraint Handling Rules, Venice, Italy, pp. 125–139 (2006)

    Google Scholar 

  12. Wielemaker, J.: An overview of the SWI-Prolog programming environment. In: 13th Intl. Workshop on Logic Programming Environments, pp. 1–16. Heverlee, Belgium (2003), 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 paper

Cite this paper

Van Weert, P., Sneyers, J., Demoen, B. (2008). Aggregates for CHR through Program Transformation. In: King, A. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2007. Lecture Notes in Computer Science, vol 4915. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78769-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-78769-3_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-78768-6

  • Online ISBN: 978-3-540-78769-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics