Affiliation:
1. Comenius University Bratislava, Slovakia
2. IST Austria, Austria
3. IIT Bombay, India
4. Aarhus University, Denmark
Abstract
The verification of concurrent programs remains an open challenge due to the non-determinism in inter-process communication. One recurring algorithmic problem in this challenge is the consistency verification of concurrent executions. In particular, consistency verification under a reads-from map allows to compute the
reads-from (RF) equivalence
between concurrent traces, with direct applications to areas such as Stateless Model Checking (SMC). Importantly, the RF equivalence was recently shown to be coarser than the standard Mazurkiewicz equivalence, leading to impressive scalability improvements for SMC under SC (sequential consistency). However, for the
relaxed memory
models of TSO and PSO (total/partial store order), the algorithmic problem of deciding the RF equivalence, as well as its impact on SMC, has been elusive.
In this work we solve the algorithmic problem of consistency verification for the TSO and PSO memory models given a reads-from map, denoted VTSO-rf and VPSO-rf, respectively. For an execution of
n
events over
k
threads and
d
variables, we establish novel bounds that scale as
n
k
+1
for TSO and as
n
k
+1
· min(
n
k
2
, 2
k
·
d
) for PSO. Moreover, based on our solution to these problems, we develop an SMC algorithm under TSO and PSO that uses the RF equivalence. The algorithm is
exploration-optimal
, in the sense that it is guaranteed to explore each class of the RF partitioning exactly once, and spends polynomial time per class when
k
is bounded. Finally, we implement all our algorithms in the SMC tool Nidhugg, and perform a large number of experiments over benchmarks from existing literature. Our experimental results show that our algorithms for VTSO-rf and VPSO-rf provide significant scalability improvements over standard alternatives. Moreover, when used for SMC, the RF partitioning is often much coarser than the standard Shasha-Snir partitioning for TSO/PSO, which yields a significant speedup in the model checking task.
Funder
Vienna Science and Technology Fund
European Research Council
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Trace and Algebraic Semantics for Partial Store Order Memory Model;2024 IEEE 48th Annual Computers, Software, and Applications Conference (COMPSAC);2024-07-02
2. CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3;2024-04-27
3. How Hard Is Weak-Memory Testing?;Proceedings of the ACM on Programming Languages;2024-01-05
4. Enhancing GenMC’s Usability and Performance;Lecture Notes in Computer Science;2024
5. Optimal Reads-From Consistency Checking for C11-Style Memory Models;Proceedings of the ACM on Programming Languages;2023-06-06