Title: Algebra-based Loop Reasoning - Invariant Generation and Synthesis for Numeric Loops
Other Titles: Algebra-based Loop Reasoning - Invariant Generation and Synthesis for Numeric Loops
Language: English
Authors: Humenberger, Andreas 
Qualification level: Doctoral
Advisor: Kovacs, Laura 
Issue Date: 2021
Number of Pages: 96
Qualification level: Doctoral
Provably correct software is one of the key challenges in our software-driven society. Program verification – the task of proving correctness of a given program with respect to a given specification – and program synthesis – the task of constructing a program satisfying a given specification – are strategies for achieving this. While formal verification establishes the correctness of a given program, the result of program synthesis is a program which is correct by construction. In both domains, handling loops is one of the main ingredients to a successful procedure. A so-called loop invariant is a property of a given loop describing its behavior, and is therefore the central notion for reasoning about program loops. In verification, the task is to compute invariants for a given loop, we call this task invariant generation. The reverse challenge, that is, synthesizing a loop which satisfies a given invariant, is called loop synthesis. We present algorithms for both scenarios based on techniques from the area of computer algebra. In particular, we develop techniques for generating invariants for numerical multi-path loops, and for the synthesis of numerical single-path loops. The central aspect in both settings is that we model loops as systems of recurrence equations. Every program variable of a loop induces a number sequence, and we reduce the invariant generation task to the task of computing the set of all algebraic relations among those sequences. In fact, we consider single-path loops whose variables induce number sequences which can be represented as a finite sum of hypergeometric sequences (so-called P-solvable sequences). We compute the invariants of multi-path loops by an iterative procedure employing Gröbner bases computations. Our approach computes the set of polynomial equality invariants of each program path and combines these ideals sequentially until a fixed point is reached. This fixed point represents the polynomial ideal of all polynomial invariants of the given P-solvable loop. We prove termination of our method and show that the maximal number of iterations for reaching the fixed point depends linearly on the number of program variables and the number of paths.The class of loops we are considering in loop synthesis can be modeled by a system of recurrence equations with constant coefficients (a subclass of P- solvable recurrences). We then turn the task of loop synthesis into a polynomial constraint problem by precisely characterizing the set of all loops satisfying a given set of polynomial equality invariants. Our approach is sound, and complete when the number of auxiliary variables is bounded. Furthermore, we show that it can be automated by leveraging SMT solvers for solving our polynomial constraint problems. The combination of the two techniques provides a strong foundation for a successful procedure in the context of loop optimizations such as strength reduction.
Keywords: Invariant Generation; Loop Synthesis; Symbolic Computation; Polynomial Invariant; Recurrence Equation; Number Sequence
URI: https://doi.org/10.34726/hss.2021.89761
DOI: 10.34726/hss.2021.89761
Library ID: AC16183665
Organisation: E192 - Institut für Logic and Computation 
Publication Type: Thesis
Appears in Collections:Thesis

Files in this item:

Show full item record

Page view(s)

checked on May 7, 2021


checked on May 7, 2021

Google ScholarTM


Items in reposiTUm are protected by copyright, with all rights reserved, unless otherwise indicated.