Online partial deduction of logic programs

Partial deduction systems must be guided by an unfolding strategy, telling them which atoms to unfold and when to stop unfolding. Online strategies exploit knowledge accumulated during the unfolding itself, for example in a goal stack, while offline strategies are fixed before unfolding begins. Online strategies are more powerful, but a major overhead for large programs is the analysis time spent on each atom, which increases as the knowledge grows. We describe an online strategy whose analysis time for each atom is independent of the amount of knowledge about that atom. This reduces transformation times for programs with large search spaces by an order of magnitude, while retaining the power of online analysis. Correctness, termination and nontriviality are shown.

[1]  John Darlington,et al.  An Experimental Program Transformation and Synthesis System , 1986, Artif. Intell..

[2]  Hassam Khoshnevisan-Tehrani Automatic transformation systems based on function-level reasoning , 1987 .

[3]  Norman H. Cohen Eliminating Redundant Recursive Calls. , 1983, TOPL.

[4]  Steven David Prestwich,et al.  An Unfold Rule for Full Prolog , 1992, LOPSTR.

[5]  Alberto Pettorossi,et al.  Semantics preserving transformation rules for Prolog , 1991 .

[6]  Peter G. HARRISON Linearisation: An Optimisation for Nonlinear Functional Programs , 1988, Sci. Comput. Program..

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

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

[9]  DONALD MICHIE,et al.  “Memo” Functions and Machine Learning , 1968, Nature.

[10]  Yoshihiko Futamura,et al.  Parital Computation of Programs , 1982, RIMS Symposium on Software Science and Engineering.

[11]  Wei-Ngan Chin,et al.  Safe fusion of functional expressions II: Further improvements , 1994, Journal of Functional Programming.

[12]  Akikazu Takeuchi,et al.  Partial Evaluation of Prolog Programs and its Application to Meta Programming , 1986, IFIP Congress.

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

[14]  Wei-Ngan Chin Safe fusion of functional expressions , 1992, LFP '92.

[15]  Dan Sahlin,et al.  The Mixtus Approach to Automatic Partial Evaluation of Full Prolog , 1990, NACLP.

[16]  Lennart Augustsson,et al.  Compiling Pattern Matching , 1985, FPCA.

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

[18]  Alberto Pettorossi,et al.  Unfolding - Definition - Folding, in this Order, for Avaoiding Unnecessary Variables in Logic Programs , 1995, Theor. Comput. Sci..

[19]  Alberto Pettorossi,et al.  A powerful strategy for deriving efficient programs by transformation , 1984, LFP '84.

[20]  Valentin F. Turchin,et al.  The concept of a supercompiler , 1986, TOPL.

[21]  Philip Wadler,et al.  Views: a way for pattern matching to cohabit with data abstraction , 1987, POPL '87.

[22]  Andrei P. Ershov,et al.  Mixed Computation: Potential Applications and Problems for Study , 1982, Theor. Comput. Sci..

[23]  Richard S. Bird,et al.  Tabulation Techniques for Recursive Programs , 1980, CSUR.

[24]  Leon Sterling,et al.  Incremental Flavor-Mixing of Meta-Interpreters for Expert System Construction , 1986, SLP.

[25]  Hirohisa Seki,et al.  Unfold/Fold Transformation of Stratified Programs. , 1989 .

[26]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1988, Theoretical Computer Science.