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

03/22/2019
by   Ton Chanh Le, et al.
0

We introduce a new dynamic analysis technique to discover invariants in separation logic for heap-manipulating programs. First, we use a debugger to obtain rich program execution traces at locations of interest on sample inputs. These traces consist of heap and stack information of variables that point to dynamically allocated data structures. Next, we iteratively analyze separate memory regions related to each pointer variable and search for a formula over predefined heap predicates in separation logic to model these regions. Finally, we combine the computed formulae into an invariant that describes the shape of explored memory regions. We present SLING, a tool that implements these ideas to automatically generate invariants in separation logic at arbitrary locations in C programs, e.g., program pre and postconditions and loop invariants. Preliminary results on existing benchmarks show that SLING can efficiently generate correct and useful invariants for programs that manipulate a wide variety of complex data structures.

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
04/30/2019

Targeted Synthesis for Programming with Data Invariants

Programmers frequently maintain implicit data invariants, which are rela...
research
03/28/2019

SymInfer: Inferring Program Invariants using Symbolic States

We introduce a new technique for inferring program invariants that uses ...
research
10/10/2017

Proofs as Relational Invariants of Synthesized Execution Grammars

The automatic verification of programs that maintain unbounded low-level...
research
06/26/2019

A Stricter Heap Separating Points-To Logic

Dynamic memory issues are hard to locate and may cost much of a developm...
research
12/11/2020

Probabilistic Conditional System Invariant Generation with Bayesian Inference

Invariants are a set of properties over program attributes that are expe...
research
01/05/2023

Builtin Types viewed as Inductive Families

State of the art optimisation passes for dependently typed languages can...

Please sign up or login with your details

Forgot password? Click here to reset