English

CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis

Programming Languages 2024-04-01 v2

Abstract

Dynamic analyses are a standard approach to analyzing and testing concurrent programs. Such techniques observe program traces and analyze them to infer the presence or absence of bugs. At its core, each analysis maintains a partial order PP that represents order dependencies between events of the analyzed trace σ\sigma. Naturally, the scalability of the analysis largely depends on how efficiently it maintains PP. The standard data structure for this task has thus far been vector clocks. These, however, are slow for analyses that follow a non-streaming style, costing O(n)O(n) for inserting (and propagating) each new ordering in PP, where nn is the size of σ\sigma, while they cannot handle the deletion of existing orderings. In this paper we develop collective sparse segment trees (CSSTs), a simple but elegant data structure for generically maintaining a partial order PP. CSSTs thrive when the width kk of PP is much smaller than the size nn of its domain, allowing inserting, deleting, and querying for orderings in PP to run in O(logn)O(logn) time. For a concurrent trace, kk is bounded by the number of its threads, and is normally orders of magnitude smaller than its size nn, making CSSTs fitting for this setting. Our experimental results confirm that CSSTs are the best data structure currently to handle a range of dynamic analyses from existing literature.

Keywords

Cite

@article{arxiv.2403.17818,
  title  = {CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis},
  author = {Hünkar Can Tunç and Ameya Prashant Deshmukh and Berk Çirisci and Constantin Enea and Andreas Pavlogiannis},
  journal= {arXiv preprint arXiv:2403.17818},
  year   = {2024}
}