Lune

ASPLOS2022Top-tier venue

A tree clock data structure for causal orderings in concurrent executions

Umang Mathur, Andreas Pavlogiannis, Hünkar Can Tunç, Mahesh Viswanathan

Abstract

Dynamic techniques are a scalable and effective way to analyze concurrent programs. Instead of analyzing all behaviors of a program, these techniques detect errors by focusing on a single program execution. Often a crucial step in these techniques is to define a causal ordering between events in the execution, which is then computed using vector clocks, a simple data structure that stores logical times of threads. The two basic operations of vector clocks, namely join and copy, require Θ(𝑘) time, where 𝑘 is the number of threads. Thus they are a computational bottleneck when 𝑘 is large.

In this work, we introduce tree clocks, a new data structure that replaces vector clocks for computing causal orderings in program executions. Joining and copying tree clocks takes time that is roughly proportional to the number of entries being modified, and hence the two operations do not suffer the a-priori Θ(𝑘) cost per application. We show that when used to compute the classic happens-before (HB) partial order, tree clocks are optimal, in the sense that no other data structure can lead to smaller asymptotic running time. Moreover, we demonstrate that tree clocks can be used to compute other partial orders, such as schedulable-happens-before (SHB) and the standard Mazurkiewicz (MAZ) partial order, and thus are a versatile data structure. Our experiments show that just by replacing vector clocks with tree clocks, the computation becomes from 2.02× faster (MAZ) to 2.66× (SHB) and 2.97× (HB) on average per benchmark. These results illustrate that tree clocks have the potential to become a standard data structure with wide applications in concurrent analyses.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Complexity of Dynamic Data Race Prediction cites Fast, sound, and effectively complete dynamic race prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites The Complexity of Dynamic Data Race Prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Fast, sound, and effectively complete dynamic race prediction
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites SmartTrack: efficient predictive race detection
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Atomicity Checking in Linear Time using Vector Clocks
  • CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis cites Optimistic Prediction of Synchronization-Reversal Data Races
  • Dynamic Race Detection with O(1) Samples cites The Complexity of Dynamic Data Race Prediction
  • Dynamic Race Detection with O(1) Samples cites Fast, sound, and effectively complete dynamic race prediction
  • Dynamic Race Detection with O(1) Samples cites SmartTrack: efficient predictive race detection
  • Dynamic Race Detection with O(1) Samples cites Atomicity Checking in Linear Time using Vector Clocks
  • Dynamic Race Detection with O(1) Samples cites Optimal prediction of synchronization-preserving races
  • SmartTrack: efficient predictive race detection cites Fast, sound, and effectively complete dynamic race prediction
  • Predictive Monitoring against Pattern Regular Languages cites The Complexity of Dynamic Data Race Prediction
  • Predictive Monitoring against Pattern Regular Languages cites Fast, sound, and effectively complete dynamic race prediction
  • Predictive Monitoring against Pattern Regular Languages cites SmartTrack: efficient predictive race detection
  • Predictive Monitoring against Pattern Regular Languages cites Atomicity Checking in Linear Time using Vector Clocks
  • Predictive Monitoring against Pattern Regular Languages cites Optimal prediction of synchronization-preserving races
  • Optimal prediction of synchronization-preserving races cites The Complexity of Dynamic Data Race Prediction
  • Optimal prediction of synchronization-preserving races cites Fast, sound, and effectively complete dynamic race prediction
  • Optimal prediction of synchronization-preserving races cites SmartTrack: efficient predictive race detection
  • Optimal prediction of synchronization-preserving races cites Atomicity Checking in Linear Time using Vector Clocks
  • Optimistic Prediction of Synchronization-Reversal Data Races cites The Complexity of Dynamic Data Race Prediction
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Dynamic Race Detection with O(1) Samples
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Fast, sound, and effectively complete dynamic race prediction
  • Optimistic Prediction of Synchronization-Reversal Data Races cites SmartTrack: efficient predictive race detection
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Atomicity Checking in Linear Time using Vector Clocks
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Predictive Monitoring against Pattern Regular Languages
  • Optimistic Prediction of Synchronization-Reversal Data Races cites Optimal prediction of synchronization-preserving races
  • AWDIT: An Optimal Weak Database Isolation Tester cites The Complexity of Dynamic Data Race Prediction
  • AWDIT: An Optimal Weak Database Isolation Tester cites CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis
  • AWDIT: An Optimal Weak Database Isolation Tester cites Fast, sound, and effectively complete dynamic race prediction
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. Predictive Monitoring against Pattern Regular LanguagesZhendong Ang, Umang MathurPOPL 2024 · 12 citations
  2. Dynamic Race Detection with O(1) SamplesMosaad Al Thokair, Minjian Zhang, Umang Mathur, Mahesh ViswanathanPOPL 2023 · 9 citations
  3. Optimistic Prediction of Synchronization-Reversal Data RacesZheng Shi, Umang Mathur, Andreas PavlogiannisICSE 2024 · 8 citations
  4. CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution AnalysisHünkar Can Tunç, Ameya Prashant Deshmukh, Berk Çirisci, Constantin Enea et al.ASPLOS 2024 · 6 citations
  5. AWDIT: An Optimal Weak Database Isolation TesterLasse Møldrup, Andreas PavlogiannisPLDI 2025 · 5 citations

Builds on6

  1. Fast, sound, and effectively complete dynamic race predictionAndreas PavlogiannisPOPL 2020 · 46 citations
  2. Optimal prediction of synchronization-preserving racesUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanPOPL 2021 · 36 citations
  3. SmartTrack: efficient predictive race detectionJake Roemer, Kaan Genç, Michael D. BondPLDI 2020 · 28 citations
  4. The Complexity of Dynamic Data Race PredictionUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanLICS 2020 · 27 citations
  5. Atomicity Checking in Linear Time using Vector ClocksUmang Mathur, Mahesh ViswanathanASPLOS 2020 · 27 citations

Related papers

  1. Efficient Timestamping for Sampling-Based Race DetectionMinjian Zhang, Daniel Wee Soong Lim, Mosaad Al Thokair, Umang Mathur et al.PLDI 2025 · 1 citation
  2. Unblocking Dynamic Partial Order ReductionMichalis Kokologiannakis, Iason Marmanis, Viktor VafeiadisCAV 2023 · 7 citations
  3. Predictive Monitoring with Strong Trace PrefixesZhendong Ang, Umang MathurCAV 2024 · 3 citations
  4. Efficient Predictive Monitoring of Message Passing Interface ProgramsJiaqiang Yao, Haocheng Geng, Zhenbang ChenISSTA 2026
  5. Detecting concurrency vulnerabilities based on partial orders of memory and thread eventsKunpeng Yu, Chenxu Wang, Yan Cai, Xiapu Luo et al.FSE 2021 · 9 citations
Dusk over the sea between two cliffs drawn in fine vertical lines