Advertisement

Aggregates for CHR through Program Transformation

  • Peter Van Weert
  • Jon Sneyers
  • Bart Demoen
Part of the Lecture Notes in Computer Science book series (LNCS, 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.

Keywords

Operational Semantic Active Constraint Program Transformation Propagation History Execution State 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
  2. 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. 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)CrossRefGoogle Scholar
  4. 4.
    Frühwirth, T.: Theory and practice of Constraint Handling Rules. Journal of Logic Programming 37(1–3), 95–138 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 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)CrossRefGoogle Scholar
  6. 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. 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. 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. 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. 10.
    ISO/IEC 9075:2003: Information technology – Database languages – SQLGoogle Scholar
  11. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Peter Van Weert
    • 1
  • Jon Sneyers
    • 1
  • Bart Demoen
    • 1
  1. 1.Department of Computer ScienceK.U.LeuvenBelgium

Personalised recommendations