Finding Universally Quantified Heap Invariants by Horn Clause Transformations

Zafer Esen, Philipp Rümmer, and Tjark Weber. In Hossein Hojjat and Georgiana Caltais, editors, Fundamentals of Software Engineering - 11th IFIP WG 2.2 International Conference, FSEN 2025, Västerås, Sweden, April 7-8, 2025, Proceedings, Lecture Notes in Computer Science, pages 42-60. Springer, 2025.

Abstract

A common approach in software verification is to encode a program as a set of Constrained Horn Clauses (CHCs), which are then processed and solved automatically by a CHC solver. To streamline this verification approach for the case of programs operating on mutable linked data-structures, we have in earlier work proposed a theory of heaps, defined within the SMT-LIB framework, which enables us to represent programs as CHCs with minimal loss of structural information. By preserving high-level program information in the encoding, the theory of heaps enables CHC solvers to apply various internal techniques for handling program heap; among others, to encode the heap further using the theory of arrays, to apply shape analysis, or to translate to a heap-less program with the help of invariants. This paper explores the third option, developing transformation rules that rewrite a set of CHCs into an equisatisfiable set of CHCs with additional predicates representing heap invariants. The proposed method generalises the notion of space invariants, which were previously introduced for verifying Java programs, by lifting the entire transformation process to the CHC level. The paper defines the transformation rules, provides detailed correctness proofs, and discusses the strengths and limitations of the approach. We also outline possible extensions of the method.

Download

BibTeX

@inproceedings{esen25finding,
  author       = {Zafer Esen and Philipp R{\"{u}}mmer and Tjark Weber},
  editor       = {Hossein Hojjat and Georgiana Caltais},
  title        = {Finding Universally Quantified Heap Invariants by {Horn} Clause Transformations},
  booktitle    = {Fundamentals of Software Engineering - 11th {IFIP} {WG} 2.2 International
                  Conference, {FSEN} 2025, V{\"{a}}ster{\aa}s, Sweden, April 7-8,
                  2025, Proceedings},
  series       = {Lecture Notes in Computer Science},
  pages        = {42--60},
  publisher    = {Springer},
  year         = {2025},
  url          = {https://doi.org/10.1007/978-3-031-87054-5\_4},
  doi          = {10.1007/978-3-031-87054-5\_4}
}

Last modified: 2026-03-26