A Transformation Based in the Equality Between Terms

We present a new transformation of Prolog programs preserving operational equivalence. Our transformation — EBC (equality based continuation) transformation — relies on the introduction of equations between terms. These equations are used to introduce alternative and more efficient representations of terms. When applied to binary Prolog programs, EBC is able to perform the following optimizations by mere source to source transformations: removal of existential variables in programs using difference lists and accumulators, reduction of the number of occur-checks, interprocedural register allocation when executed on the WAM, linearization of recursions, optimization of continuation-like user data structures.

[1]  John W. Lloyd,et al.  Partial Evaluation in Logic Programming , 1991, J. Log. Program..

[2]  Bart Demoen,et al.  On the Transformation of a Prolog Program to a More Efficient Binary Program , 1992, LOPSTR.

[3]  Franz Baader,et al.  Unification theory , 1986, Decis. Support Syst..

[4]  Hisao Tamaki,et al.  Unfold/Fold Transformation of Logic Programs , 1984, ICLP.

[5]  Ulrich Neumerkel Une transformation de programme basée sur la notion d'équations entre termes , 1993, JFPL.

[6]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[7]  Feliks Kluzniak,et al.  Compile Time Garbage Collection for Ground Prolog , 1988, ICLP/SLP.

[8]  Didier Parigot,et al.  Space Optimization in the FNC-2 Attribute Grammar System , 1990, WAGA.

[9]  Geoff W. Hamilton,et al.  Compile-Time Garbage Collection by Necessity Analysis , 1990, Functional Programming.

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

[11]  Alberto Pettorossi,et al.  Unfolding - Definition - Folding, in this Order, for Avaoiding Unnecessary Variables in Logic Programs , 1991, PLILP.

[12]  Olivier Ridoux,et al.  Logic Grammars and Lambda-Prolog , 1993, ICLP.

[13]  Koichi Furukawa,et al.  Proceedings of the eighth international conference on Logic programming , 1991 .

[14]  John P. Gallagher,et al.  Some low-level source transformations of logic programs , 1990 .

[15]  Uwe Kastens,et al.  Lifetime Analysis for Procedure Parameters , 1986, ESOP.

[16]  Peter Van Roy A useful extension to Prolog's definite clause grammar notation , 1989, SIGP.

[17]  Joachim Beer Concepts, Design, and Performance Analysis of a Parallel Prolog Machine , 1989, Lecture Notes in Computer Science.

[18]  Ulrich Neumerkel,et al.  Specialization of Prolog Programs with Partially Static Goals and Binarization , 1992 .

[19]  Simon L. Peyton Jones,et al.  Functional Programming, Glasgow 1990 , 1991, Workshops in Computing.

[20]  Paul Tarau,et al.  Elementary Logic Programs , 1990, PLILP.

[21]  Mitchell Wand,et al.  Continuation-Based Program Transformation Strategies , 1980, JACM.

[22]  Joachim Beer The Occur-Check Problem Revisited , 1988, J. Log. Program..

[23]  Jean-Louis Bouquard Etude des rapports entre grammaires attribuees et programmation logique : application au test d'occurrence et a l'analyse statique , 1992 .

[24]  Dov M. Gabbay,et al.  Handbook of logic in artificial intelligence and logic programming (vol. 1) , 1993 .

[25]  Maurice Bruynooghe,et al.  Analysis of Shared Data Structures for Compile-Time Garbage , 1990, ICLP.

[26]  Jan Maluszynski,et al.  Relating Logic Programs and Attribute Grammars , 1985, J. Log. Program..