Results 1  10
of
78
Reasoning about Termination of Pure Prolog Programs
 Information and Computation
, 1993
"... We provide a theoretical basis for studying termination of (general) logic programs with the Prolog selection rule. To this end we study the class of left terminating programs. These are logic programs that terminate with the Prolog selection rule for all ground goals. We offer a characterization of ..."
Abstract

Cited by 130 (14 self)
 Add to MetaCart
(Show Context)
We provide a theoretical basis for studying termination of (general) logic programs with the Prolog selection rule. To this end we study the class of left terminating programs. These are logic programs that terminate with the Prolog selection rule for all ground goals. We offer a characterization of left terminating positive programs by means of the notion of an acceptable program that provides us with a practical method of proving termination. The method is illustrated by giving a simple proof of termination of the quicksort program for the desired class of goals. Then we extend this approach to the class of general logic programs by modifying the concept of acceptability. We prove that acceptable general programs are left terminating. The converse implication does not hold but we show that under the assumption of nonfloundering from ground goals every left terminating general program is acceptable. Finally, we prove that various ways of defining semantics coincide for acceptable gen...
A Semantic Basis for the Termination Analysis of Logic Programs
 Journal of Logic Programming
, 1999
"... This paper presents a formal semantic basis for the termination analysis of logic programs. The semantics exhibits the termination properties of a logic program through its binary unfoldings  a possibly infinite set of binary clauses. Termination of a program P and goal G is determined by the abs ..."
Abstract

Cited by 114 (14 self)
 Add to MetaCart
(Show Context)
This paper presents a formal semantic basis for the termination analysis of logic programs. The semantics exhibits the termination properties of a logic program through its binary unfoldings  a possibly infinite set of binary clauses. Termination of a program P and goal G is determined by the absence of an infinite chain in the binary unfoldings of P starting with G. The result is of practical use as basing termination analysis on a formal semantics facilitates both the design and implementation of analyzers. A simple Prolog interpreter for binary unfoldings coupled with an abstract domain based on symbolic norm constraints is proposed as an implementation vehicle. We illustrate its application using two recently proposed abstract domains. Both techniques are implemented using a standard CLP(R) library. The combination of an interpreter for binary unfoldings and a constraint solver simplifies the design of the analyzer and improves its efficiency significantly. 1 Introduction This ...
An Algorithm of Generalization in Positive Supercompilation
 Proceedings of ILPS'95, the International Logic Programming Symposium
, 1995
"... This paper presents a termination technique for positive supercompilation, based on notions from term algebra. The technique is not particularily biased towards positive supercompilation, but also works for deforestation and partial evaluation. It appears to be well suited for partial deduction too. ..."
Abstract

Cited by 86 (1 self)
 Add to MetaCart
This paper presents a termination technique for positive supercompilation, based on notions from term algebra. The technique is not particularily biased towards positive supercompilation, but also works for deforestation and partial evaluation. It appears to be well suited for partial deduction too. The technique guarantees termination, yet it is not overly conservative. Our technique can be viewed as an instance of Martens ' and Gallagher's recent framework for global termination of partial deduction, but it is more general in some important respects, e.g. it uses wellquasi orderings rather than wellfounded orderings. Its merits are illustrated on several examples.
Calculating Sized Types
 HigherOrder and Symbolic Computation
, 2001
"... Many program optimizations and analyses, such as arraybounds checking, termination analysis, etc, depend on knowing the size of a function's input and output. However, size information can be dicult to compute. Firstly, accurate size computation requires detecting a size relation between diffe ..."
Abstract

Cited by 72 (11 self)
 Add to MetaCart
(Show Context)
Many program optimizations and analyses, such as arraybounds checking, termination analysis, etc, depend on knowing the size of a function's input and output. However, size information can be dicult to compute. Firstly, accurate size computation requires detecting a size relation between different inputs of a function. Secondly, different optimizations and analyses may require slightly different size information, and thus slightly different computation. Literature in size computation has mainly concentrated on size checking, instead of size inference. In this paper, we provide a generic framework on which di erent size variants can be expressed and computed. We also describe an effective algorithm for inferring, instead of checking, size information. Size information are expressed in terms of Presburger formulae, and our algorithm utilizes the Omega Calculator to compute as exact a size information as possible, within the linear arithmetic capability.
Homeomorphic Embedding for Online Termination
 STATIC ANALYSIS. PROCEEDINGS OF SAS’98, LNCS 1503
, 1998
"... Recently wellquasi orders in general, and homeomorphic embedding in particular, have gained popularity to ensure the termination of program analysis, specialisation and transformation techniques. In this paper, ..."
Abstract

Cited by 67 (10 self)
 Add to MetaCart
Recently wellquasi orders in general, and homeomorphic embedding in particular, have gained popularity to ensure the termination of program analysis, specialisation and transformation techniques. In this paper,
Inferring Argument Size Relationships with CLP(R)
, 1996
"... . Argument size relationships are useful in termination analysis which, in turn, is important in program synthesis and goalreplacement transformations. We show how a precise analysis for interargument size relationships, formulated in terms of abstract interpretation, can be implemented straightfo ..."
Abstract

Cited by 56 (11 self)
 Add to MetaCart
