English

Verifying Tree-Manipulating Programs via CHCs

Programming Languages 2025-05-21 v1 Logic in Computer Science

Abstract

Programs that manipulate tree-shaped data structures often require complex, specialized proofs that are difficult to generalize and automate. This paper introduces a unified, foundational approach to verifying such programs. Central to our approach is the knitted-tree encoding, modeling each program execution as a tree structure capturing input, output, and intermediate states. Leveraging the compositional nature of knitted-trees, we encode these structures as constrained Horn clauses (CHCs), reducing verification to CHC satisfiability task. To illustrate our approach, we focus on memory safety and show how it naturally leads to simple, modular invariants.

Keywords

Cite

@article{arxiv.2505.14092,
  title  = {Verifying Tree-Manipulating Programs via CHCs},
  author = {Marco Faella and Gennaro Parlato},
  journal= {arXiv preprint arXiv:2505.14092},
  year   = {2025}
}