Replacement Can Preserve Termination

We consider the replacement transformation operation, a very general and powerful transformation, and study under which conditions it preserves universal termination besides computed answer substitutions. With this safe replacement we can significantly extend the safe unfold/fold transformation sequence presented in [11]. By exploiting typing information, more useful conditions can be defined and we may deal with some special cases of replacement very common in practice, namely switching two atoms in the body of a clause and the associativity of a predicate. This is a first step in the direction of exploiting a Pre/Post specification on the intended use of the program to be transformed. Such specification can restrict the instances of queries and clauses to be considered and then relax the applicability conditions on the transformation operations.

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

[2]  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.

[3]  Hirohisa Seki,et al.  Unfold/Fold Transformations of Stratified Programs , 1991, Theor. Comput. Sci..

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

[5]  Annalisa Bossi,et al.  Norms on Terms and their use in Proving Universal Termination of a Logic Program , 1994, Theor. Comput. Sci..

[6]  Danny De Schreye,et al.  Deriving Termination Proofs for Logic Programs, Using Abstract Procedures , 1991, International Conference on Logic Programming.

[7]  Christophe Verschaetse Static termination analysis for definite Horn clause programs , 1992 .

[8]  中川 裕志,et al.  UNFOLD/FOLD TRANSFORMATION OF STRATIFIED PROGRAMS , 1989 .

[9]  Christopher J. Hogger,et al.  Compiling Associativity into Logic Programs , 1987, J. Log. Program..

[10]  Alberto Pettorossi,et al.  Synthesis of Programs from Unfold/Fold Proofs , 1993, LOPSTR.

[11]  J. Zhang,et al.  An Automatic Difference-List Transformation Algorithm for Prolog , 1988, ECAI.

[12]  Krzysztof R. Apt,et al.  Introduction to Logic Programming , 1988 .

[13]  Dino Pedreschi,et al.  Proving Termination of General Prolog Programs , 1991, TACS.

[14]  Taisuke Sato,et al.  An Equivalence Preserving First Order Unfold/fold Transformation System , 1990, International Conference on Algebraic and Logic Programming.

[15]  Lutz Plümer Termination Proofs for Logic Programs , 1990, Lecture Notes in Computer Science.

[16]  Sandro Etalle,et al.  Transforming Normal Programs by Replacement , 1992, META.

[17]  Krzysztof R. Apt Declarative Programming in Prolog , 1993, ILPS.

[18]  Elena Marchiori,et al.  Proving Correctness of Logic Programs Using Axiomatic Semantics , 1991, ICLP.

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

[20]  Dino Pedreschi,et al.  Studies in Pure Prolog: Termination , 1990 .

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

[22]  Jan van Leeuwen,et al.  Handbook of Theoretical Computer Science, Vol. B: Formal Models and Semantics , 1994 .

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

[24]  Wolfgang Thomas,et al.  Handbook of Theoretical Computer Science, Volume B: Formal Models and Semantics , 1990 .

[25]  Taisuke Sato,et al.  Equivalence-Preserving First-Order Unfold/Fold Transformation Systems , 1990, Theor. Comput. Sci..

[26]  Richard S. Bird The promotion and accumulation strategies in transformational programming , 1984, TOPL.

[27]  Neil D. Jones,et al.  Stepwise Development of Operational and Denotational Semantics for Prolog , 1984, International Conference on Spoken Language Processing.

[28]  Wlodzimierz Drabent,et al.  Inductive Assertion Method for Logic Programs , 1987, Theoretical Computer Science.

[29]  John P. Gallagher,et al.  A Transformation System for Definite Programs Based on Termination Analysis , 1994, LOPSTR.

[30]  Michael J. Maher Correctness of a Logic Program Transformation System , 1987 .

[31]  Uday S. Reddy,et al.  A Framework of Directionality for Proving Termination of Logic Programs , 1992, JICSLP.

[32]  Annalisa Bossi,et al.  Verifying Correctness of Logic Programs , 1989, TAPSOFT, Vol.2.

[33]  Alberto Pettorossi,et al.  Transformation of Logic Programs: Foundations and Techniques , 1994, J. Log. Program..

[34]  M. Baudinet Logic programming semantics: techniques and applications , 1989 .

[35]  Alberto Pettorossi,et al.  Transformation of Logic Programs , 1994 .

[36]  Sandro Etalle,et al.  Simultaneous Replacement in Normal Programs , 1996, J. Log. Comput..

[37]  Krzysztof R. Apt,et al.  On the occur-check-free PROLOG programs , 1994, TOPL.

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

[39]  Annalisa Bossi,et al.  Preserving Universal Termination through Unfold/Fold , 1994, ALP.

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

[41]  Sandro Etalle,et al.  Transformation of Left Terminating Programs: the Reordering Problem , 1995, LOPSTR.

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