The Loop Absorption and the Generalization Strategies for the Development of Logic Programs and Partial Deduction

Abstract We present a program transformation methodology which is based on the invention of the so-called eureka definitions necessary for improving program efficiency. We propose a strategy, called loop absorption, for the automatic generation of those definitions in the case of definite logic programs, and we show its use for partial deduction. The problem of finding the eureka definitions is formalized as the search for suitable trees of clauses, called foldable U-trees, which are derived by unfolding the initial programs. It is possible, in general, to construct foldable U-trees if one uses the generalization rule. This rule should be applied with parsimony because it may reduce the efficiency of the derived programs. For overcoming this inconvenience, we propose a generalization strategy. We also study the properties of that strategy, together with the loop absorption, and we show that some techniques for partial deduction correspond to particular ways of applying our program derivation methodology.

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

[2]  Alberto Pettorossi,et al.  Synthesis of Eureka Predicates for Developing Logic Programs , 1990, ESOP.

[3]  Jan Komorowski,et al.  Partial evaluation as a means for inferencing data structures in an applicative language: a theory and implementation in the case of prolog , 1982, POPL '82.

[4]  Maurice Bruynooghe,et al.  Compiling Control , 1989, J. Log. Program..

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

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

[7]  J. Kruskal Well-quasi-ordering, the Tree Theorem, and Vazsonyi’s conjecture , 1960 .

[8]  Annalisa Bossi,et al.  Basic Transformation Operations which Preserve Computed Answer Substitutions of Logic Programs , 1993, J. Log. Program..

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

[10]  Leon Sterling,et al.  Composing Prolog Meta-Interpreters , 1988, ICLP/SLP.

[11]  Graham Higman,et al.  Ordering by Divisibility in Abstract Algebras , 1952 .

[12]  Nadia Azibi Trequasi : un système pour la transformation automatique de programmes PROLOG récursifs en quasi-itératifs , 1987 .

[13]  Alberto Pettorossi,et al.  Decidability Results and Characterization of Strategies for the Development of Logic Programs , 1989, ICLP.

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

[15]  Jeffrey D. Ullman,et al.  Formal languages and their relation to automata , 1969, Addison-Wesley series in computer science and information processing.

[16]  Tadashi Kanamori,et al.  Preservation of Stronger Equivalence in Unfold/Fold Logic Program Transformation , 1990, Theor. Comput. Sci..

[17]  Jan Komorowski Elements of a programming methodology founded on partial deduction-part 1 , 1991 .

[18]  John W. Lloyd,et al.  A Partial Evaluation Procedure for Logic Programs , 1990, NACLP.

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

[20]  Saumya K. Debray,et al.  Unfold/fold transformations and loop optimization of logic programs , 1988, PLDI '88.

[21]  Christopher J. Hogger,et al.  Derivation of Logic Programs , 1981, JACM.