A Counterexample-guided Approach to Finding Numerical Invariants

03/28/2019
by   ThanhVu Nguyen, et al.
0

Numerical invariants, e.g., relationships among numerical variables in a program, represent a useful class of properties to analyze programs. General polynomial invariants represent more complex numerical relations, but they are often required in many scientific and engineering applications. We present NumInv, a tool that implements a counterexample-guided invariant generation (CEGIR) technique to automatically discover numerical invariants, which are polynomial equality and inequality relations among numerical variables. This CEGIR technique infers candidate invariants from program traces and then checks them against the program source code using the KLEE test-input generation tool. If the invariants are incorrect KLEE returns counterexample traces, which help the dynamic inference obtain better results. Existing CEGIR approaches often require sound invariants, however NumInv sacrifices soundness and produces results that KLEE cannot refute within certain time bounds. This design and the use of KLEE as a verifier allow NumInv to discover useful and important numerical invariants for many challenging programs. Preliminary results show that NumInv generates required invariants for understanding and verifying correctness of programs involving complex arithmetic. We also show that NumInv discovers polynomial invariants that capture precise complexity bounds of programs used to benchmark existing static complexity analysis techniques. Finally, we show that NumInv performs competitively comparing to state of the art numerical invariant analysis tools.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/22/2019

SLING: Using Dynamic Analysis to Infer Program Invariants in Separation Logic

We introduce a new dynamic analysis technique to discover invariants in ...
research
03/28/2019

SymInfer: Inferring Program Invariants using Symbolic States

We introduce a new technique for inferring program invariants that uses ...
research
11/26/2019

OASIS: ILP-Guided Synthesis of Loop Invariants

Finding appropriate inductive loop invariants for a program is a key cha...
research
02/12/2019

Polynomial Invariant Generation for Non-deterministic Recursive Programs

We present a sound and complete method to generate inductive invariants ...
research
11/18/2019

Invariant Diffs

Software development is inherently incremental. Nowadays, many software ...
research
03/14/2019

Are My Invariants Valid? A Learning Approach

Ensuring that a program operates correctly is a difficult task in large,...
research
09/04/2021

Direct Construction of Program Alignment Automata for Equivalence Checking

The problem of checking whether two programs are semantically equivalent...

Please sign up or login with your details

Forgot password? Click here to reset