\emph{Trace theory} (formulated by Mazurkiewicz in 1987) is a principled framework for defining equivalence relations for concurrent program runs based on a commutativity relation over the set of atomic steps taken by individual program threads. Its simplicity, elegance, and algorithmic efficiency makes it useful in many different contexts including program verification and testing. It is well-understood that the larger the equivalence classes are, the more benefits they would bring to the algorithms and applications that use them. In this paper, we study relaxations of trace equivalence with the goal of maintaining its algorithmic advantages.
We first prove that the largest appropriate relaxation of trace equivalence, an equivalence relation that preserves the order of steps taken by each thread \emph{and} what write operation each read operation observes, does not yield efficient algorithms. Specifically, we prove a \emph{linear space lower bound} for the problem of checking, in a streaming setting, if two arbitrary steps of a concurrent program run are \emph{causally concurrent} (i.e. they can be reordered in an equivalent run) or \emph{causally ordered }(i.e. they always appear in the same order in all equivalent runs). The same problem can be decided in \emph{constant space} for trace equivalence. Next, we propose a new commutativity-based notion of equivalence called \emph{grain equivalence} that is strictly more relaxed than trace equivalence, and yet yields a constant space algorithm for the same problem. This notion of equivalence uses commutativity of \emph{grains}, which are sequences of atomic steps, in addition to the standard commutativity from trace theory. We study the two distinct cases when the grains are contiguous subwords of the input program run and when they are not, formulate the precise definition of causal concurrency in each case, and show that they can be decided in \emph{constant space}, despite being strict relaxations of the notion of causal concurrency based on trace equivalence.
Note: All missing proofs have been submitted as an anonymous supplementary material.
Wed 17 JanDisplayed time zone: London change
16:50 - 18:10 | |||
16:50 20mTalk | A Universal, Sound, and Complete Forward Reasoning Technique for Machine-Verified Proofs of Linearizability POPL Prasad Jayanti Department of Computer Science, Dartmouth College, USA, Siddhartha Jayanti Google Research, Ugur Y. Yavuz Boston University, Lizzie Hernandez Videa Microsoft | ||
17:10 20mTalk | Predictive Monitoring against Pattern Regular Languages POPL Pre-print | ||
17:30 20mTalk | Commutativity Simplifies Proofs of Parameterized Programs POPL Azadeh Farzan University of Toronto, Dominik Klumpp University of Freiburg, Andreas Podelski University of Freiburg Pre-print | ||
17:50 20mTalk | Coarser Equivalences for Causal Concurrency POPL Pre-print |