Results 1 - 10
of
54
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 117 (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...
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 66 (2 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 well-quasi orderings rather than well-founded orderings. Its merits are illustrated on several examples.
Calculating Sized Types
- Higher-Order and Symbolic Computation
, 2001
"... Many program optimizations and analyses, such as array-bounds 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 ..."
Abstract
-
Cited by 48 (9 self)
- Add to MetaCart
Many program optimizations and analyses, such as array-bounds 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.
Strong Termination of Logic Programs
, 1993
"... this paper appeared as [B]. 1. INTRODUCTION Termination of logic programs is of course of utmost importance. The question whether the top-down evaluation of a goal G terminates with respect to a logic program P is actually underspecified, given the fact that this evaluation may depend on the selecti ..."
Abstract
-
Cited by 46 (1 self)
- Add to MetaCart
this paper appeared as [B]. 1. INTRODUCTION Termination of logic programs is of course of utmost importance. The question whether the top-down evaluation of a goal G terminates with respect to a logic program P is actually underspecified, given the fact that this evaluation may depend on the selection of atoms from goals and on the choice of the program clauses. In this paper termination is considered in the strong sense, i.e. irrespective of the selection of atoms in the goal and of the choice of the program clauses. This is the most demanding notion of termination. Less demanding approaches are: (1) termination for a fixed selection rule and for any choice of program clauses; (2) termination for some selection rule, depending on P, G and annotations on G, and for any choice of program clauses. All approaches can be weakened by requiring termination not for any but only for some
Modular Termination Proofs for Logic and Pure Prolog Programs
- ADVANCES IN LOGIC PROGRAMMING THEORY
, 1993
"... We provide a uniform and simplified presentation of the methods of Bezem [Bez93] (first published as [Bez89]) and of Apt and Pedreschi [AP93] (first published as [AP90]) for proving termination of logic and Prolog programs. Then we show how these methods can be refined so that they can be used in ..."
Abstract
-
Cited by 41 (5 self)
- Add to MetaCart
We provide a uniform and simplified presentation of the methods of Bezem [Bez93] (first published as [Bez89]) and of Apt and Pedreschi [AP93] (first published as [AP90]) for proving termination of logic and Prolog programs. Then we show how these methods can be refined so that they can be used in a modular way.
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 LD-tree constructed for the program and a given query. A general property of mappings from a certain subset of the branches of an infinite LD-tree ..."
Abstract
-
Cited by 38 (8 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 LD-tree constructed for the program and a given query. A general property of mappings from a certain subset of the branches of an infinite LD-tree 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 query-mapping 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 well-founded. 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 query-mapping 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 38 (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 well-known challenge problems such as McCarthy's f_91 function).
Termination analysis for functional programs using term orderings
- IN PROCEEDINGS OF THE SECOND INTERNATIONAL STATIC ANALYSIS SYMPOSIUM, LNCS 983
, 1995
"... To prove the termination of a functional program there has to be a well-founded ordering such that the arguments in each recursive call are smaller than the corresponding inputs. In this paper we present a procedure for automated termination proofs of functional programs. In contrast to previously p ..."
Abstract
-
Cited by 31 (12 self)
- Add to MetaCart
To prove the termination of a functional program there has to be a well-founded ordering such that the arguments in each recursive call are smaller than the corresponding inputs. In this paper we present a procedure for automated termination proofs of functional programs. In contrast to previously presented methods a suited well-founded ordering does not have to be fixed in advance by the user, but can be synthesized automatically. For that purpose we use approaches developed in the area of term rewriting systems for the automated generation of suited well-founded term orderings. But unfortunately term orderings cannot be directly used for termination proofs of functional programs which call other algorithms in the arguments of their recursive calls. The reason is that while for the termination of term rewriting systems orderings between terms are needed, for functional programs we need orderings between objects of algebraic data types. Our method solves this problem and enables term orderings to be used for termination proofs of functional programs.
Termination Analysis for Mercury
, 1997
"... Since the late eighties, much progress has been made in the theory of termination analysis for logic programs. However, from a practical point of view, the significance of much of the work on termination is hard to judge, since experimental evaluations rarely get published. Here we describe and eval ..."
Abstract
-
Cited by 31 (1 self)
- Add to MetaCart
Since the late eighties, much progress has been made in the theory of termination analysis for logic programs. However, from a practical point of view, the significance of much of the work on termination is hard to judge, since experimental evaluations rarely get published. Here we describe and evaluate a termination analyzer for Mercury, a strongly typed and moded logicfunctional programming language. Mercury's high degree of referential transparency and the guaranteed availability of reliable mode information simplify the termination analysis of Mercury compared with that of other logic programming languages. We describe our termination analyzer, which uses a variant of a method developed by Plumer. It deals with full Mercury, including modules, declarative input/output, the foreign language interface, and higher-order features. In spite of these obstacles, it produces high-quality termination information, comparable to the results recently obtained by Lindenstrauss and Sagiv. Most i...
A Transformational Methodology for Proving Termination of Logic Programs
, 1991
"... this paper, we present a transformational approach for proving termination of logic programs by reducing the termination problem of logic programs to that of term rewriting systems. The termination problem of term rewriting systems has been well studied and many useful techniques and tools have been ..."
Abstract
-
Cited by 31 (5 self)
- Add to MetaCart
this paper, we present a transformational approach for proving termination of logic programs by reducing the termination problem of logic programs to that of term rewriting systems. The termination problem of term rewriting systems has been well studied and many useful techniques and tools have been developed for proving termination of term rewriting systems. The prime motivation of our approach is to facilitate the use of this vast source of termination techniques and tools in proving termination of logic programs.

