Results 1  10
of
12
QuasiTerminating Logic Programs for Ensuring the Termination of Partial Evaluation
 In Proc. of the ACM SIGPLAN 2007 Workshop on Partial Evaluation and Program Manipulation (PEPM’07
, 2007
"... Abstract. A logic program strongly quasiterminates when only a finite number of distinct atoms (modulo variable renaming) are derivable from any given query and computation rule. This notion of quasitermination, though stronger than related notions that only consider Prolog’s computation rule, is ..."
Abstract

Cited by 9 (5 self)
 Add to MetaCart
(Show Context)
Abstract. A logic program strongly quasiterminates when only a finite number of distinct atoms (modulo variable renaming) are derivable from any given query and computation rule. This notion of quasitermination, though stronger than related notions that only consider Prolog’s computation rule, is essential for ensuring the termination of partial evaluation, where liberal selection policies are often mandatory to achieve a good specialization. In this paper, we introduce sufficient conditions for the strong termination and quasitermination of logic programs which are based on the construction of sizechange graphs. The class of strongly quasiterminating logic programs, however, is too restricted. Therefore, we also introduce an annotation procedure that annotates those predicate arguments which are responsible of the nonquasitermination. As a consequence, the annotated program behaves like a quasiterminating program if annotated arguments are generalized (i.e., replaced by a fresh variable) when they occur in a computation. We illustrate the usefulness of our approach by designing a simple partial evaluator in which global termination is always ensured offline (i.e., statically). A prototype implementation demonstrates its viability. 1
MONOTONICITY CONSTRAINTS FOR TERMINATION IN THE INTEGER DOMAIN
"... Abstract. SizeChange Termination (SCT) is a method of proving program termination based on the impossibility of infinite descent. To this end we use a program abstraction in which transitions are described by monotonicity constraints over (abstract) variables. When only constraints of the form x> ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
(Show Context)
Abstract. SizeChange Termination (SCT) is a method of proving program termination based on the impossibility of infinite descent. To this end we use a program abstraction in which transitions are described by monotonicity constraints over (abstract) variables. When only constraints of the form x> y ′ and x ≥ y ′ are allowed, we have sizechange graphs. In the last decade, both theory and practice have evolved significantly in this restricted framework. The crucial underlying assumption of most of the past work is that the domain of the variables is wellfounded. In a recent paper I showed how to extend and adapt some theory from the domain of sizechange graphs to general monotonicity constraints, thus complementing previous work, but remaining in the realm of wellfounded domains. However, monotonicity constraints are, interestingly, capable of proving termination also in the integer domain, which is not wellfounded. The purpose of this paper is to explore the application of monotonicity constraints in this domain. We lay the necessary theoretical foundation, and present precise decision procedures for termination; finally, we provide a procedure to construct explicit global ranking functions from monotonicity constraints in singlyexponential time, and of optimal worstcase size and dimension (ordinal). 1.
A Practical Analysis of NonTermination in Large Logic Programs
 UNDER CONSIDERATION FOR PUBLICATION IN THEORY AND PRACTICE OF LOGIC PROGRAMMING
, 2003
"... A large body of work has been dedicated to termination analysis of logic programs but until recently little has been done to analyze nontermination. In our opinion, explaining nontermination is a much more important task because it can dramatically improve a user’s ability to effectively debug larg ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
A large body of work has been dedicated to termination analysis of logic programs but until recently little has been done to analyze nontermination. In our opinion, explaining nontermination is a much more important task because it can dramatically improve a user’s ability to effectively debug large, complex logic programs without having to abide by punishing syntactic restrictions. Nontermination analysis examines program execution history when the program is suspected to not terminate and informs the programmer about the exact reasons for this behavior. In (Liang and Kifer 2013), we studied the problem of nontermination in tabled logic engines with subgoal abstraction, such as XSB, and proposed a suite of algorithms for nonTermination Analyzer, called Terminyzer. These algorithms analyze forest logging traces and output sequences of tabled subgoal calls that are the likely causes of nonterminating cycles. However, this feedback was hard to use in practice: the same subgoal could occur in multiple rule heads and in even more places in rule bodies, so Terminyzer left too much tedious work for the user to do manually. In this paper we propose a new suite of algorithms, Terminyzer+, which closes the usability
Termination of Narrowing via Termination of Rewriting
"... Narrowing extends rewriting with logic capabilities by allowing logic variables in terms and by replacing matching with unification. Narrowing has been widely used in different contexts, ranging from theorem proving (e.g., protocol verification) to language design (e.g., it forms the basis of funct ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Narrowing extends rewriting with logic capabilities by allowing logic variables in terms and by replacing matching with unification. Narrowing has been widely used in different contexts, ranging from theorem proving (e.g., protocol verification) to language design (e.g., it forms the basis of functional logic languages). Surprisingly, the termination of narrowing has been mostly overlooked. In this work, we present a novel approach for analyzing the termination of narrowing in leftlinear constructor systems—a widely accepted class of systems—that allows us to reuse existing methods in the literature on termination of rewriting.
Fast and Accurate Strong Termination Analysis with an Application to Partial Evaluation ⋆
"... Abstract. A logic program strongly terminates if it terminates for any selection rule. Clearly, considering a particular selection rule—like Prolog’s leftmost selection rule—allows one to prove more goals terminating. In contrast, a strong termination analysis gives valuable information for those ap ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. A logic program strongly terminates if it terminates for any selection rule. Clearly, considering a particular selection rule—like Prolog’s leftmost selection rule—allows one to prove more goals terminating. In contrast, a strong termination analysis gives valuable information for those applications in which the selection rule cannot be fixed in advance (e.g., partial evaluation, dynamic selection rules, parallel execution). In this paper, we introduce a fast and accurate sizechange analysis that can be used to infer conditions for both strong termination and strong quasitermination of logic programs. We also provide several ways to increase the accuracy of the analysis without sacrificing scalability. In the experimental evaluation, we show that the new algorithm is up to three orders of magnitude faster than the previous implementation, meaning that we can efficiently deal with programs exceeding 25,000 lines of Prolog. 1
Probabilistic Termination of CHRiSM Programs
"... Abstract. Termination analysis has received considerable attention in Logic Programming for several decades. In recent years, probabilistic extensions of Logic Programming languages have become increasingly important. Languages like PRISM, CPLogic, ProbLog and CHRiSM have been introduced and proved ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Termination analysis has received considerable attention in Logic Programming for several decades. In recent years, probabilistic extensions of Logic Programming languages have become increasingly important. Languages like PRISM, CPLogic, ProbLog and CHRiSM have been introduced and proved very useful for addressing problems in which a combination of logical and probabilistic reasoning is required. As far as we know, the termination of probabilistic logical programs has not received any attention in the community so far. Termination of a probabilistic program is not a crisp notion. Given a query, such a program does not simply either terminate or not terminate, but it terminates with a certain probability. In this paper, we explore this problem in the context of CHRiSM, a probabilistic extension of CHR. We formally introduce the notion of probabilistic termination. We study this concept on the basis of a number of case studies. We provide some initial sufficient conditions to characterize probabilistically terminating programs and queries. We also discuss some challengingexamplesthatrevealthecomplexityandinterestofmoregeneral settings. The paper is intended as a first step in a challenging and important new area in the analysis of Logic Programs. Keywords: TerminationAnalysis,ProbabilisticLP,ConstraintHandlingRules. 1
doi:10.1017/S1471068410000025 1 Polytool: Polynomial interpretations as a basis
, 2009
"... for termination analysis of logic programs ..."
Under consideration for publication in Theory and Practice of Logic Programming 1 SATBased Termination Analysis Using Monotonicity Constraints over the Integers∗
, 2003
"... We describe an algorithm for proving termination of programs abstracted to systems of monotonicity constraints in the integer domain. Monotonicity constraints are a nontrivial extension of the wellknown sizechange termination method. While deciding termination for systems of monotonicity constrai ..."
Abstract
 Add to MetaCart
We describe an algorithm for proving termination of programs abstracted to systems of monotonicity constraints in the integer domain. Monotonicity constraints are a nontrivial extension of the wellknown sizechange termination method. While deciding termination for systems of monotonicity constraints is PSPACE complete, we focus on a welldefined and significant subset, which we call MCNP, designed to be amenable to a SATbased solution. Our technique is based on the search for a special type of ranking function defined in terms of bounded differences between multisets of integer values. We describe the application of our approach as the backend for the termination analysis of Java Bytecode (JBC). At the frontend, systems of monotonicity constraints are obtained by abstracting information, using two different termination analyzers: AProVE and COSTA. Preliminary results reveal that our approach provides a good tradeoff between precision and cost of analysis.
Towards Predicting the Effectiveness of Partial Evaluation
"... Recent approaches to partial evaluation—a wellknown technique for program specialization—include a so called sizechange analysis for ensuring the termination of the process. This paper presents a novel application of sizechange analysis for predicting the effectiveness of partial evaluation. Size ..."
Abstract
 Add to MetaCart
(Show Context)
Recent approaches to partial evaluation—a wellknown technique for program specialization—include a so called sizechange analysis for ensuring the termination of the process. This paper presents a novel application of sizechange analysis for predicting the effectiveness of partial evaluation. Sizechange analysis is based on computing an approximation of the program loops. Here, we present an automatic transformation that takes the output of the sizechange analysis and produces an approximation of the loops in the specialized program. This information can be used for determining—before performing the actual specialization process—when partial evaluation may produce a significant improvement and when it would be useless. An experimental evaluation demonstrates the usefulness of our approach.
Under consideration for publication in Theory and Practice of Logic Programming 1 On termination of metaprograms
, 2003
"... The term metaprogramming refers to the ability of writing programs that have other programs as data and exploit their semantics. The aim of this paper is presenting a methodology allowing us to perform a correct termination analysis for a broad class of practical metainterpreters, including negati ..."
Abstract
 Add to MetaCart
(Show Context)
The term metaprogramming refers to the ability of writing programs that have other programs as data and exploit their semantics. The aim of this paper is presenting a methodology allowing us to perform a correct termination analysis for a broad class of practical metainterpreters, including negation and performing different tasks during the execution. It is based on combining the power of general orderings, used in proving termination of termrewrite systems and programs, and on the wellknown acceptability condition, used in proving termination of logic programs. The methodology establishes a relationship between the ordering needed to prove termination of the interpreted program and the ordering needed to prove termination of the metainterpreter together with this interpreted program. If such a relationship is established, termination of one of those implies termination of the other one, i.e., the metainterpreter preserves termination. Among the metainterpreters that are analysed correctly are a proof trees constructing metainterpreter, different kinds of tracers and reasoners. To appear without appendix in Theory and Practice of Logic Programming.