Unfolding in CHR

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. One of the basic operations which is used by most program transformation systems is unfolding 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 and, to the best of our knowledge, no one has considered unfolding of CHR programs. This paper is a first attempt to define a correct 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.

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

[2]  Thorn Friihwirth Specialization of concurrent guarded multi-set transformation rules , 2005 .

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

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

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

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

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

[8]  John Darlington,et al.  A Transformation System for Developing Recursive Programs , 1977, J. ACM.

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

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

[11]  Thom W. Frühwirth Constraint handling rules: the story so far , 2006, PPDP '06.

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

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

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

[15]  Cristóbal Pareja-Flores,et al.  A gentle introduction to algorithm complexity for CS1 with nine variations on a theme by Fibonacci , 1995, SGCS.

[16]  Peter J. Stuckey,et al.  Optimizing Compilation of Constraint Handling Rules , 2001, ICLP.

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