Diffy: Inductive Reasoning of Array Programs Using Difference Invariants
Supratik Chakraborty, Ashutosh Gupta, Divyesh Unadkat
Abstract
We present a novel verification technique to prove interesting properties of a class of array programs with a symbolic parameter N denoting the size of arrays. The technique relies on constructing two slightly different versions of the same program. It infers difference relations between the corresponding variables at key control points of the joint control-flow graph of the two program versions. The desired postcondition is then proved by inducting on the program parameter N , wherein the difference invariants are crucially used in the inductive step. This contrasts with classical techniques that rely on finding potentially complex loop invaraints for each loop in the program. Our synergistic combination of inductive reasoning and finding simple difference invariants helps prove properties of programs that cannot be proved even by the winner of Arrays sub-category from SV-COMP 2021. We have implemented a prototype tool called Diffy to demonstrate these ideas. We present results comparing the performance of Diffy with that of state-of-the-art tools.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d147a818-3c1e-4a09-8053-ba03c16b2820Cited by top-tier papers3
- AutoVerus: Automated Proof Generation for Rust CodeChenyuan Yang, Xuheng Li, Md Rakib Hossain Misu, Jianan Yao et al.OOPSLA 2025 · 11 citations
- Automated Verification of Monotonic Data Structure Traversals in CMatthew SotoudehCAV 2025 · 1 citation
- Data-Driven Verification of Procedural Programs with Integer ArraysAhmed Bouajjani, Wael-Amine Boutglay, Peter HabermehlCAV 2025
Builds on1
Related papers
- Verifying Array Properties in Pure Data-Parallel ProgramsNikolaj Hey Hinnerskov, Robert Schenck, Cosmin E. OanceaPLDI 2026 · 1 citation
- Sound and Complete Invariant-Based Heap EncodingsZafer Esen, Philipp Rümmer, Tjark WeberOOPSLA 2026
- Transition Invariants Revisited: Termination Witnesses and Their ValidationDirk Beyer, Marek Jankola, Marian Lingsch RosenfeldCAV 2026
- Array-Carrying Symbolic Execution for Function Contract GenerationWeijie Lu, Jingyu Ke, Hongfei Fu, Zhouyue Sun et al.FM 2026
- Abductive Inference of Separation Logic Specifications with Isorecursive User-Defined Predicates and Magic WandsNicolas Klose, Peter MüllerOOPSLA 2026 · 1 citation
