English

Efficient Dynamic Algorithms to Predict Short Races

Programming Languages 2026-03-04 v1 Data Structures and Algorithms

Abstract

We introduce and study the problem of detecting short races in an observed trace. Specifically, for a race type RR, given a trace σ\sigma and window size ww, the task is to determine whether there exists an RR-race (e1,e2)(e_1, e_2) in σ\sigma such that the subtrace starting with e1e_1 and ending with e2e_2 contains at most ww events. We present a monitoring framework for short-race prediction and instantiate the framework for happens-before and sync-preserving races, yielding efficient detection algorithms. Our happens-before algorithm runs in the same time as FastTrack but uses space that scales with logw\log w as opposed to logσ\log |\sigma|. For sync-preserving races, our algorithm runs faster and consumes significantly less space than SyncP. Our experiments validate the effectiveness of these short-race detection algorithms: they run more efficiently, use less memory, and detect significantly more races under the same budget, offering a reasonable balance between resource usage and predictive power.

Keywords

Cite

@article{arxiv.2603.03141,
  title  = {Efficient Dynamic Algorithms to Predict Short Races},
  author = {Minjian Zhang and Mahesh Viswanathan},
  journal= {arXiv preprint arXiv:2603.03141},
  year   = {2026}
}

Comments

Manuscript under review

R2 v1 2026-07-01T11:01:23.766Z