Sound and Complete Invariant-Based Heap Encodings (Technical Report)

Zafer Esen, Philipp Rümmer, and Tjark Weber. CoRR, abs/2504.15844, 2025.

Abstract

Verification of programs operating on heap-allocated data structures, for instance lists or trees, poses significant challenges due to the potentially unbounded size of such data structures. We present time-indexed heap invariants, a novel invariant-based heap encoding leveraging uninterpreted predicates and prophecy variables to reduce verification of heap-manipulating programs to verification of programs over integers only. Our encoding of heap is general and agnostic to specific data structures. To the best of our knowledge, our approach is the first heap invariant-based method that achieves both soundness and completeness. We provide formal proofs establishing the correctness of our encodings. Through an experimental evaluation, we demonstrate that time-indexed heap invariants significantly extend the capability of existing verification tools, allowing automatic verification of programs with heap that were previously out of reach for state-of-the-art tools.

Download

BibTeX

@article{esen25sound,
  author       = {Zafer Esen and Philipp R{\"{u}}mmer and Tjark Weber},
  title        = {Sound and Complete Invariant-Based Heap Encodings (Technical Report)},
  journal      = {CoRR},
  volume       = {abs/2504.15844},
  year         = {2025},
  url          = {https://doi.org/10.48550/arXiv.2504.15844},
  doi          = {10.48550/ARXIV.2504.15844}
}

Note

A conference version of this paper is available.


Last modified: 2026-03-26