. Argument size relationships are useful in termination analysis which, in turn, is important in program synthesis and goalreplacement transformations. We show how a precise analysis for interargument size relationships, formulated in terms of abstract interpretation, can be implemented straightforwardly in a language with constraint support like CLP(R) or SICStus version 3. The analysis is based on polyhedral approximations and uses a simple relaxation technique to calculate least upper bounds and a delay method to improve the precision of widening. To the best of our knowledge, and despite its simplicity, the analysis derives relationships to an accuracy that is either comparable or better than any existing technique. 1 Introduction Termination analysis is important in program synthesis, goalreplacement transformations and is also likely to be useful in offline partial deduction. Termination analysis is usually necessary in synthesis since synthesis often only guarantees semanti...
A General Framework for Automatic Termination Analysis of Logic Programs
, 2000
"... This paper describes a general framework for automatic termination analysis of logic programs, where we understand by "termination" the finiteness of the LDtree constructed for the program and a given query. A general property of mappings from a certain subset of the branches of an infini ..."
Abstract

Cited by 49 (9 self)
 Add to MetaCart
This paper describes a general framework for automatic termination analysis of logic programs, where we understand by "termination" the finiteness of the LDtree constructed for the program and a given query. A general property of mappings from a certain subset of the branches of an infinite LDtree into a finite set is proved. From this result several termination theorems are derived, by using different finite sets. The first two are formulated for the predicate dependency and atom dependency graphs. Then a general result for the case of the querymapping pairs relevant to a program is proved (cf. [29,21]). The correctness of the TermiLog system described in [22] follows from it. In this system it is not possible to prove termination for programs involving arithmetic predicates, since the usual order for the integers is not wellfounded. A new method, which can be easily incorporated in TermiLog or similar systems, is presented, which makes it possible to prove termination for programs involving arithmetic predicates. It is based on combining a finite abstraction of the integers with the technique of the querymapping pairs, and is essentially capable of dividing a termination proof into several cases, such that a simple termination function suffices for each case. Finally several possible extensions are outlined. Key words termination of logic programs  abstract interpretation  constraints ? This research has been partially supported by grants from the Israel Science Foundation 2 Nachum Dershowitz et al. 1
Termination of Nested and Mutually Recursive Algorithms
, 1996
"... This paper deals with automated termination analysis for functional programs. Previously developed methods for automated termination proofs of functional programs often fail for algorithms with nested recursion and they cannot handle algorithms with mutual recursion. We show that termination proofs ..."
Abstract

Cited by 44 (9 self)
 Add to MetaCart
This paper deals with automated termination analysis for functional programs. Previously developed methods for automated termination proofs of functional programs often fail for algorithms with nested recursion and they cannot handle algorithms with mutual recursion. We show that termination proofs for nested and mutually recursive algorithms can be performed without having to prove the correctness of the algorithms simultaneously. Using this result, nested and mutually recursive algorithms do no longer constitute a special problem and the existing methods for automated termination analysis can be extended to nested and mutual recursion in a straightforward way. We give some examples of algorithms whose termination can now be proved automatically (including wellknown challenge problems such as McCarthy's f_91 function).
Mode and Termination Checking for HigherOrder Logic Programs
 In Hanne Riis Nielson, editor, Proceedings of the European Symposium on Programming
, 1996
"... . We consider how mode (such as input and output) and termination properties of typed higherorder constraint logic programming languages may be declared and checked effectively. The systems that we present have been validated through an implementation and numerous case studies. 1 Introduction Jus ..."
Abstract

Cited by 41 (11 self)
 Add to MetaCart
(Show Context)
. We consider how mode (such as input and output) and termination properties of typed higherorder constraint logic programming languages may be declared and checked effectively. The systems that we present have been validated through an implementation and numerous case studies. 1 Introduction Just like other paradigms logic programming benefits tremendously from types. Perhaps most importantly, types allow the early detection of errors when a program is checked against a type specification. With some notable exceptions most type systems proposed for logic programming languages to date (see [18]) are concerned with the declarative semantics of programs, for example, in terms of manysorted, ordersorted, or higherorder logic. Operational properties of logic programs which are vital for their correctness can thus neither be expressed nor checked and errors will remain undetected. In this paper we consider how the declaration and checking of mode (such as input and output) and termina...
A SelfApplicable Partial Evaluator for the Logic Programming Language Godel
"... Partial evaluation is a program specialisation technique that has been shown to have great potential in logic programming, particularly for the specialisation of metainterpreters by the socalled “Futamura Projections”. Metainterpreters and other metaprograms are programs which use another progra ..."
Abstract

Cited by 40 (1 self)
 Add to MetaCart
(Show Context)
Partial evaluation is a program specialisation technique that has been shown to have great potential in logic programming, particularly for the specialisation of metainterpreters by the socalled “Futamura Projections”. Metainterpreters and other metaprograms are programs which use another program as data. In this thesis we describe a partial evaluator for metaprograms in the logic programming language Gödel. Gödel is a declarative, generalpurpose language which provides a number of higherlevel programming features, including extensive support for metaprogramming with a ground representation. The ground representation is a standard tool in mathematical logic in which object level variables are represented by ground terms at the metalevel. The ground representation is receiving increasing recognition as being essential for declarative metaprogramming, although the computational expense that it incurs has largely precluded its use in the past. This thesis extends the basic techniques of partial evaluation to the facilities of Gödel. Particular attention is given to the specialisation of the inherent overheads of metaprograms which use a ground representation and the foundations of a methodology for Gödel metaprograms are laid down. The soundness of the partial evaluation techniques is proved and these techniques are incorporated into a declarative partial evaluator. We describe the implementation and provide termination and correctness proofs for the partial evaluator SAGE, an automatic program specialiser based upon sound finite unfolding that is able to specialise any Gödel metaprogram (or indeed, any Gödel program at all). A significant illustration of the success of our techniques for specialising metaprograms which use a ground representation is provided by the selfapplication of this partial evaluator. We use the partial evaluator to specialise itself with respect to a range of metaprograms. By virtue of its selfapplicability SAGE has been used to produce a compilergenerator, which we believe shall prove to be an immensely powerful and useful tool for metaprogramming.