Shape Neutral Analysis of Graph-based Data-structures

04/25/2018
by   Gregory J. Duck, et al.
0

Malformed data-structures can lead to runtime errors such as arbitrary memory access or corruption. Despite this, reasoning over data-structure properties for low-level heap manipulating programs remains challenging. In this paper we present a constraint-based program analysis that checks data-structure integrity, w.r.t. given target data-structure properties, as the heap is manipulated by the program. Our approach is to automatically generate a solver for properties using the type definitions from the target program. The generated solver is implemented in Constraint Handling Rules (CHR) extending builtin heap, integer and equality solvers. A key property of our program analysis is that the target data-structure properties are shape neutral, i.e. the analysis does not check for properties relating to a given data-structure graph shape, such as doubly-linked-lists versus trees. Nevertheless, the analysis can detect errors in wide range of data-structure manipulating programs, including those that use lists, trees, DAGs, graphs, etc. We present an implementation based on a specialized shape neutral constraint solver implemented using the Satisfiability Modulo Constraint Handling Rules (SMCHR) system. Experimental results show that our approach works well for real-world C programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/12/2022

Type checking data structures more complex than trees

Graphs are a generalized concept that encompasses more complex data stru...
research
08/26/2022

Automatic Synthesis of Random Generators for Numerically Constrained Algebraic Recursive Types

In program verification, constraint-based random testing is a powerful t...
research
06/26/2022

Applications of Recursively Defined Data Structures

A circular program contains a data structure whose definition is self-re...
research
06/14/2016

Why is Compiling Lifted Inference into a Low-Level Language so Effective?

First-order knowledge compilation techniques have proven efficient for l...
research
06/15/2022

Searching Entangled Program Spaces

Many problem domains, including program synthesis and rewrite-based opti...
research
07/12/2023

Sound One-Phase Shape Analysis with Biabduction

Biabduction-based shape analysis is a static analysis technique that can...
research
07/09/2019

Proving Properties of Sorting Programs: A Case Study in Horn Clause Verification

The proof of a program property can be reduced to the proof of satisfiab...

Please sign up or login with your details

Forgot password? Click here to reset