182 research outputs found
CTL+FO Verification as Constraint Solving
Expressing program correctness often requires relating program data
throughout (different branches of) an execution. Such properties can be
represented using CTL+FO, a logic that allows mixing temporal and first-order
quantification. Verifying that a program satisfies a CTL+FO property is a
challenging problem that requires both temporal and data reasoning. Temporal
quantifiers require discovery of invariants and ranking functions, while
first-order quantifiers demand instantiation techniques. In this paper, we
present a constraint-based method for proving CTL+FO properties automatically.
Our method makes the interplay between the temporal and first-order
quantification explicit in a constraint encoding that combines recursion and
existential quantification. By integrating this constraint encoding with an
off-the-shelf solver we obtain an automatic verifier for CTL+FO
Termination of Triangular Integer Loops is Decidable
We consider the problem whether termination of affine integer loops is
decidable. Since Tiwari conjectured decidability in 2004, only special cases
have been solved. We complement this work by proving decidability for the case
that the update matrix is triangular.Comment: Full version (with proofs) of a paper published in the Proceedings of
the 31st International Conference on Computer Aided Verification (CAV '19),
New York, NY, USA, Lecture Notes in Computer Science, Springer-Verlag, 201
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
On Multiphase-Linear Ranking Functions
Multiphase ranking functions () were proposed as a means
to prove the termination of a loop in which the computation progresses through
a number of "phases", and the progress of each phase is described by a
different linear ranking function. Our work provides new insights regarding
such functions for loops described by a conjunction of linear constraints
(single-path loops). We provide a complete polynomial-time solution to the
problem of existence and of synthesis of of bounded depth
(number of phases), when variables range over rational or real numbers; a
complete solution for the (harder) case that variables are integer, with a
matching lower-bound proof, showing that the problem is coNP-complete; and a
new theorem which bounds the number of iterations for loops with
. Surprisingly, the bound is linear, even when the
variables involved change in non-linear way. We also consider a type of
lexicographic ranking functions, , more expressive than types
of lexicographic functions for which complete solutions have been given so far.
We prove that for the above type of loops, lexicographic functions can be
reduced to , and thus the questions of complexity of
detection and synthesis, and of resulting iteration bounds, are also answered
for this class.Comment: typos correcte
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
Alternating runtime and size complexity analysis of integer programs
We present a modular approach to automatic complexity analysis. Based on a novel alternation between finding symbolic time bounds for program parts and using these to infer size bounds on program variables, we can restrict each analysis step to a small part of the program while maintaining a high level of precision. Extensive experiments with the implementation of our method demonstrate its performance and power in comparison with other tools
Automatically proving termination and memory safety for programs with pointer arithmetic
While automated verification of imperative programs has been studied intensively, proving termination of programs with explicit pointer arithmetic fully automatically was 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 over-approximates all possible runs of a 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
Non-polynomial Worst-Case Analysis of Recursive Programs
We study the problem of developing efficient approaches for proving
worst-case bounds of non-deterministic recursive programs. Ranking functions
are sound and complete for proving termination and worst-case bounds of
nonrecursive programs. First, we apply ranking functions to recursion,
resulting in measure functions. We show that measure functions provide a sound
and complete approach to prove worst-case bounds of non-deterministic recursive
programs. Our second contribution is the synthesis of measure functions in
nonpolynomial forms. We show that non-polynomial measure functions with
logarithm and exponentiation can be synthesized through abstraction of
logarithmic or exponentiation terms, Farkas' Lemma, and Handelman's Theorem
using linear programming. While previous methods obtain worst-case polynomial
bounds, our approach can synthesize bounds of the form
as well as where is not an integer. We present
experimental results to demonstrate that our approach can obtain efficiently
worst-case bounds of classical recursive algorithms such as (i) Merge-Sort, the
divide-and-conquer algorithm for the Closest-Pair problem, where we obtain
worst-case bound, and (ii) Karatsuba's algorithm for
polynomial multiplication and Strassen's algorithm for matrix multiplication,
where we obtain bound such that is not an integer and
close to the best-known bounds for the respective algorithms.Comment: 54 Pages, Full Version to CAV 201
Analyzing program termination and complexity automatically with AProVE
In this system description, we present the tool AProVE for automatic termination and complexity proofs of Java, C, Haskell, Prolog, and rewrite systems. In addition to classical term rewrite systems (TRSs), AProVE also supports rewrite systems containing built-in integers (int-TRSs). To analyze programs in high-level languages, AProVE automatically converts them to (int-)TRSs. Then, a wide range of techniques is employed to prove termination and to infer complexity bounds for the resulting rewrite systems. The generated proofs can be exported to check their correctness using automatic certifiers. To use AProVE in software construction, we present a corresponding plug-in for the popular Eclipse software development environment
Learning units-of-measure from scientific code
CamFort is our multi-purpose tool for lightweight analysis and verification of scientific Fortran code. One core feature provides units-of-measure verification (dimensional analysis) of programs, where users partially annotate programs with units-of-measure from which our tool checks consistency and infers any missing specifications. However, many users find it onerous to provide units-of-measure information for existing code, even in part. We have noted however that there are often many common patterns and clues about the intended units-of-measure contained within variable names, comments, and surrounding code context. In this work-in-progress paper, we describe how we are adapting our approach, leveraging machine-learning techniques to reconstruct units-of-measure information automatically thus saving programmer effort and increasing the likelihood of adoption
- …
