28,267 research outputs found
On the Termination of Logic Programs with Function Symbols
Recently there has been an increasing interest in the bottom-up evaluation of the semantics of logic programs with complex terms. The main problem due to the presence of functional symbols in the head of rules is that the corresponding ground program could be infinite and that finiteness of models and termination of the evaluation procedure is not guaranteed. This paper introduces, by deeply analyzing program structure, new decidable criteria, called safety and Gamma-acyclicity,
for checking termination of logic programs with function symbols under bottom-up evaluation. These criteria guarantee that stable models are finite and computable, as it is possible to generate
a finitely ground program equivalent to the source program. We compare new criteria with other decidable criteria known in the literature and show that the Gamma-acyclicity criterion is the most
general one. We also discuss its application in answering bound queries
Using linear constraints for logic program termination analysis
It is widely acknowledged that function symbols are an important feature in
answer set programming, as they make modeling easier, increase the expressive
power, and allow us to deal with infinite domains. The main issue with their
introduction is that the evaluation of a program might not terminate and
checking whether it terminates or not is undecidable. To cope with this
problem, several classes of logic programs have been proposed where the use of
function symbols is restricted but the program evaluation termination is
guaranteed. Despite the significant body of work in this area, current
approaches do not include many simple practical programs whose evaluation
terminates. In this paper, we present the novel classes of rule-bounded and
cycle-bounded programs, which overcome different limitations of current
approaches by performing a more global analysis of how terms are propagated
from the body to the head of rules. Results on the correctness, the complexity,
and the expressivity of the proposed approach are provided.Comment: Under consideration in Theory and Practice of Logic Programming
(TPLP
Automated Termination Proofs for Logic Programs by Term Rewriting
There are two kinds of approaches for termination analysis of logic programs:
"transformational" and "direct" ones. Direct approaches prove termination
directly on the basis of the logic program. Transformational approaches
transform a logic program into a term rewrite system (TRS) and then analyze
termination of the resulting TRS instead. Thus, transformational approaches
make all methods previously developed for TRSs available for logic programs as
well. However, the applicability of most existing transformations is quite
restricted, as they can only be used for certain subclasses of logic programs.
(Most of them are restricted to well-moded programs.) In this paper we improve
these transformations such that they become applicable for any definite logic
program. To simulate the behavior of logic programs by TRSs, we slightly modify
the notion of rewriting by permitting infinite terms. We show that our
transformation results in TRSs which are indeed suitable for automated
termination analysis. In contrast to most other methods for termination of
logic programs, our technique is also sound for logic programming without occur
check, which is typically used in practice. We implemented our approach in the
termination prover AProVE and successfully evaluated it on a large collection
of examples.Comment: 49 page
Homeomorphic Embedding for Online Termination of Symbolic Methods
Well-quasi orders in general, and homeomorphic embedding in particular, have gained popularity to ensure the termination of techniques for program analysis, specialisation, transformation, and verification. In this paper we survey and discuss this use of homeomorphic embedding and clarify the advantages of such an approach over one using well-founded orders. We also discuss various extensions of the homeomorphic embedding relation. We conclude with a study of homeomorphic embedding in the context of metaprogramming, presenting some new (positive and negative) results and open problems
Polytool: polynomial interpretations as a basis for termination analysis of Logic programs
Our goal is to study the feasibility of porting termination analysis
techniques developed for one programming paradigm to another paradigm. In this
paper, we show how to adapt termination analysis techniques based on polynomial
interpretations - very well known in the context of term rewrite systems (TRSs)
- to obtain new (non-transformational) ter- mination analysis techniques for
definite logic programs (LPs). This leads to an approach that can be seen as a
direct generalization of the traditional techniques in termination analysis of
LPs, where linear norms and level mappings are used. Our extension general-
izes these to arbitrary polynomials. We extend a number of standard concepts
and results on termination analysis to the context of polynomial
interpretations. We also propose a constraint-based approach for automatically
generating polynomial interpretations that satisfy the termination conditions.
Based on this approach, we implemented a new tool, called Polytool, for
automatic termination analysis of LPs
Recurrence with affine level mappings is P-time decidable for CLP(R)
In this paper we introduce a class of constraint logic programs such that
their termination can be proved by using affine level mappings. We show that
membership to this class is decidable in polynomial time.Comment: To appear in Theory and Practice of Logic Programming (TPLP
Non-Termination Inference of Logic Programs
We present a static analysis technique for non-termination inference of logic
programs. Our framework relies on an extension of the subsumption test, where
some specific argument positions can be instantiated while others are
generalized. We give syntactic criteria to statically identify such argument
positions from the text of a program. Atomic left looping queries are generated
bottom-up from selected subsets of the binary unfoldings of the program of
interest. We propose a set of correct algorithms for automating the approach.
Then, non-termination inference is tailored to attempt proofs of optimality of
left termination conditions computed by a termination inference tool. An
experimental evaluation is reported. When termination and non-termination
analysis produce complementary results for a logic procedure, then with respect
to the leftmost selection rule and the language used to describe sets of atomic
queries, each analysis is optimal and together, they induce a characterization
of the operational behavior of the logic procedure.Comment: Long version (algorithms and proofs included) of a paper submitted to
TOPLA
- …