# Dynamic Race Prediction in Linear Time

**Authors:** Dileep Kini, Umang Mathur, Mahesh Viswanathan

arXiv: 1704.02432 · 2017-12-20

## TL;DR

This paper introduces a new relation called weak-causally-precedes (WCP) that improves race detection in concurrent software by detecting more races efficiently in linear time across entire executions.

## Contribution

The paper proposes WCP, a relation that is more effective than previous methods like HB and CP, with a linear time algorithm applicable to complete executions.

## Key findings

- WCP detects more data races than CP and HB.
- WCP algorithm runs in linear time.
- WCP works on entire execution traces without fragmentation.

## Abstract

Writing reliable concurrent software remains a huge challenge for today's programmers. Programmers rarely reason about their code by explicitly considering different possible inter-leavings of its execution. We consider the problem of detecting data races from individual executions in a sound manner. The classical approach to solving this problem has been to use Lamport's happens-before (HB) relation. Until now HB remains the only approach that runs in linear time. Previous efforts in improving over HB such as causally-precedes (CP) and maximal causal models fall short due to the fact that they are not implementable efficiently and hence have to compromise on their race detecting ability by limiting their techniques to bounded sized fragments of the execution. We present a new relation weak-causally-precedes (WCP) that is provably better than CP in terms of being able to detect more races, while still remaining sound. Moreover it admits a linear time algorithm which works on the entire execution without having to fragment it.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.02432/full.md

## Figures

16 figures with captions in the complete paper: https://tomesphere.com/paper/1704.02432/full.md

## References

50 references — full list in the complete paper: https://tomesphere.com/paper/1704.02432/full.md

---
Source: https://tomesphere.com/paper/1704.02432