Deciding memory safety for single-pass heap-manipulating programs
Umang Mathur, Adithya Murali, Paul Krogmeier, P. Madhusudan, Mahesh Viswanathan
Abstract
We investigate the decidability of automatic program verification for programs that manipulate heaps, and in particular, decision procedures for proving memory safety for them. We extend recent work that identified a decidable subclass of uninterpreted programs to a class of alias-aware programs that can update maps. We apply this theory to develop verification algorithms for memory safety— determining if a heap-manipulating program that allocates and frees memory locations and manipulates heap pointers does not dereference an unallocated memory location. We show that this problem is decidable when the initial allocated heap forms a forest data-structure and when programs are streaming-coherent , which intuitively restricts programs to make a single pass over a data-structure. Our experimental evaluation on a set of library routines that manipulate forest data-structures shows that common single-pass algorithms on data-structures often fall in the decidable class, and that our decision procedure is efficient in verifying them.
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.
Cited by top-tier papers7
- Local Reasoning About the Presence of Bugs: Incorrectness Separation LogicAzalea Raad, Josh Berdine, Hoang-Hai Dang, Derek Dreyer et al.CAV 2020 · 70 citations
- Decidable Synthesis of Programs with Uninterpreted FunctionsPaul Krogmeier, Umang Mathur, Adithya Murali, P. Madhusudan et al.CAV 2020 · 8 citations
- Trace Abstraction-Based Verification for Uninterpreted ProgramsWeijiang Hong, Zhenbang Chen, Yide Du, Ji WangFM 2021 · 2 citations
- The Decision Problem for Regular First Order TheoriesUmang Mathur, David Mestel, Mahesh ViswanathanPOPL 2025 · 1 citation
- Automated Verification of Monotonic Data Structure Traversals in CMatthew SotoudehCAV 2025 · 1 citation
Related papers
- Arithmetizing Shape AnalysisSebastian Wolff, Ekanshdeep Gupta, Zafer Esen, Hossein Hojjat et al.CAV 2025
- Sound and Complete Invariant-Based Heap EncodingsZafer Esen, Philipp Rümmer, Tjark WeberOOPSLA 2026
- Verifying Tree-Manipulating Programs via CHCsMarco Faella, Gennaro ParlatoCAV 2025 · 1 citation
- A Dependent Nominal Physical Type System for Static Analysis of Memory in Low Level CodeJulien Simonnet, Matthieu Lemerre, Mihaela SighireanuOOPSLA 2024 · 4 citations
- Abductive Inference of Separation Logic Specifications with Isorecursive User-Defined Predicates and Magic WandsNicolas Klose, Peter MüllerOOPSLA 2026 · 1 citation
