# Using Dynamic Analysis to Generate Disjunctive Invariants

**Authors:** ThanhVu Nguyen, Deepak Kapur, Westley Weimer, Stephanie, Forrest

arXiv: 1904.07463 · 2019-04-17

## TL;DR

This paper introduces a novel method for generating disjunctive invariants using dynamic analysis and algebraic reformulation, enabling the inference of complex program properties that traditional methods struggle with.

## Contribution

The paper presents a new approach combining dynamic analysis with max-plus and min-plus algebra to generate and verify disjunctive invariants efficiently.

## Key findings

- Successfully infers disjunctive invariants over numerical domains.
- Balances expressive power with computational efficiency.
- Proves correctness of invariants in nonlinear and array-based kernels.

## Abstract

Program invariants are important for defect detection, program verification, and program repair. However, existing techniques have limited support for important classes of invariants such as disjunctions, which express the semantics of conditional statements. We propose a method for generating disjunctive invariants over numerical domains, which are inexpressible using classical convex polyhedra. Using dynamic analysis and reformulating the problem in non-standard "max-plus" and "min-plus" algebras, our method constructs hulls over program trace points. Critically, we introduce and infer a weak class of such invariants that balances expressive power against the computational cost of generating nonconvex shapes in high dimensions.   Existing dynamic inference techniques often generate spurious invariants that fit some program traces but do not generalize. With the insight that generating dynamic invariants is easy, we propose to verify these invariants statically using k-inductive SMT theorem proving which allows us to validate invariants that are not classically inductive.   Results on difficult kernels involving nonlinear arithmetic and abstract arrays suggest that this hybrid approach efficiently generates and proves correct program invariants.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.07463/full.md

## Figures

18 figures with captions in the complete paper: https://tomesphere.com/paper/1904.07463/full.md

## References

42 references — full list in the complete paper: https://tomesphere.com/paper/1904.07463/full.md

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