Aggregates for CHR through Program Transformation

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.

[1]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[2]  Ricardo Baeza-Yates,et al.  Computer Science 2 , 1994 .

[3]  Bart Demoen,et al.  The K.U.Leuven CHR system: Implementation and application , 2004 .

[4]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[5]  Satoshi Matsuoka,et al.  ECOOP'97 — Object-Oriented Programming , 1997, Lecture Notes in Computer Science.

[6]  Thom W. Frühwirth,et al.  Theory and Practice of Constraint Handling Rules , 1998, J. Log. Program..

[7]  Bart Demoen,et al.  Aggregates in Constraint Handling Rules , 2007, ICLP.

[8]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[9]  Tom Schrijvers,et al.  Extending CHR with negation as absence , 2006 .

[10]  Peter J. Stuckey,et al.  The Refined Operational Semantics of Constraint Handling Rules , 2004, ICLP.

[11]  Bart Demoen,et al.  The computational power and complexity of constraint handling rules , 2009, TOPL.

[12]  Bart Demoen,et al.  Aggregates in CHR , 2007 .

[13]  Jan Wielemaker,et al.  An Overview of the SWI-Prolog Programming Environment , 2003, WLPE.

[14]  Bart Demoen,et al.  User-definable rule priorities for CHR , 2007, PPDP '07.