## Logic program specialisation (1999)

### Cached

### Download Links

- [repository.readscheme.org]
- [www.stups.uni-duesseldorf.de]
- [www.stups.uni-duesseldorf.de]
- DBLP

### Other Repositories/Bibliography

Venue: | Partial Evaluation: Practice and Theory, LNCS 1706 |

Citations: | 21 - 11 self |

### BibTeX

@INPROCEEDINGS{Leuschel99logicprogram,

author = {Michael Leuschel},

title = {Logic program specialisation},

booktitle = {Partial Evaluation: Practice and Theory, LNCS 1706},

year = {1999},

pages = {155--188},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

### Citations

1951 |
Foundations of Logic Programming
- Lloyd
- 1987
(Show Context)
Citation Context ...y detail is required for the proper comprehension of this course and this section is mainly meant to be a kind of “reference manual” of logic programming. The exposition is mainly inspired by [5] and =-=[68]-=- and in general adheres to the same terminology. The reader is referred to these works for a more detailed presentation, comprising motivations, examples and proofs. Some other good introductions to l... |

996 |
A machine-oriented logic based on the resolution principle
- Robinson
- 1965
(Show Context)
Citation Context ...ur in S. is called a most general unifier or mgu iff for each unifier of S there exists a substitutionssuch that = . The concept of unification dates back to [45] and has been rediscovered in =-=[87]-=-. If a unifier for a finite set S of expressions exists then there exists an idempotent and relevant most general unifier which is unique modulo variable renaming (see [5,68]). Unifiability of a set o... |

992 |
Negation as Failure
- Clark
- 1978
(Show Context)
Citation Context ... correctness results for partial deduction (e.g., [68]), to be introduced in the next section, use this definition anyway. Soundness of SLDNF-resolution (wrt the completion semantics) is due to Clark =-=[22]-=-. Unfortunately SLDNF-resolution is in general not complete, mainly (but not only) due to floundering, i.e., computation reaches a state in which only non-ground negative literals exist. To remedy the... |

804 | Constraint Logic Programming: A Survey
- Jaffar, Maher
- 1994
(Show Context)
Citation Context ...uction for a set of atoms, to produce it for a set of constrained atoms. A constrained atom is a formula of the form C ✷ A, where A is an ordinary atom and C a constraint over some domain D (see also =-=[21]-=-). The set of “proper” instances (called concretisations) of a constrained atom C ✷ A are then all the atoms Aθ such that Cθ holds in D. [31] then achieves the preservation of characteristic trees by ... |

790 | Rewrite systems
- Dershowitz, Jouannand
- 1990
(Show Context)
Citation Context ...ating that claim. An interesting wqo is the homeomorphic embedding relation , which derives from results by Higman [46] and Kruskal [57]. It has been used in the context of term rewriting systems in =-=[29,30]-=-, and adapted for use in supercompilation [98] in [91]. The following is the definition from [91], which adapts the pure homeomorphic embedding from [30] by adding a rudimentary treatment of variables... |

790 |
Introduction to Metamathematics
- Kleene
- 1952
(Show Context)
Citation Context ... illustrated in Fig. 2. The program P S is also called the residual program. The theoretical feasibility of this process, in the context of recursive functions, has already been established by Kleene =-=[52]-=- and is known as Kleene’s S-M-N theorem. However, while Kleene was concerned with theoretical issues of computability and his construction yields specialised programs which are slower than the origina... |

752 | The Semantics of Predicate Logic as Programming Language
- Emden, Kowalski
- 1976
(Show Context)
Citation Context ...ed to as anti-unification or least general generalisation. We can now define SLD-resolution, which is based on the resolution principle [87]. Its use for a programming language was first described in =-=[56]-=- and the name SLD (which stands for Selection rule-driven Linear resolution for Definite clauses), was coined in [9]. See e.g., [5,68] for more details about the history. Definition 18. (SLD-derivatio... |

677 |
Partial Evaluation and Automatic Program Generation
- Jones, Gomard, et al.
- 1993
(Show Context)
Citation Context ...e partial evaluator, resulting in a more efficient specialised program P e . Partial evaluation [24,50] has been applied to a lot of programming languages and paradigms: functional programming (e.g., =-=[51]-=-), logic programming (e.g., [40,55,81]), functional logic programming (e.g., [1,2,58]) term rewriting systems (e.g., [13,14], [75]) and imperative programming (e.g., [4,3]). In the context of logic pr... |

651 |
The Art of Prolog
- Sterling, Shapiro
- 1986
(Show Context)
Citation Context ...p(t 1 ; : : : ; t n ) in case n = 0. f(t 1 ; : : : ; t n ) then simply represents the term f and p(t 1 ; : : : ; t n ) represents the atom p. For terms representing lists we will use the usual Prolog =-=[28,95,23]-=- notation: e.g., [ ] denotes the empty list, [H jT ] denotes a non-empty list with first element H and tail T and [a; b] denotes a two-element list made up using a and b. Definition 3. (formula) A (we... |

618 | J.A.: Transformation System for Developing Recursive Programs
- Burstall, Darlington
- 1977
(Show Context)
Citation Context ...so evaluate expressions which depend on the unknown dynamic input. This puts partial deduction much closer to techniques such as supercompilation [98,43,93,90] and unfold/fold program transformations =-=[19,81]-=-, and therefore using a different denomination seems justified. We will briefly return to the relation of partial deduction to these and other techniques in the second part of this course [60] (see al... |

575 | Program Analysis and Specialization for the C Programming Language
- Andersen
- 1994
(Show Context)
Citation Context ...functional programming (e.g., [51]), logic programming (e.g., [40,55,81]), functional logic programming (e.g., [1,2,58]) term rewriting systems (e.g., [13,14], [75]) and imperative programming (e.g., =-=[4,3]-=-). In the context of logic programming, full input to a program P consists of a goal G and evaluation corresponds to constructing a complete SLDNF-tree for P [ fGg. For partial evaluation, the static ... |

474 | Termination of rewriting
- Dershowitz
- 1987
(Show Context)
Citation Context ...ating that claim. An interesting wqo is the homeomorphic embedding relation , which derives from results by Higman [46] and Kruskal [57]. It has been used in the context of term rewriting systems in =-=[29,30]-=-, and adapted for use in supercompilation [98] in [91]. The following is the definition from [91], which adapts the pure homeomorphic embedding from [30] by adding a rudimentary treatment of variables... |

445 |
First-order logic and automated theorem proving
- Fitting
- 1990
(Show Context)
Citation Context ...mples and proofs. Some other good introductions to logic programming can also be found in [78] and [33,6], while a good introduction to first-order logic and automated theorem proving can be found in =-=[36]-=-. 2.1 First-order logic and syntax of logic programs We start with a brief presentation of first-order logic. Definition 1. (alphabet) An alphabet consists of the following classes of symbols: variabl... |

439 |
Meta-Logics and Logic Programming
- Apt, Turini
- 1995
(Show Context)
Citation Context ...Not every detail is required for the proper comprehension of this course and this section is mainly meant to be a kind of “reference manual” of logic programming. The exposition is mainly inspired by =-=[5]-=- and [68] and in general adheres to the same terminology. The reader is referred to these works for a more detailed presentation, comprising motivations, examples and proofs. Some other good introduct... |

432 | Deforestation: transforming programs to eliminate trees
- Wadler
- 1990
(Show Context)
Citation Context ...shed in a single traversal. 3.2 Deforestation In this section we show how conjunctive partial deduction can be used to get rid of intermediate data structures, something which is called deforestation =-=[49]-=-.s← append(X, Y, I) ∧ append(I, Z, R) ✟ ❍ (1) ✟ ✟ ❍❍❍❥ (2) ✟✙ ← append(Y, Z, R) ← append(X ′ , Y, I ′ ) ∧ append([H|I ′ ], Z, R) (2) ❄ ← append(X ′ , Y, I ′ ) ∧ append(I ′ , Z, R ′ ) Fig. 7. SLD-tree ... |

351 | An efficient unification algorithm
- Martelli, Montanari
- 1982
(Show Context)
Citation Context ...ssions is decidable and there are efficient algorithms for calculating an idempotent and relevant mgu. See for instance the unification algorithms in [5,68] or the more complicated but linear ones in =-=[70,80]-=-. From now on we denote, for a unifiable set S of expressions, by mgu(S) an idempotent and relevant unifier of S. If we just want to unify two terms t 1 ; t 2 then we will also sometimes write mgu(t 1... |

309 |
Ordering by divisibility in abstract algebras
- Higman
- 1952
(Show Context)
Citation Context ...ndle metainterpreters and metalevel encodings. See [61] for formal results substantiating that claim. An interesting wqo is the homeomorphic embedding relation , which derives from results by Higman =-=[46]-=- and Kruskal [57]. It has been used in the context of term rewriting systems in [29,30], and adapted for use in supercompilation [98] in [91]. The following is the definition from [91], which adapts t... |

301 | Abstract interpretation and application to logic programs
- Cousot, Cousot
- 1992
(Show Context)
Citation Context ...or tupling in logic programming one often needs an additional analysis to ensure that termination is preserved [3, 2]. 4 Incorporating Abstract Interpretation The main idea of abstract interpretation =-=[8, 4, 20]-=- is to analyse programs by executing them over some abstract domain. This is done in such a way as to ensure termination of the abstract interpretation and to ensure that the so derived results are a ... |

289 |
On Closed World Data Bases
- Reiter
- 1978
(Show Context)
Citation Context ...s impossible to accomplish within first-order logic (see e.g., Corollary 4.10.1 in [27] for a formal proof). A possible inference scheme, capturing this aspect of logic programming, was introduced in =-=[86]-=- and is referred to as the closed world assumption (CWA). The CWA cannot be expressed in first-order logic (a second-order logic axiom has to be used to that effect). Note that using the CWA leads to ... |

264 |
The Godel Programming Language
- Hill, Lloyd
- 1994
(Show Context)
Citation Context ...es no problems as long as, when selecting such a built-in, only a finite number of cases apply (Prolog will report a run-time error if more than one case applies while the programming language Gödel =-=[47]-=- will delay the selection until only one case applies). In the remainder of this course we will usually restrict our attention to those built-ins that can be given a logical meaning by such a mapping.... |

254 |
Partial evaluation in logic programming
- Lloyd, Shepherdson
- 1991
(Show Context)
Citation Context ...iently instantiated. These built-ins are then also registered within the characteristic trees (see [27]). 3 Conjunctive Partial Deduction Partial deduction, based upon the Lloyd-Shepherdson framework =-=[35]-=-, specialises a set of atoms. Even though conjunctions may appear within the SLDNF-trees constructed for these atoms, only atoms are allowed at the global level. In other words, when we stop unfolding... |

250 | Logic programming and negation: a survey
- Apt, Bol
- 1994
(Show Context)
Citation Context ...d model. To give a meaning to normal logic programs a multitude of semantics have been developed. We cannot delve into the details of these semantics and have to refer the interested reader to, e.g., =-=[7]-=-. 2.3 Proof theory of logic programs We first need the following definitions: Definition 12. (substitution) A substitution is a finite set of the form = fX 1 =t 1 ; : : : ; X n =t n g where X 1 ; ... |

239 | Tutorial notes on partial evaluation
- Consel, Danvy
- 1993
(Show Context)
Citation Context ...control of the loop in P is fully determined by the static input e = 3 and was executed beforehand by the partial evaluator, resulting in a more efficient specialised program P e . Partial evaluation =-=[24,50]-=- has been applied to a lot of programming languages and paradigms: functional programming (e.g., [51]), logic programming (e.g., [40,55,81]), functional logic programming (e.g., [1,2,58]) term rewriti... |

231 |
Unification revisited
- Lassez, Maher, et al.
- 1988
(Show Context)
Citation Context ...lisation of a finite set of expressions S, also denoted by msg(S), which is the most specific expression M such that all expressions in S are instances of M . Algorithms for calculating the msg exist =-=[59]-=-, and this process is also referred to as anti-unification or least general generalisation. We can now define SLD-resolution, which is based on the resolution principle [87]. Its use for a programming... |

209 | Proving termination with multiset orderings
- Dershowitz, Manna
(Show Context)
Citation Context ...proaches to ensure termination of unfolding exist. The methods in [18,73,72,71] are based on well-founded orders, inspired by their usefulness in the context of static termination analysis (see e.g., =-=[31,25]-=-). These techniques ensure termination, while at the same time allowing unfolding related to the structural aspect of the program and goal to be partially deduced, e.g., permitting the consumption of ... |

205 | A practical framework for the abstract interpretation of logic programs
- Bruynooghe
- 1991
(Show Context)
Citation Context ...or tupling in logic programming one often needs an additional analysis to ensure that termination is preserved [3, 2]. 4 Incorporating Abstract Interpretation The main idea of abstract interpretation =-=[8, 4, 20]-=- is to analyse programs by executing them over some abstract domain. This is done in such a way as to ensure termination of the abstract interpretation and to ensure that the so derived results are a ... |

201 | From logic programming to Prolog - Apt - 1996 |

194 |
Contributions to the Theory of Logic Programming
- Apt, Emden
- 1982
(Show Context)
Citation Context ...solution principle [87]. Its use for a programming language was first described in [56] and the name SLD (which stands for Selection rule-driven Linear resolution for Definite clauses), was coined in =-=[9]-=-. See e.g., [5,68] for more details about the history. Definition 18. (SLD-derivation step) Let G = L 1 ; : : : ; L m ; : : : ; L k be a goal and C = AsB 1 ; : : : ; B n a program clause such that k ... |

183 | The concept of a supercompiler
- Turchin
(Show Context)
Citation Context ... the pruning possible for p(a) and p(b) has been preserved: p(X) ← q(X) The approach in [31] is more general and constraints are also propagated globally (i.e., in the terminology of supercompilation =-=[44, 19, 43, 42]-=-, one can “drive negative information”). On the other hand, the method in [33] is conceptually simpler and can handle any unfolding rule as well as normal logic programs, while the concrete algorithm ... |

154 |
M.N.: Linear unification
- Paterson, Wegman
- 1978
(Show Context)
Citation Context ...ssions is decidable and there are efficient algorithms for calculating an idempotent and relevant mgu. See for instance the unification algorithms in [5,68] or the more complicated but linear ones in =-=[70,80]-=-. From now on we denote, for a unifiable set S of expressions, by mgu(S) an idempotent and relevant unifier of S. If we just want to unify two terms t 1 ; t 2 then we will also sometimes write mgu(t 1... |

153 | Tutorial on specialisation of logic programs
- Gallagher
- 1993
(Show Context)
Citation Context ...interest of (also) examining the “essential structure” of the SLDNF-trees generated for the atoms to be partially deduced. This leads to the definition of characteristic trees, initially presented in =-=[13, 12]-=- and later exploited in [31, 33], which abstracts SLDNF-trees by only remembering, for the non-failing branches 1 : 1 The failing branches do not materialise within the residual code and it is not int... |

145 |
Termination of Logic Programs: The NeverEnding Story
- Decorte
(Show Context)
Citation Context ...proaches to ensure termination of unfolding exist. The methods in [18,73,72,71] are based on well-founded orders, inspired by their usefulness in the context of static termination analysis (see e.g., =-=[31,25]-=-). These techniques ensure termination, while at the same time allowing unfolding related to the structural aspect of the program and goal to be partially deduced, e.g., permitting the consumption of ... |

143 | Transformation of logic programs: Foundations and techniques
- Pettorossi, Proietti
- 1994
(Show Context)
Citation Context ...deduction is incapable of translating multiple visits of the same data structure into a single visit (called tupling); something which can be achieved using unfold/fold program transformation methods =-=[39]-=-. To overcome this limitation, [32, 17, 27] present a minimal extension to partial deduction, called conjunctive partial deduction. This technique extends the standard partial deduction approach by si... |

143 | An introduction to partial evaluation
- Jones
- 1996
(Show Context)
Citation Context ...control of the loop in P is fully determined by the static input e = 3 and was executed beforehand by the partial evaluator, resulting in a more efficient specialised program P e . Partial evaluation =-=[24,50]-=- has been applied to a lot of programming languages and paradigms: functional programming (e.g., [51]), logic programming (e.g., [40,55,81]), functional logic programming (e.g., [1,2,58]) term rewriti... |

133 |
Constructive negation based on the completed database
- Chan
- 1988
(Show Context)
Citation Context ...xist. To remedy the incompleteness of SLDNF, several extensions have been proposed. Let us briefly mention the approach of constructive negation overcomes some of the incompleteness problems of SLDNF =-=[20,21,34,89,97,96]-=- and can be useful inside partial deduction [44]. The main idea is to allow the selection of non-ground negative literals, replacing them by disequality constraints. For instance, given P = fp(a)sg th... |

126 |
Deriving descriptions of possible values of program variables by means of abstract interpretation
- Janssens, Bruynooghe
- 1992
(Show Context)
Citation Context ...at a query ← app last(L, X) only produces answers where X = a. Unfortunately, this is not the case. Even more surprisingly, most abstract interpretation techniques proposed in the literature, such as =-=[22, 15, 37]-=-, on their own are incapable of deriving this result. This is a very simple example where a statically known value (a) is stored (using append) in an unknown datastructure (L) and then later consulted... |

121 | Negation and constraint logic programming
- Stuckey
- 1995
(Show Context)
Citation Context ...xist. To remedy the incompleteness of SLDNF, several extensions have been proposed. Let us briefly mention the approach of constructive negation overcomes some of the incompleteness problems of SLDNF =-=[20,21,34,89,97,96]-=- and can be useful inside partial deduction [44]. The main idea is to allow the selection of non-ground negative literals, replacing them by disequality constraints. For instance, given P = fp(a)sg th... |

113 | An Automatic Partial Evaluator for Full Prolog
- Sahlin
- 1991
(Show Context)
Citation Context ...unded order on selected atoms guarantees termination, but, on its own, can lead to overly eager unfolding. – homeomorphic embedding [91,65] Instead of well-founded ones, well-quasi orders can be used =-=[12,88]-=-. Homeomorphic embedding on selected atoms has recently gained popularity as the basis for such an order. As shown in [61] the homeomorphic embedding relation is strictly more powerful than a large cl... |

103 | Fast and Precise Regular Approximations of Logic Programs
- Gallagher, Waal
- 1994
(Show Context)
Citation Context ...at a query ← app last(L, X) only produces answers where X = a. Unfortunately, this is not the case. Even more surprisingly, most abstract interpretation techniques proposed in the literature, such as =-=[22, 15, 37]-=-, on their own are incapable of deriving this result. This is a very simple example where a statically known value (a) is stored (using append) in an unknown datastructure (L) and then later consulted... |

90 |
Higher-order extensions to PROLOG: Are they needed
- Warren
- 1982
(Show Context)
Citation Context ...with the same computed answer fR=[1; 0; 1]g. This means that some predicates like map=3, which are usually taken to be higherorder, can simply be mapped to pure definite (first-order) logic programs (=-=[99,77]-=-). Some built-ins, like for instance is=2, have to be defined by infinite relations. Usually this poses no problems as long as, when selecting such a built-in, only a finite number of cases apply (Pro... |

87 | A positive supercompiler
- Sørensen, Glück, et al.
- 1996
(Show Context)
Citation Context ... the pruning possible for p(a) and p(b) has been preserved: p(X) ← q(X) The approach in [31] is more general and constraints are also propagated globally (i.e., in the terminology of supercompilation =-=[44, 19, 43, 42]-=-, one can “drive negative information”). On the other hand, the method in [33] is conceptually simpler and can handle any unfolding rule as well as normal logic programs, while the concrete algorithm ... |

87 |
From Logic to Logic Programming
- Doets
- 1994
(Show Context)
Citation Context .... The reader is referred to these works for a more detailed presentation, comprising motivations, examples and proofs. Some other good introductions to logic programming can also be found in [78] and =-=[33,6]-=-, while a good introduction to first-order logic and automated theorem proving can be found in [36]. 2.1 First-order logic and syntax of logic programs We start with a brief presentation of first-orde... |

85 | Partial Evaluation of Functional Logic Programs
- Alpuente, Falaschi, et al.
- 1998
(Show Context)
Citation Context ...ial evaluation [24,50] has been applied to a lot of programming languages and paradigms: functional programming (e.g., [51]), logic programming (e.g., [40,55,81]), functional logic programming (e.g., =-=[1,2,58]-=-) term rewriting systems (e.g., [13,14], [75]) and imperative programming (e.g., [4,3]). In the context of logic programming, full input to a program P consists of a goal G and evaluation corresponds ... |

79 | Global Flow Analysis as a Practical Compilation Tool
- Hermenegildo, Warren, et al.
- 1992
(Show Context)
Citation Context ...or tupling in logic programming one often needs an additional analysis to ensure that termination is preserved [3, 2]. 4 Incorporating Abstract Interpretation The main idea of abstract interpretation =-=[8, 4, 20]-=- is to analyse programs by executing them over some abstract domain. This is done in such a way as to ensure termination of the abstract interpretation and to ensure that the so derived results are a ... |

77 | An algorithm of generalization in positive supercompilation
- Sørensen, Glück
- 1995
(Show Context)
Citation Context ...ell-founded orders [18,73,72,71] Imposing some (essentially) well-founded order on selected atoms guarantees termination, but, on its own, can lead to overly eager unfolding. – homeomorphic embedding =-=[91,65]-=- Instead of well-founded ones, well-quasi orders can be used [12,88]. Homeomorphic embedding on selected atoms has recently gained popularity as the basis for such an order. As shown in [61] the homeo... |

74 |
Towards an Automated Tupling Strategy
- Chin
- 1993
(Show Context)
Citation Context ...ve partial deduction can perform deforestation and tupling, supercompilation [19, 43] is incapable of achieving tupling. On the other hand, the techniques developed for tupling of functional programs =-=[5, 6]-=- 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 to elegantly represe... |

70 |
The derivation of an algorithm for program specialisation
- Gallagher, Bruynooghe
- 1991
(Show Context)
Citation Context ...interest of (also) examining the “essential structure” of the SLDNF-trees generated for the atoms to be partially deduced. This leads to the definition of characteristic trees, initially presented in =-=[13, 12]-=- and later exploited in [31, 33], which abstracts SLDNF-trees by only remembering, for the non-failing branches 1 : 1 The failing branches do not materialise within the residual code and it is not int... |

65 |
A general criterion for avoiding infinite unfolding during partial deduction of logic programs
- Bruynooghe, Schreye, et al.
- 1992
(Show Context)
Citation Context ...ailure at a deeper level. Methods solely based on this heuristic, apart from not guaranteeing termination, tend not to worsen a program, but are often somewhat too conservative. – well-founded orders =-=[18,73,72,71]-=- Imposing some (essentially) well-founded order on selected atoms guarantees termination, but, on its own, can lead to overly eager unfolding. – homeomorphic embedding [91,65] Instead of well-founded ... |

65 | On the power of homeomorphic embedding for online termination
- Leuschel
- 1998
(Show Context)
Citation Context ...edding [91,65] Instead of well-founded ones, well-quasi orders can be used [12,88]. Homeomorphic embedding on selected atoms has recently gained popularity as the basis for such an order. As shown in =-=[61]-=- the homeomorphic embedding relation is strictly more powerful than a large class of well-founded orders. We will examine the above concepts in somewhat more detail. First the notion of determinate un... |

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