Automated Generation of Non-Linear Loop Invariants Utilizing Hypergeometric Sequences
Authors:
- Andreas HumenbergerAHAndreas Humenberger
- Maximilian JaroschekMJMaximilian Jaroschek
- Laura KovácsLKLaura Kovács
Preprint
Abstract
Analyzing and reasoning about safety properties of software systems becomes an especially challenging task for programs with complex flow and, in particular, with loops or recursion. For such programs one needs additional information, for example in the form of loop invariants, expressing properties to hold at intermediate program points. In this paper we study program loops with non-trivial arithmetic, implementing addition and multiplication among numeric program variables. We present a new approach for automatically generating all polynomial invariants of a class of such programs. Our approach turns programs into linear ordinary recurrence equations and computes closed form solutions of these equations. These closed forms express the most precise inductive property, and hence invariant. We apply Gr\"obner basis computation to obtain a basis of the polynomial invariant ideal, yielding thus a finite representation of all polynomial invariants. Our work significantly extends the class of so-called P-solvable loops by handling multiplication with the loop counter variable. We implemented our method in the Mathematica package Aligator and showcase the practical use of our approach.Keywords
All Related Versions
- Version 1, 2017-05-08, ArXiv
- Version 2, 2017-05-11, ArXiv
- Published version: , 221.
This publication has 10 references indexed in Scilit:
- Polynomial Invariants by Linear Algebra2016
- The Concrete Tetrahedron2011
- Computing the algebraic relations of C-finite sequences and multisequencesJournal of Symbolic Computation, 2008
- Aligator: A Mathematica Package for Invariant Generation (System Description)2008
- Generating all polynomial invariants in simple loopsJournal of Symbolic Computation, 2007
- Automatic generation of polynomial invariants of bounded degree using abstract interpretationScience of Computer Programming, 2007
- Non-linear loop invariant generation using Gröbner bases2004
- A Note on Karr’s Algorithm2004
- A Mathematica Version of Zeilberger's Algorithm for Proving Binomial Coefficient IdentitiesJournal of Symbolic Computation, 1995
- Hypergeometric solutions of linear recurrences with polynomial coefficientsJournal of Symbolic Computation, 1992