Languages of Nested Trees

Rajeev Alur, Swarat Chaudhuri, P. Madhusudan

Abstract

This paper introduces nested trees, a novel graph structure designed to model the recursive branching behavior of programs by augmenting standard trees with "jump-edges." We present a framework of automata (AP-NTAs) and a fixpoint logic (NT-$\mu$) that are expressively equivalent. This framework provides an EXPTIME-complete solution for branching-time software model checking, addressing a critical gap where traditional tree automata and Monadic Second-Order (MSO) logic fail to capture context-free requirements like matching function calls and returns.

Introduction: The Challenge of Recursive Verification

In software verification, checking if a program satisfies branching-time properties—such as "on all execution paths, a resource is eventually released"—is a fundamental task. Traditionally, program executions are modeled as trees, and properties are expressed using the $\mu$-calculus or tree automata.

However, standard tree-based models struggle with recursive calls. They cannot easily express "context-free" requirements, such as ensuring every function call is eventually matched by its corresponding return. While context-free languages can handle these patterns, they lack closure under intersection or complement, making them unsuitable for general verification. This research seeks a middle ground: a formalism expressive enough for the "matching" behavior of pushdown systems (programs with a stack) while remaining decidable and mathematically robust.

Methods: Formalizing Nested Trees

The authors propose nested trees, which extend standard trees by adding "jump-edges." These edges connect a function call node directly to its matching return node, effectively bypassing the internal execution of the called function.

A nested tree structure where solid arrows represent standard tree edges and dashed arrows represent jump-edges.

To reason about these structures, the paper introduces several formalisms:

  1. Nested Tree Automata (NTAs): These are finite-state machines that pass states along both standard tree edges and jump-edges. The authors distinguish between nondeterministic (NP-NTA) and alternating (AP-NTA) variants.
  2. NT-$\mu$ Logic: A temporal fixpoint calculus specifically designed for nested trees. It allows for reasoning about "summaries"—procedural contexts that capture the behavior of a function call from its entry to its exit.
  3. MSO Logic Extension: The authors examine Monadic Second-Order logic augmented with a jump-edge predicate to test if the classical equivalence between automata and MSO holds in this domain.

Nodes in these trees are categorized to reflect program operations: calls (black circles), returns (white circles), and local operations (squares).

Mapping program actions (calls, returns, locals) to nested tree nodes.

Key Insights and Results

The Power of Alternation

Unlike standard tree automata, nondeterministic nested tree automata (NP-NTAs) are not closed under complement. The authors demonstrate that alternation is essential to achieving a robust class of languages closed under all Boolean operations (union, intersection, and complement).

Expressive Equivalence and Complexity

A central result is the proof that AP-NTAs and the logic NT-$\mu$ are expressively equivalent. This establishes a "regular" theory for nested trees. Furthermore, checking whether a pushdown system satisfies a property defined by an AP-NTA or NT-$\mu$ formula is EXPTIME-complete. This matches the complexity of standard $\mu$-calculus model checking on finite-state systems, proving that the added expressivity for recursion does not increase the computational overhead.

The Breakdown of MSO

In a departure from classical tree theory, MSO logic on nested trees proves problematic. It is "too strong" in some contexts, leading to undecidability, and "too weak" in others, likely failing to capture the fixpoint reasoning of NT-$\mu$. This suggests that nested trees occupy a unique frontier in the landscape of decidability.

Limitations and Future Outlook

While model checking is decidable, the emptiness problem (determining if any nested tree is accepted by an AP-NTA) is undecidable, shown via a reduction from the Post Correspondence Problem (PCP). This limits the framework's utility for automated synthesis.

Future work may explore whether MSO can be restricted to align better with fixpoint reasoning or if higher-order fixpoints can bridge the gap. Additionally, while the theoretical results are promising, implementing these algorithms in practical verification tools like SLAM or Zing remains a key objective.

Summary updated

BibTeX
@inproceedings{alur2006languages,
  author = {Rajeev Alur and Swarat Chaudhuri and P. Madhusudan},
  title = {{Languages of Nested Trees}},
  booktitle = {CAV},
  year = {2006},
  doi = {10.1007/11817963\_31},
}
Figure