## Logic program specialisation through partial deduction: Control issues (2002)

Venue: | THEORY AND PRACTICE OF LOGIC PROGRAMMING |

Citations: | 55 - 13 self |

### BibTeX

@ARTICLE{Leuschel02logicprogram,

author = {Michael Leuschel and Maurice Bruynooghe},

title = {Logic program specialisation through partial deduction: Control issues},

journal = {THEORY AND PRACTICE OF LOGIC PROGRAMMING},

year = {2002},

volume = {2},

number = {4},

pages = {461--515}

}

### Years of Citing Articles

### OpenURL

### Abstract

Program specialisation aims at improving the overall performance of programs by performing source to source transformations. A common approach within functional and logic programming, known respectively as partial evaluation and partial deduction, is to exploit partial knowledge about the input. It is achieved through a well-automated application of parts of the Burstall-Darlington unfold/fold transformation framework. The main challenge in developing systems is to design automatic control that ensures correctness, efficiency, and termination. This survey and tutorial presents the main developments in controlling partial deduction over the past 10 years and analyses their respective merits and shortcomings. It ends with an assessment of current achievements and sketches some remaining research challenges.

### Citations

782 | Constraint logic programming: a survey
- Jaffar, Maher
- 1994
(Show Context)
Citation Context ...mbers of A hence the roots of the SLDNF-trees are atoms, in constrained partial deduction, they are constrained atoms of the form C ✷ A, where A is an atom and C a constraint over some domain D (see (=-=Jaffar and Maher 1994-=-) for details on constraint logic programming). (Leuschel and De Schreye 1998a) use inequality constraints over the Herbrand universe. Considering again the generalisation of the characteristic trees ... |

758 | Rewriting systems
- Dershowitz, Jouannaud
- 1990
(Show Context)
Citation Context ...nteresting wqo is the homeomorphic embedding relation ✂, which derives from results by (Higman 1952) and (Kruskal 1960). It has been used in the context of term rewriting systems in (Dershowitz 1987, =-=Dershowitz and Jouannaud 1990-=-), and adapted for use in supercompilation in (Sørensen and Glück 1995). What follows is an adaptation of the definition from (Sørensen and Glück 1995),s24 M. Leuschel and M. Bruynooghe around, i.e., ... |

727 | Introduction to Metamathematics - Kleene - 1952 |

652 | Partial Evaluation and Automatic Program Generation - Jones, Gomard, et al. - 1993 |

581 | A Transformation System for Developing Recursive Programs
- Burstall, Darlington
- 1977
(Show Context)
Citation Context ... as we have seen above, in principle also evaluate expressions which depend on the unknown dynamic input. This puts partial deduction closer to techniques such as unfold/fold program transformations (=-=Burstall and Darlington 1977-=-, Pettorossi and Proietti 1994), and therefore using a different denomination seems justified. Note that partial evaluation and in particular partial deduction is not limited to evaluation of expressi... |

456 | Termination of Rewriting
- Dershowitz
- 1987
(Show Context)
Citation Context ...chel 1998a). An interesting wqo is the homeomorphic embedding relation ✂, which derives from results by (Higman 1952) and (Kruskal 1960). It has been used in the context of term rewriting systems in (=-=Dershowitz 1987-=-, Dershowitz and Jouannaud 1990), and adapted for use in supercompilation in (Sørensen and Glück 1995). What follows is an adaptation of the definition from (Sørensen and Glück 1995),s24 M. Leuschel a... |

424 |
Logic Programming
- Apt
- 1990
(Show Context)
Citation Context ...o exploit data present in the source code of the program or gathered though program analysis. Finally, in the remainder of this article we suppose familiarity with basic notions in logic programming (=-=Apt 1990-=-, Lloyd 1987). 2 Basics of Partial Deduction In this section we present the technique of partial deduction, which originates from (Komorowski 1982). Other introductions to partial deduction can be fou... |

371 |
Confluent reductions: abstract properties and applications to term rewriting systems
- Huet
- 1980
(Show Context)
Citation Context ...are replaced by a generalisation. This ensures that each predicate has at most one specialised version, ensuring correctness and —as there are no infinite chains of strictly more general expressions (=-=Huet 1980-=-)— termination. However, as already said, generalising atoms introduces precision loss, hence it is worthwhile to consider polyvariance, the construction of several specialised versions of the same pr... |

