755,042 research outputs found

    Proving termination through conditional termination

    Get PDF
    We present a constraint-based method for proving conditional termination of integer programs. Building on this, we construct a framework to prove (unconditional) program termination using a powerful mechanism to combine conditional termination proofs. Our key insight is that a conditional termination proof shows termination for a subset of program execution states which do not need to be considered in the remaining analysis. This facilitates more effective termination as well as non-termination analyses, and allows handling loops with different execution phases naturally. Moreover, our method can deal with sequences of loops compositionally. In an empirical evaluation, we show that our implementation VeryMax outperforms state-of-the-art tools on a range of standard benchmarks.Peer ReviewedPostprint (author's final draft

    Termination of Rewriting with Right-Flat Rules Modulo Permutative Theories

    Full text link
    We present decidability results for termination of classes of term rewriting systems modulo permutative theories. Termination and innermost termination modulo permutative theories are shown to be decidable for term rewrite systems (TRS) whose right-hand side terms are restricted to be shallow (variables occur at depth at most one) and linear (each variable occurs at most once). Innermost termination modulo permutative theories is also shown to be decidable for shallow TRS. We first show that a shallow TRS can be transformed into a flat (only variables and constants occur at depth one) TRS while preserving termination and innermost termination. The decidability results are then proved by showing that (a) for right-flat right-linear (flat) TRS, non-termination (respectively, innermost non-termination) implies non-termination starting from flat terms, and (b) for right-flat TRS, the existence of non-terminating derivations starting from a given term is decidable. On the negative side, we show PSPACE-hardness of termination and innermost termination for shallow right-linear TRS, and undecidability of termination for flat TRS.Comment: 20 page

    Inferring Termination Conditions for Logic Programs using Backwards Analysis

    Full text link
    This paper focuses on the inference of modes for which a logic program is guaranteed to terminate. This generalises traditional termination analysis where an analyser tries to verify termination for a specified mode. Our contribution is a methodology in which components of traditional termination analysis are combined with backwards analysis to obtain an analyser for termination inference. We identify a condition on the components of the analyser which guarantees that termination inference will infer all modes which can be checked to terminate. The application of this methodology to enhance a traditional termination analyser to perform also termination inference is demonstrated

    Automated Termination Analysis for Logic Programs with Cut

    Full text link
    Termination is an important and well-studied property for logic programs. However, almost all approaches for automated termination analysis focus on definite logic programs, whereas real-world Prolog programs typically use the cut operator. We introduce a novel pre-processing method which automatically transforms Prolog programs into logic programs without cuts, where termination of the cut-free program implies termination of the original program. Hence after this pre-processing, any technique for proving termination of definite logic programs can be applied. We implemented this pre-processing in our termination prover AProVE and evaluated it successfully with extensive experiments

    Opportunistic Termination

    Get PDF
    If a seller delivers a good non-conforming to contract, European and US warranty law allows consumers to choose between some money transfer and termination. Termination rights are, however, widely criticized, mainly for fear that the buyer may use non-conformity as a pretext for getting rid of a contract he no longer wants. We show that this possibility of 'opportunistic termination' might actually have positive effects. Under some circumstances, it will lead to redistribution in favour of the buyer without any loss of efficiency. Moreover, by curbing the monopoly power of the seller, a regime involving termination might increase welfare by enabling a more efficient output level in a setting with multiple buyers

    Automatic Termination Analysis of Programs Containing Arithmetic Predicates

    Full text link
    For logic programs with arithmetic predicates, showing termination is not easy, since the usual order for the integers is not well-founded. A new method, easily incorporated in the TermiLog system for automatic termination analysis, is presented for showing termination in this case. The method consists of the following steps: First, a finite abstract domain for representing the range of integers is deduced automatically. Based on this abstraction, abstract interpretation is applied to the program. The result is a finite number of atoms abstracting answers to queries which are used to extend the technique of query-mapping pairs. For each query-mapping pair that is potentially non-terminating, a bounded (integer-valued) termination function is guessed. If traversing the pair decreases the value of the termination function, then termination is established. Simple functions often suffice for each query-mapping pair, and that gives our approach an edge over the classical approach of using a single termination function for all loops, which must inevitably be more complicated and harder to guess automatically. It is worth noting that the termination of McCarthy's 91 function can be shown automatically using our method. In summary, the proposed approach 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. Consequently, the whole process of proving termination can be done automatically in the framework of TermiLog and similar systems.Comment: Appeared also in Electronic Notes in Computer Science vol. 3
    • …
    corecore