Reasoning about recursive tree traversals
Yanjun Wang, Jinwei Liu, Dalin Zhang, Xiaokang Qiu
Abstract
Traversals are commonly seen in tree data structures, and performance-enhancing transformations between tree traversals are critical for many applications. Existing approaches to reasoning about tree traversals and their transformations are ad hoc, with various limitations on the classes of traversals they can handle, the granularity of dependence analysis, and the types of possible transformations. We propose Retreet, a framework in which one can describe general recursive tree traversals, precisely represent iterations, schedules and dependences, and automatically check data-race-freeness and transformation correctness. The crux of the framework is a stack-based representation for iterations and an encoding to Monadic Second-Order (MSO) logic over trees. Experiments show that Retreet can automatically verify optimizations for complex traversals on real-world data structures, such as CSS and cycletrees, which are not possible before. Our framework is also integrated with other MSO-based analysis techniques to verify even more challenging program transformations.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c5879a90-e856-4784-ba7b-de6b56eac0c0Cited by top-tier papers1
Ask how each one uses itRelated papers
- Reasoning About Data Trees Using CHCsMarco Faella, Gennaro ParlatoCAV 2022 · 6 citations
- Interaction trees: representing recursive and impure programs in CoqLi-yao Xia, Yannick Zakowski, Paul He, Chung-Kil Hur et al.POPL 2020 · 133 citations
- Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in CoqNicolas Chappe, Paul He, Ludovic Henrio, Yannick Zakowski et al.POPL 2023 · 21 citations
- Automated Verification of Monotonic Data Structure Traversals in CMatthew SotoudehCAV 2025 · 1 citation
- Tree traversal synthesis using domain-specific symbolic compilationYanju Chen, Junrui Liu, Yu Feng, Rastislav BodíkASPLOS 2022 · 5 citations
