OASIS: ILP-Guided Synthesis of Loop Invariants

11/26/2019
by   Sahil Bhatia, et al.
0

Finding appropriate inductive loop invariants for a program is a key challenge in verifying its functional properties. Although the problem is undecidable in general, several heuristics have been proposed to handle practical programs that tend to have simple control-flow structures. However, these heuristics only work well when the space of invariants is small. On the other hand, machine-learned techniques that use continuous optimization have a high sample complexity, i.e., the number of invariant guesses and the associated counterexamples, since the invariant is required to exactly satisfy a specification. We propose a novel technique that is able to solve complex verification problems involving programs with larger number of variables and non-linear specifications. We formulate an invariant as a piecewise low-degree polynomial, and reduce the problem of synthesizing it to a set of integer linear programming (ILP) problems. This enables the use of state-of-the-art ILP techniques that combine enumerative search with continuous optimization; thus ensuring fast convergence for a large class of verification tasks while still ensuring low sample complexity. We instantiate our technique as the open-source oasis tool using an off-the-shelf ILP solver, and evaluate it on more than 300 benchmark tasks collected from the annual SyGuS competition and recent prior work. Our experiments show that oasis outperforms the state-of-the-art tools, including the winner of last year's SyGuS competition, and is able to solve 9 challenging tasks that existing tools fail on.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/28/2019

A Counterexample-guided Approach to Finding Numerical Invariants

Numerical invariants, e.g., relationships among numerical variables in a...
research
05/31/2021

Diffy: Inductive Reasoning of Array Programs using Difference Invariants

We present a novel verification technique to prove interesting propertie...
research
05/08/2017

Automated Generation of Non-Linear Loop Invariants Utilizing Hypergeometric Sequences

Analyzing and reasoning about safety properties of software systems beco...
research
12/26/2017

Horn-ICE Learning for Synthesizing Invariants and Contracts

We design learning algorithms for synthesizing invariants using Horn imp...
research
07/09/2019

Relational Verification via Invariant-Guided Synchronization

Relational properties describe relationships that hold over multiple exe...
research
03/17/2020

Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks

In many cases, verifying real-world programs requires inferring loop inv...
research
06/09/2021

Data-Driven Invariant Learning for Probabilistic Programs

Morgan and McIver's weakest pre-expectation framework is one of the most...

Please sign up or login with your details

Forgot password? Click here to reset