Recognition: no theorem link
Complexity of Consistency Testing for the Release-Acquire Semantics
Pith reviewed 2026-05-15 17:07 UTC · model grok-4.3
The pith
Consistency testing for release-acquire memory is polynomial-time when each location has at most one writer.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Consistency testing under the release-acquire variant of the C11 memory model lies in P when every memory location is written by at most one thread. The same problem is NP-hard when two threads may write any given location, and under the Exponential Time Hypothesis it admits no 2^{o(k)} n^{O(1)} algorithm once three writers per location are permitted.
What carries the argument
A polynomial-time graph reachability procedure that exploits the single-writer restriction to construct a total order on writes and check release-acquire synchronization edges without enumerating interleavings.
Load-bearing premise
The release-acquire semantics are taken exactly as defined in the C11 standard and prior literature, without extra constraints on thread or location counts.
What would settle it
An execution with one writer per location on which the claimed polynomial algorithm outputs 'consistent' yet an exhaustive enumeration of possible interleavings shows a violation of release-acquire ordering.
Figures
read the original abstract
In a seminal work, Gibbons and Korach 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 NP-hard even under strong syntactic restrictions. More recently, Chakraborty et al. considered the problem for weak memory models and proved that 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 NP-hard for sequential consistency. We complement this upper bound with tight hardness results: the problem is NP-hard when two threads may write to the same location, and allowing three writers per location rules out 2^{o(k)}.n^{O(1)} algorithms under the Exponential Time Hypothesis, where k denotes the number of threads, and n the number of memory operations.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper studies the complexity of deciding whether an observed execution trace is consistent with the release-acquire (RA) fragment of the C11 memory model. The central positive result is a polynomial-time algorithm for consistency testing when each memory location has at most one writer (multiple readers permitted). This is contrasted with the known NP-hardness of the same syntactic restriction under sequential consistency. The paper complements the upper bound with matching hardness: NP-hardness already holds when two threads may write the same location, and an ETH-based lower bound rules out 2^{o(k)} n^{O(1)} algorithms when three writers per location are allowed (k = number of threads, n = number of operations).
Significance. If the results hold, the work supplies a clean complexity map for RA consistency checking that is absent from prior literature. The polynomial-time algorithm under the single-writer restriction is a concrete algorithmic contribution that exploits the RA semantics in a way that does not apply to sequential consistency; the hardness results are tight and obtained via standard parameterized-complexity reductions. The paper therefore both improves the state of the art for weak-memory verification and clarifies why the choice of memory model qualitatively changes the complexity of the consistency problem.
minor comments (3)
- [§4] The high-level description of the polynomial-time algorithm (presumably in §4) would be easier to follow if a short pseudocode block or a diagram of the dependency-graph construction were added.
- [Theorem 5.3] In the ETH lower-bound statement, the parameter k is defined as the number of threads; it would help to restate this explicitly in the theorem statement rather than only in the surrounding text.
- [§2] A few citations to the original C11 RA formalization (e.g., the precise happens-before and release-acquire axioms used) appear only in the introduction; repeating the key definitions in a dedicated preliminary section would improve self-containedness.
Simulated Author's Rebuttal
We thank the referee for the positive assessment of our work and the recommendation for minor revision. The summary accurately captures the main contributions, and we are glad that the distinction between the release-acquire model and sequential consistency is viewed as a useful clarification for the complexity of consistency checking.
Circularity Check
No significant circularity detected in derivation chain
full rationale
The paper establishes a polynomial-time algorithm for RA consistency testing under the single-writer-per-location restriction via direct algorithmic construction, and complements it with standard NP-hardness reductions (from known problems) and ETH lower bounds. These steps rely on independent complexity-theoretic techniques and the external C11 RA model definition; no self-definitional equations, fitted parameters renamed as predictions, or load-bearing self-citations appear. The contrast with SC hardness is external and does not reduce the central claims to their own inputs by construction.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption Release-acquire semantics defined exactly as in the C11 standard and prior literature on weak memory models
- standard math Standard NP-completeness and ETH assumptions from complexity theory
Reference graph
Works this paper leans on
-
[1]
Agarwal, P., Chatterjee, K., Pathak, S., Pavlogiannis, A., Toman, V.: Stateless model checking under a reads-value-from equivalence. In: CAV (1). Lecture Notes in Computer Science, vol. 12759, pp. 341–366. Springer (2021)
work page 2021
-
[2]
Ahamad, M., Neiger, G., Burns, J.E., Kohli, P., Hutto, P.W.: Causal mem- ory: Definitions, implementation, and programming. Distrib. Comput.9(1), 37–49 (mar 1995).https://doi.org/10.1007/BF01784241,https://doi.org/10.1007/ BF01784241
-
[3]
Batty, M., Owens, S., Sarkar, S., Sewell, P., Weber, T.: Mathematizing C++ concurrency. In: POPL’11. pp. 55–66. ACM (2011).https://doi.org/10.1145/ 1926385.1926394
- [4]
-
[5]
Proceedings of the ACM on Programming Languages5(OOPSLA), 1–30 (2021)
Bui, T.L., Chatterjee, K., Gautam, T., Pavlogiannis, A., Toman, V.: The reads- from equivalence for the tso and pso memory models. Proceedings of the ACM on Programming Languages5(OOPSLA), 1–30 (2021)
work page 2021
-
[6]
Burckhardt, S.: Principles of Eventual Consistency. Foundations and Trends in Programming Languages1(1-2), 1–150 (2014).https://doi.org/10.1561/ 2500000011
work page 2014
-
[7]
Chakraborty, S., Krishna, S.N., Mathur, U., Pavlogiannis, A.: How hard is weak- memory testing? Proc. ACM Program. Lang.8(POPL), 1978–2009 (2024)
work page 1978
- [8]
-
[9]
Chini, P., Saivasan, P.: A framework for consistency algorithms. In: Saxena, N., Simon, S. (eds.) 40th IARCS Annual Conference on Foundations of Soft- ware Technology and Theoretical Computer Science, FSTTCS 2020, December 14-18, 2020, BITS Pilani, K K Birla Goa Campus, Goa, India (Virtual Confer- ence). LIPIcs, vol. 182, pp. 42:1–42:17. Schloss Dagstuhl ...
-
[10]
Gibbons, P.B., Korach, E.: Testing shared memories. SIAM J. Comput.26(4), 1208–1244 (1997)
work page 1997
-
[11]
Impagliazzo, R., Paturi, R., Zane, F.: Which problems have strongly exponential complexity? J. Comput. Syst. Sci.63(4), 512–530 (2001) Complexity of Consistency Testing for the RA Semantics 17
work page 2001
-
[12]
JáJá, J.: An Introduction to Parallel Algorithms. Addison–Wesley (1992)
work page 1992
-
[13]
Kokologiannakis, M., Lahav, O., Sagonas, K., Vafeiadis, V.: Effective stateless model checking for c/c++ concurrency. Proc. ACM Program. Lang.2(POPL) (Dec 2017).https://doi.org/10.1145/3158105,https://doi.org/10.1145/3158105
-
[14]
Kokologiannakis, M., Lahav, O., Vafeiadis, V.: Kater: Automating weak mem- ory model metatheory and consistency checking. Proc. ACM Program. Lang. 7(POPL) (Jan 2023).https://doi.org/10.1145/3571212,https://doi.org/10. 1145/3571212
-
[15]
Lahav, O., Boker, U.: What’s decidable about causally consistent shared memory? ACM Trans. Program. Lang. Syst.44(2) (apr 2022).https://doi.org/10.1145/ 3505273
work page 2022
-
[16]
Lahav, O., Boker, U.: What’s decidable about causally consistent shared memory? ACM Trans. Program. Lang. Syst.44(2), 8:1–8:55 (2022).https://doi.org/10. 1145/3505273,https://doi.org/10.1145/3505273
-
[17]
Lahav, O., Vafeiadis, V., Kang, J., Hur, C.K., Dreyer, D.: Repairing sequential con- sistency in C/C++11. In: PLDI 2017. pp. 618–632 (2017).https://doi.org/10. 1145/3062341.3062352, technical Appendix Available athttps://plv.mpi-sws. org/scfix/full.pdf
-
[18]
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM21(7), 558–565 (1978)
work page 1978
-
[19]
Lokshtanov, D., Marx, D., Saurabh, S.: Lower bounds based on the exponen- tial time hypothesis. Bull. EATCS105, 41–72 (2011),http://eatcs.org/beatcs/ index.php/beatcs/article/view/92
work page 2011
-
[20]
Luo, W., Demsky, B.: C11Tester: A Race Detector for C/C++ Atomics, pp. 630–
-
[21]
Association for Computing Machinery, New York, NY, USA (2021).https: //doi.org/10.1145/3445814.3446711
- [22]
-
[23]
Margalit, R., Lahav, O.: Verifying observational robustness against a c11-style memory model. Proc. ACM Program. Lang.5(POPL) (Jan 2021).https://doi. org/10.1145/3434285,https://doi.org/10.1145/3434285
- [24]
-
[25]
Norris, B., Demsky, B.: Cdschecker: checking concurrent data structures written with c/c++ atomics. In: Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications. p. 131–150. OOPSLA ’13, Association for Computing Machinery, New York, NY, USA(2013).https://doi.org/10.1145/2509136.2509514,ht...
-
[26]
Qadeer, S.: Verifying sequential consistency on shared-memory multiprocessors by model checking. IEEE Trans. Parallel Distributed Syst.14(8), 730–741 (2003)
work page 2003
-
[27]
Tunç, H.C., Abdulla, P.A., Chakraborty, S., Krishna, S., Mathur, U., Pavlogiannis, A.: Optimal reads-from consistency checking for c11-style memory models. Proc. ACM Program. Lang.7(PLDI) (jun 2023).https://doi.org/10.1145/3591251, https://doi.org/10.1145/3591251
-
[28]
Vassilevska Williams, V., Williams, R.R.: Subcubic equivalences between path, matrix, and triangle problems. J. ACM65(5), 27:1–27:38 (2018) 18 R. Govind et al. A Appendix for Section 3 A.1 Proofs of Section 3.1 Lemma 2.LetX=⟨E,po,rf,mo⟩be a1-Writerexecution graph. Then, for M ∈ {SRA,RA}, we haveX|=Miffmoagrees withpoandX|=WRA. Proof.Let us begin withM=RA....
work page 2018
-
[29]
For every(e 1, e2)∈hbsuch that(e i, e)∈hbfor eachi∈[2], we have (e1, e2)∈ob e
-
[30]
Foreveryconflictingtriplets(w,r,w ′)suchthat:(ii)(w ′,r)∈ob e and(iii)(r, e)∈ po?, we have(w′,w)∈ob e. The idea is that any thread which executes the readrmust observewafter it has observedw ′ so that it does not read an obsolete value. For any evente, obe containshb, andobgrows monotonically as we move down a thread inpo- order. That is, for any(e1, e2)∈...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.