Complexity Analysis of Tree Share Structure

Xuan Bach Le, Aquinas Hobor, Anthony W. Lin

TL;DR

This paper tackles the computational complexity of "tree shares," a crucial data structure for reasoning about concurrent program ownership. The authors prove that the core Boolean structure of tree shares is decidable with a specific complexity class, closing a gap between theoretical models and practical verification tools. They also show that combining this with multiplicative operations leads to a non-elementary lower bound, but that practical use cases likely avoid this worst-case scenario.

What Problem Does This Paper Address?

Concurrent program verification often relies on fractional permissions to track how much of a resource a thread owns. While simple rational numbers were initially used, they clashed with the "disjointness" property of separation logic. The "tree share" model was introduced to preserve this property, leading to its adoption in several program logics and verification tools. However, a lack of systematic theoretical study made decision procedures for tree shares difficult to implement, especially when dealing with arbitrary constants beyond the basic "empty" and "full" shares. This paper aims to provide a rigorous complexity analysis of tree shares, bridging the gap between theoretical expressiveness and practical usability.

Methods

The paper employs techniques from computational complexity theory, including:

  • Many-one reductions: Used to establish lower bounds by showing that a known hard problem can be transformed into a problem concerning tree shares.
  • Alternating Turing Machines (ATMs): Used to define complexity classes like STA, which are crucial for characterizing the computational power of the theories studied.
  • Isomorphisms: Demonstrating that different structures (like tree shares and string structures) are computationally equivalent, allowing complexity results to be transferred.
  • Algorithm Design: The paper introduces a flatten algorithm that transforms arbitrary tree share formulas into an equivalent form using only basic constants ({•, 0}), which is key to proving upper bounds.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • Decidability of the Boolean Core: The fundamental Boolean structure of tree shares (union, intersection, complement) is decidable, even with arbitrary tree constants. This is a significant theoretical result that underpins the practical usability of tree shares.
  • Bridging Theory and Practice: The paper shows that the complexity of the Boolean structure is STA(*, 2<sup>O(n)</sup>, n)-complete, which matches the complexity of the first-order theory of real numbers. This provides a precise complexity characterization that was previously missing.
  • The Cost of Multiplication: Combining the additive structure with multiplicative operations (even restricted ones) leads to a non-elementary lower bound. This highlights the inherent complexity introduced by multiplication.
  • Practicality Prevails: Despite the non-elementary worst-case complexity, the paper suggests that practical verification scenarios, which often involve formulas with few quantifier alternations or specific structures (like biabduction problems), are likely to remain decidable within elementary time bounds.
  • Algorithm for Simplification: The flatten algorithm is a key technical contribution, enabling the reduction of complex tree share formulas to simpler ones, thereby proving upper bounds on decidability.

Key Results

  • The first-order theory of the Boolean structure of tree shares (T, ㄩ, ㄇ, ¬) is ≤log-complete for STA(*, 2<sup>O(n)</sup>, n), even with arbitrary tree constants.
  • The combined additive and restricted multiplicative theory of tree shares has a non-elementary lower bound.
  • The restricted multiplicative theory of tree shares (without Boolean operators) has an elementary complexity, specifically ≤log-lin-complete for STA(*, 2<sup>O(n)</sup>, n).
  • The existential theory of the Boolean tree share structure with arbitrary constants is NP-complete.

Limitations and Future Work

  • Non-elementary Bound: The paper acknowledges the non-elementary lower bound for the combined additive and multiplicative theory. While they argue that practical use cases might avoid this, it remains a theoretical limitation.
  • Monadic Second-Order Theory: The decidability of the monadic second-order theory over these structures is left as an open question.
  • Existential Theory of C: The precise complexity of the existential theory of the combined structure C (Boolean operators + right-sided multiplication) is not fully determined, with only an exponential-time upper bound and an NP lower bound known.
  • Left-Sided Multiplication: The decidability of existential or first-order theories with left-sided multiplication is also an open problem.

The authors suggest future work should focus on precisely characterizing the complexity of the existential theory of C, exploring the decidability of theories with left-sided multiplication, and investigating the monadic second-order theory. They also propose exploring newer techniques like antichain/simulation for handling complex formulas.

Summary updated

BibTeX
@inproceedings{le2018complexity,
  author = {Xuan Bach Le and Aquinas Hobor and Anthony W. Lin},
  title = {{Complexity Analysis of Tree Share Structure}},
  booktitle = {APLAS},
  year = {2018},
  doi = {10.1007/978-3-030-02768-1\_5},
}
Figure