Unfolding for CHR programs

Program transformation is an appealing technique which allows to improve run-time efficiency, space-consumption, and more generally to optimize a given program. Essentially, it consists of a sequence of syntactic program manipulations which preserves some kind of semantic equivalence. Unfolding is one of the basic operations which is used by most program transformation systems and which consists in the replacement of a procedure call by its definition. While there is a large body of literature on transformation and unfolding of sequential programs, very few papers have addressed this issue for concurrent languages. This paper defines an unfolding system for CHR programs. We define an unfolding rule, show its correctness and discuss some conditions which can be used to delete an unfolded rule while preserving the program meaning. We also prove that, under some suitable conditions, confluence and termination are preserved by the above transformation. To appear in Theory and Practice of Logic Programming (TPLP).

[1]  Thom W. Frühwirth Specialization of Concurrent Guarded Multi-set Transformation Rules , 2004, LOPSTR.

[2]  Bart Demoen,et al.  Guard and Continuation Optimization for Occurrence Representations of CHR , 2005, ICLP.

[3]  Maurizio Gabbrielli,et al.  Unfolding in CHR , 2007, PPDP '07.

[4]  Slim Abdennadher,et al.  Essentials of Constraint Programming , 2010, Cognitive Technologies.

[5]  Thom W. Frühwirth,et al.  Probabilistic Constraint Handling Rules , 2002, Electron. Notes Theor. Comput. Sci..

[6]  Slim Abdennadher,et al.  Operational Semantics and Confluence of Constraint Propagation Rules , 1997, CP.

[7]  Sandro Etalle,et al.  Transformations of CCP programs , 2001, TOPL.

[8]  John C. Shepherdson,et al.  Unfold/fold transformations of logic programs , 1992, Mathematical Structures in Computer Science.

[9]  Joost Vennekens,et al.  Logic Programming , 2004, Lecture Notes in Computer Science.

[10]  Wannes Meert,et al.  CHR(PRISM)-based probabilistic logic learning , 2010, Theory Pract. Log. Program..

[11]  T. Frühwirth,et al.  Equivalence of CHR States Revisited , 2009 .

[12]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[13]  Tom Schrijvers,et al.  Transactions in Constraint Handling Rules , 2008, ICLP.

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

[15]  Slim Abdennadher,et al.  Integration and Optimization of Rule-Based Constraint Solvers , 2003, LOPSTR.

[16]  Thom W. Frühwirth,et al.  Source-to-Source Transformation for a Class of Expressive Rules , 2003, APPIA-GULP-PRODE.

[17]  Gert Smolka Principles and Practice of Constraint Programming-CP97 , 1997, Lecture Notes in Computer Science.

[18]  Paolo Tacchella,et al.  Constraint handling rules. Compositional semantics and program transformation , 2008 .

[19]  Kazunori Ueda,et al.  Transformation Rules for GHC Programs , 1988, FGCS.

[20]  Tom Schrijvers,et al.  Attributed Data for CHR Indexing , 2009, ICLP.

[21]  Arabellastrasse,et al.  Constraint Handling Rules ? , 1995 .

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