Complexity of Consistency Testing for the Release-Acquire Semantics
Open Access
- 18 May 2026
- book chapter
- Published by Springer Nature
- p. 234-251
Abstract
In a seminal work, Gibbons and Korach [9] studied the complexity of deciding whether an observed sequence of reads and writes of a multi-threaded program admits a sequentially consistent interleaving. They showed the problem to be $$\textsf{NP}$$ -hard even under strong syntactic restrictions. More recently, Chakraborty et al. [6] considered the problem for weak memory models and proved that $$\textsf{NP}$$ -hardness remains even when the number of threads, the number of memory locations, and the value domain are all bounded. In this paper we revisit the problem for the release-acquire variants of the C11 memory model. Our main positive result is that consistency testing can be done in polynomial-time when each memory location is written by at most one thread (multiple readers are allowed). Notably, this restriction is already $$\textsf{NP}$$ -hard for the model of sequential consistency. We complement our upper bound with tight hardness results: we show the problem to be $$\textsf{NP}$$ -hard when two threads may write to the same location; furthermore, allowing three writers per location rules out $$2^{o(k)}\cdot n^{\mathcal {O}(1)}$$ algorithms under the Exponential Time Hypothesis, where k denotes the number of threads, and n the number of memory operations.
Keywords
All Related Versions
This publication has 22 references indexed in Scilit:
- Stateless Model Checking Under a Reads-Value-From Equivalence2021
- Effective stateless model checking for C/C++ concurrencyProceedings of the ACM on Programming Languages, 2017
- Repairing sequential consistency in C/C++112017
- On verifying causal consistency2017
- CDSchecker2013
- Mathematizing C++ concurrency2011
- Fast complete memory consistency verification2009
- Verifying sequential consistency on shared-memory multiprocessors by model checkingIEEE Transactions on Parallel and Distributed Systems, 2003
- Which Problems Have Strongly Exponential Complexity?Journal of Computer and System Sciences, 2001
- Testing Shared MemoriesSIAM Journal on Computing, 1997