# Polynomial Invariant Generation for Non-deterministic Recursive Programs

**Authors:** Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady and, Ehsan Kafshdar Goharshady

arXiv: 1902.04373 · 2020-04-07

## TL;DR

This paper introduces a novel, sound, and semi-complete method for generating polynomial invariants in programs, leveraging semi-algebraic geometry and quadratic programming, with proven theoretical guarantees and practical effectiveness.

## Contribution

It is the first invariant generation approach with completeness guarantees for polynomial inequalities, improving complexity bounds and practical applicability.

## Key findings

- Method is sound and semi-complete for polynomial invariants.
- Complexity is subexponential, better than previous exponential methods.
- Experimental results demonstrate effectiveness on academic benchmarks.

## Abstract

We consider the classical problem of invariant generation for programs with polynomial assignments and focus on synthesizing invariants that are a conjunction of strict polynomial inequalities. We present a sound and semi-complete method based on positivstellensaetze, i.e. theorems in semi-algebraic geometry that characterize positive polynomials over a semi-algebraic set. To the best of our knowledge, this is the first invariant generation method to provide completeness guarantees for invariants consisting of polynomial inequalities. Moreover, on the theoretical side, the worst-case complexity of our approach is subexponential, whereas the worst-case complexity of the previously-known complete method (Colon et al, CAV 2003), which could only handle linear invariants, is exponential. On the practical side, we reduce the invariant generation problem to quadratic programming (QCLP), which is a classical optimization problem with many industrial solvers. Finally, we demonstrate the applicability of our approach by providing experimental results on several academic benchmarks.

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1902.04373/full.md

---
Source: https://tomesphere.com/paper/1902.04373