A recipe for modular verification of generic tree traversals

Elbeheiry L, Sammler MJ, Krebbers R, Dreyer D, Garg D. 2026. A recipe for modular verification of generic tree traversals. Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs. CPP: Conference on Certified Programs and Proofs, 339–352.

Download
OA 2026_CPP_Elbeheiry.pdf 811.87 KB [Published Version]

Conference Paper | Published | English

Scopus indexed
Author
Elbeheiry, Laila; Sammler, Michael JoachimISTA; Krebbers, Robbert; Dreyer, Derek; Garg, Deepak
Department
Abstract
Data structures based on trees and tree traversals are ubiquitous in computer systems. Many low-level programs, including some implementations of critical systems like page tables and the web browser DOM, rely on generic tree-traversal functions that traverse tree nodes in a pre-determined order, applying a client-provided operation to each visited node. Developing a general approach to specifying and verifying such traversals is tricky since the client-provided per-node operation can be stateful and may potentially depend on or modify the structure of the tree being traversed. In this paper, we present a recipe for (semi-)automated verification of such generic, stateful tree traversals. Our recipe is (a) general: it applies to a range of tree traversals, in particular, pre-, post- and in-order depth-first traversals; (b) modular: parts of a traversal’s proof can be reused in verifying other similar traversals; (c) expressive: using the specification of a tree traversal, we can verify clients that use the traversal in a variety of different ways; and (d) automatable: many proof obligations can be discharged automatically. At the heart of our recipe is a novel use of tree zippers to represent a logical abstraction of the tree traversal state, and zipper transitions as an abstraction of traversal steps. We realize our recipe in the RefinedC framework in Rocq, which allows us to verify a number of different tree traversals and their clients written in C.
Publishing Year
Date Published
2026-01-08
Proceedings Title
Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs
Publisher
Association for Computing Machinery
Acknowledgement
We thank the anonymous reviewers for their insightful suggestions. This research is supported in part by generous awards from Android Security’s ASPIRE program and from Google Research. The third author is supported, in part, by ERC grant COCONUT (grant no. 101171349), funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
Page
339-352
Conference
CPP: Conference on Certified Programs and Proofs
Conference Location
Rennes, France
Conference Date
2026-01-12 – 2026-01-13
IST-REx-ID

Cite this

Elbeheiry L, Sammler MJ, Krebbers R, Dreyer D, Garg D. A recipe for modular verification of generic tree traversals. In: Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs. Association for Computing Machinery; 2026:339-352. doi:10.1145/3779031.3779110
Elbeheiry, L., Sammler, M. J., Krebbers, R., Dreyer, D., & Garg, D. (2026). A recipe for modular verification of generic tree traversals. In Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs (pp. 339–352). Rennes, France: Association for Computing Machinery. https://doi.org/10.1145/3779031.3779110
Elbeheiry, Laila, Michael Joachim Sammler, Robbert Krebbers, Derek Dreyer, and Deepak Garg. “A Recipe for Modular Verification of Generic Tree Traversals.” In Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs, 339–52. Association for Computing Machinery, 2026. https://doi.org/10.1145/3779031.3779110.
L. Elbeheiry, M. J. Sammler, R. Krebbers, D. Dreyer, and D. Garg, “A recipe for modular verification of generic tree traversals,” in Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs, Rennes, France, 2026, pp. 339–352.
Elbeheiry L, Sammler MJ, Krebbers R, Dreyer D, Garg D. 2026. A recipe for modular verification of generic tree traversals. Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs. CPP: Conference on Certified Programs and Proofs, 339–352.
Elbeheiry, Laila, et al. “A Recipe for Modular Verification of Generic Tree Traversals.” Proceedings of the 15th ACM SIGPLAN International Conference on Certified Programs and Proofs, Association for Computing Machinery, 2026, pp. 339–52, doi:10.1145/3779031.3779110.
All files available under the following license(s):
Creative Commons Attribution 4.0 International Public License (CC-BY 4.0):
Main File(s)
File Name
Access Level
OA Open Access
Date Uploaded
2026-02-16
MD5 Checksum
7df99991493e907d83a197151f378e3e


Export

Marked Publications

Open Data ISTA Research Explorer

Search this title in

Google Scholar
ISBN Search