Results 1  10
of
75
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 126 (14 self)
 Add to MetaCart
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 99 (13 self)
 Add to MetaCart
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 74 (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.
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 62 (9 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,
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 52 (10 self)
 Add to MetaCart
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.
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 46 (8 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 41 (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 40 (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).
Deriving constraints among argument sizes in logic programs
 Ann. Math. Artif. Intell
, 1991
"... In a logic program the feasible argument sizes of derivable facts involving an nary predicate are viewed as a set of points in the positive orthant of R n. We investigate a method of deriving constraints on the feasible set in the form of a polyhedral convex set in the positive orthant, which we ca ..."
Abstract

Cited by 36 (1 self)
 Add to MetaCart
In a logic program the feasible argument sizes of derivable facts involving an nary predicate are viewed as a set of points in the positive orthant of R n. We investigate a method of deriving constraints on the feasible set in the form of a polyhedral convex set in the positive orthant, which we call a polycone. Faces of this polycone represent inequalities proven to hold among the argument sizes. These inequalities are often useful for selecting an evaluation method that is guaranteed to terminate for a given logic procedure. The methods may be applicable to other languages in which the sizes of data structures can be determined syntactically. For any atomic formula (atom, for short) in a rule, we show how to express the vector of its argument sizes as a system of linear equations and inequalities involving sizes of the logical variables that occur in it. This system denes a polycone, which represents the set of feasible argument size vectors. Transformations combine polycones for all atoms in one rule to give the feasible polycone for the entire rule. We introduce a generalized Tucker representation for systems of linear equations. We prove that every polycone has a unique normal form in this representation, and give an algorithm to produce it. This in turn gives a decision procedure for the question of whether two set of linear equations de ne the same polycone. When a predicate has several rules, the union of the individual rule's polycones gives the set of feasible argument size vectors for the predicate. Because this set is not necessarily convex, we instead operate with the smallest enclosing polycone, which is the closure of the convex hull of the union. Retaining convexity is one of the key features of our technique. Recursion is handled by nding a polycone that is a xpoint of a transformation that is derived from both the recursive and nonrecursive rules. Some methods for nding a xpoint are presented, but there are many unresolved problems in this area.
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 34 (11 self)
 Add to MetaCart
. 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...