275 |
Ordering by divisibility in abstract algebras
- Higman
- 1952
(Show Context)
Citation Context ...o can be mimicked by a wqo and the combination of two wqos is still a wqo (Leuschel 1998b, Leuschel 1998a). An interesting wqo is the homeomorphic embedding relation ✂, which derives from results by (=-=Higman 1952-=-) and (Kruskal 1960). It has been used in the context of term rewriting systems in (Dershowitz 1987, Dershowitz and Jouannaud 1990), and adapted for use in supercompilation in (Sørensen and Glück 1995... |

264 | Tabled evaluation with delaying for general logic programs
- Chen, Warren
- 1996
(Show Context)
Citation Context ...ming. First steps in that direction have been presented in (Fioravanti, Pettorossi and Proietti 1999, Fioravanti, Pettorossi and Proietti 2000). In the context of tabled-evaluation of logic programs (=-=Chen and Warren 1996-=-), some specialisation techniques have been successfully built into the execution mechanism itself (Dawson, Ramakrishnan, Ramakrishnan, Sagonas, Skiena, Swift and Warren 1995), but there has been rela... |

240 | Partial evaluation in logic programming - Lloyd, Shepherdson - 1991 |

239 | Tutorial notes on Partial Evaluation, in
- Consel, Danvy
- 1993
(Show Context)
Citation Context ...ailable input. Because part of the computation has already been performed beforehand by the partial evaluator, the hope that we obtain a more efficient program PS seems justified. Partial evaluation (=-=Consel and Danvy 1993-=-, Jones, Gomard and Sestoft 1993, Jones 1996, Mogensen and Sestoft 1997) has been applied to many programming languages: functional programming languages (e.g., (Jones et al. 1993)), logic programming... |

222 | OLD resolution with tabulation - Tamaki, Sato - 1986 |

221 | Unification Revisited - Lassez, Maher, et al. - 1988 |

214 | Unfold/fold transformation of logic programs - Tamaki, Sato - 1984 |

201 | Proving Termination with Multiset Orderings
- Dershowitz, Manna
- 1979
(Show Context)
Citation Context ...ancestor sequences is a strong indication that some interesting specialisation is going on. Well-founded orders. Inspired by their usefulness in the context of static termination analysis (see e.g., (=-=Dershowitz and Manna 1979-=-, De Schreye and Decorte 1994)), well-founded orders have been successfully employed to ensure termination of partial deduction in (Bruynooghe et al. 1992, Martens, De Schreye and Horváth 1994, Marten... |

197 | The execution algorithm of Mercury, an efficient purely declarative logic programming language - Somogyi, Henderson, et al. - 1996 |

174 | The concept of a supercompiler - Turchin - 1986 |

149 | Tutorial on Specialisation of Logic Programs, in
- Gallagher
- 1993
(Show Context)
Citation Context ...ly partially deduced (taking care that A remains closed for the initial atoms provided by the user). This gives rise to the generic scheme for a partial deduction procedure (similar to the scheme in (=-=Gallagher 1991-=-, Gallagher 1993)) in Figure 3. The local control is exhibited by the function unfold(P, Ak) that returns a finite SLDNF-tree for P ∪ {← Ak}. Once all trees constructed, the atoms in their leaves are ... |

140 | Termination of logic programs: The never ending story - Schreye, Decorte - 1994 |

140 | Transformation of Logic Programs: Foundations and Techniques - Pettorossi, Proietti - 1994 |

138 | Introduction to Partial Evaluation
- Jones
(Show Context)
Citation Context ...ady been performed beforehand by the partial evaluator, the hope that we obtain a more efficient program PS seems justified. Partial evaluation (Consel and Danvy 1993, Jones, Gomard and Sestoft 1993, =-=Jones 1996-=-, Mogensen and Sestoft 1997) has been applied to many programming languages: functional programming languages (e.g., (Jones et al. 1993)), logic programming languages (e.g., (Gallagher 1993, Komorowsk... |

117 | Mix: A self-applicable partial evaluator for experiments in compiler generation - Jones, Sestoft, et al. - 1989 |

106 | Transformational systems and the algebraic structure of atomic formulas - Reynolds - 1970 |

106 | An Automatic Partial Evaluator for Full Prolog - Sahlin - 1994 |

100 | A semantic basis for the termination analysis of logic programs
- Codish, Taboch
- 1999
(Show Context)
Citation Context ... to cope with the higher-order features and module structure of Mercury. Finally, (Vanhoof and Bruynooghe 2001) describes a full binding time analysis for logic programs. The termination analyser of (=-=Codish and Taboch 1999-=-) has been extended for the case that it cannot prove termination. The extension identifies the atoms in clause bodies that are at the origin of the failure to prove termination. This termination anal... |

82 | Partial Evaluation of Functional Logic Programs
- Alpuente, Falaschi, et al.
- 1998
(Show Context)
Citation Context ...functional logic programs. Functional logic programming (Hanus 1994) extends both logic and functional programming. A lot of work has recently been carried out on partial deduction of such languages (=-=Alpuente et al. 1996-=-, Alpuente et al. 1997, Albert et al. 1998, Alpuente et al. 1998, Albert, Alpuente, Hanus and Vidal 1999) (treating languages based on narrowing) and (Lafave and Gallagher 1997) (treating languages ba... |

82 | A positive supercompiler
- Sørensen, Glück, et al.
- 1996
(Show Context)
Citation Context ...t (Sahlin 1993, Glück et al. 1996, De Schreye et al. 1999, Vanhoof and Martens 1997). Also observe that, in other programming paradigms such as supercompilation of functional languages (Turchin 1986, =-=Glück and Sørensen 1996-=-, Sørensen, Glück and Jones 1996, Sørensen and Glück 1999), historically there has not been a clear distinction between local and global control. In these settings, e.g., (Sørensen and Glück 1995, Sør... |

74 |
Towards an Automated Tupling Strategy
- Chin
- 1993
(Show Context)
Citation Context ...onjunctive partial deduction can perform deforestation and tupling, supercompilation is incapable of achieving tupling. On the other hand, the techniques developed for tupling of functional programs (=-=Chin 1993-=-, Chin and Khoo 1993) are incapable of performing deforestation. The reason for this extra power conferred by conjunctive partial deduction, is that conjunctions with shared variables can be used both... |

73 | A note on inductive generalisation - Plotkin - 1970 |

64 | A general criterion for avoiding infinite unfolding during partial deduction - Bruynooghe, Schreye, et al. - 1992 |

64 |
The Derivation of an Algorithm for Program Specialisation
- Gallagher, Bruyhooghe
- 1991
(Show Context)
Citation Context ...e encountered in Example 6 (see, e.g., (Bowers and Gurr 1995)). A common approach to prevent local code explosion and work duplication relies on determinacy-based unfolding. It was first proposed in (=-=Gallagher and Bruynooghe 1991-=-, Gallagher 1991, Gallagher 1993). Definition 6 The unfold function is determinate iff for every program P and every goal G it returns an SLDNF-tree with at most one non-failing branch. Applying deter... |

62 | On the power of homeomorphic embedding for online termination - Leuschel - 1998 |

62 | Ensuring global termination of partial deduction while allowing flexible polyvariance - Martens, Gallagher - 1995 |

58 | Infinite state model checking by abstract interpretation and program specialization - Leuschel, Massart - 2000 |

58 | Controlling generalisation and polyvariance in partial deduction of normal logic programs - Leuschel, Martens, et al. - 1998 |

56 | Partial Evaluation as a Means for Inferencing Data Structures in an Applicative Language: A Theory and Implementation - Komorowski - 1982 |

51 | The ecce partial deduction system and the dppd library of benchmarks. Obtainable via http://www.ecs.soton.ac.uk/~mal - Leuschel |

51 | The 3 Rs of optimizing constraint logic programs: Refinement, removal, and reordering - MARRIOTT, STUCKEY - 1992 |

49 |
Loop checking in partial deduction
- Bol
- 1993
(Show Context)
Citation Context ...ific sub-terms. The latter is crucial to obtain good unfolding of metainterpreters (Leuschel 1998b, Leuschel 1998a). The first explicit uses of wqos to ensure termination of partial deduction are in (=-=Bol 1993-=-, Sahlin 1993). (Prestwich 1992a) presents a method which can be seen as a simple wqo: it maps atoms to so-called “patterns” (of which there are only finitely many) and unfolds every pattern at most o... |

45 | Partial Deduction and Driving are Equivalent, in
- Glück, Sørensen
- 1994
(Show Context)
Citation Context ...luation and further improvements. 6.5 Relationship to other approaches Techniques in Functional Programming. Partial deduction and related techniques in functional programming are often very similar (=-=Glück and Sørensen 1994-=-) (and cross-fertilisation has taken place). Actually, conjunctive partial deduction has in part been inspired by supercompilation of functional programming (Turchin 1986, Glück and Sørensen 1996, Sør... |

45 | An introduction to partial deduction - Komorowski - 1992 |

44 | Offline specialisation in prolog using a hand-written compiler generator. TPLP, 4(1–2):139 - Leuschel, Jørgensen, et al. - 2004 |

43 | Redundant argument filtering of logic programs - Leuschel, Sørensen - 1996 |

41 | Conjunctive partial deduction: Foundations, control, algorithms, and experiments - Schreye, Glück, et al. - 1999 |

40 | Schreye. Automatic finite unfolding using well-founded measures - Martens, De - 1996 |

38 | Logimix: A self-applicable partial evaluator for Prolog - Mogensen, Bondorf - 1992 |

37 | Unfolding-definition-folding, in this order, for avoiding unnecessary variables in logic programs - Proietti, Pettorossi - 1995 |

37 | Partial Evaluation of Prolog Programs and its Application to Meta Programming,” ICOT - Takeuchi, Furukawa - 1985 |

36 | Specialization of Lazy Functional Logic Programs, in
- Alpuente, Falaschi, et al.
- 1997
(Show Context)
Citation Context ...ams. Functional logic programming (Hanus 1994) extends both logic and functional programming. A lot of work has recently been carried out on partial deduction of such languages (Alpuente et al. 1996, =-=Alpuente et al. 1997-=-, Albert et al. 1998, Alpuente et al. 1998, Albert, Alpuente, Hanus and Vidal 1999) (treating languages based on narrowing) and (Lafave and Gallagher 1997) (treating languages based on rewriting). The... |