24 research outputs found
Ranking Templates for Linear Loops
We present a new method for the constraint-based synthesis of termination
arguments for linear loop programs based on linear ranking templates. Linear
ranking templates are parametrized, well-founded relations such that an
assignment to the parameters gives rise to a ranking function. This approach
generalizes existing methods and enables us to use templates for many different
ranking functions with affine-linear components. We discuss templates for
multiphase, piecewise, and lexicographic ranking functions. Because these
ranking templates require both strict and non-strict inequalities, we use
Motzkin's Transposition Theorem instead of Farkas Lemma to transform the
generated -constraint into an -constraint.Comment: TACAS 201
The Hardness of Finding Linear Ranking Functions for Lasso Programs
Finding whether a linear-constraint loop has a linear ranking function is an
important key to understanding the loop behavior, proving its termination and
establishing iteration bounds. If no preconditions are provided, the decision
problem is known to be in coNP when variables range over the integers and in
PTIME for the rational numbers, or real numbers. Here we show that deciding
whether a linear-constraint loop with a precondition, specifically with
partially-specified input, has a linear ranking function is EXPSPACE-hard over
the integers, and PSPACE-hard over the rationals. The precise complexity of
these decision problems is yet unknown. The EXPSPACE lower bound is derived
from the reachability problem for Petri nets (equivalently, Vector Addition
Systems), and possibly indicates an even stronger lower bound (subject to open
problems in VAS theory). The lower bound for the rationals follows from a novel
simulation of Boolean programs. Lower bounds are also given for the problem of
deciding if a linear ranking-function supported by a particular form of
inductive invariant exists. For loops over integers, the problem is PSPACE-hard
for convex polyhedral invariants and EXPSPACE-hard for downward-closed sets of
natural numbers as invariants.Comment: In Proceedings GandALF 2014, arXiv:1408.5560. I thank the organizers
of the Dagstuhl Seminar 14141, "Reachability Problems for Infinite-State
Systems", for the opportunity to present an early draft of this wor
Proving termination through conditional termination
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 Analysis by Learning Terminating Programs
We present a novel approach to termination analysis. In a first step, the
analysis uses a program as a black-box which exhibits only a finite set of
sample traces. Each sample trace is infinite but can be represented by a finite
lasso. The analysis can "learn" a program from a termination proof for the
lasso, a program that is terminating by construction. In a second step, the
analysis checks that the set of sample traces is representative in a sense that
we can make formal. An experimental evaluation indicates that the approach is a
potentially useful addition to the portfolio of existing approaches to
termination analysis
Complexity of Bradley-Manna-Sipma Lexicographic Ranking Functions
In this paper we turn the spotlight on a class of lexicographic ranking
functions introduced by Bradley, Manna and Sipma in a seminal CAV 2005 paper,
and establish for the first time the complexity of some problems involving the
inference of such functions for linear-constraint loops (without precondition).
We show that finding such a function, if one exists, can be done in polynomial
time in a way which is sound and complete when the variables range over the
rationals (or reals). We show that when variables range over the integers, the
problem is harder -- deciding the existence of a ranking function is
coNP-complete. Next, we study the problem of minimizing the number of
components in the ranking function (a.k.a. the dimension). This number is
interesting in contexts like computing iteration bounds and loop
parallelization. Surprisingly, and unlike the situation for some other classes
of lexicographic ranking functions, we find that even deciding whether a
two-component ranking function exists is harder than the unrestricted problem:
NP-complete over the rationals and -complete over the integers.Comment: Technical report for a corresponding CAV'15 pape
Proving termination and memory safety for programs with Pointer Arithmetic
Proving termination automatically for programs with explicit pointer arithmetic is still an open problem. To close this gap, we introduce a novel abstract domain that can track allocated memory in detail. We use it to automatically construct a symbolic execution graph that represents all possible runs of the program and that can be used to prove memory safety. This graph is then transformed into an integer transition system, whose termination can be proved by standard techniques. We implemented this approach in the automated termination prover AProVE and demonstrate its capability of analyzing C programs with pointer arithmetic that existing tools cannot handle