Affiliation:
1. Uppsala University, Sweden
Abstract
We present a new approach for stateless model checking (SMC) of multithreaded programs under Sequential Consistency (SC) semantics. To combat state-space explosion, SMC is often equipped with a partial-order reduction technique, which defines an equivalence on executions, and only needs to explore one execution in each equivalence class. Recently, it has been observed that the commonly used equivalence of Mazurkiewicz traces can be coarsened but still cover all program crashes and assertion violations. However, for this coarser equivalence, which preserves only the reads-from relation from writes to reads, there is no SMC algorithm which is (i)
optimal
in the sense that it explores precisely one execution in each reads-from equivalence class, and (ii)
efficient
in the sense that it spends polynomial effort per class. We present the first SMC algorithm for SC that is both optimal and efficient
in practice
, meaning that it spends polynomial time per equivalence class on all programs that we have tried. This is achieved by a
novel test
that checks whether a given reads-from relation can arise in some execution. We have implemented the algorithm by extending Nidhugg, an SMC tool for C/C++ programs, with a new mode called rfsc. Our experimental results show that Nidhugg/rfsc, although slower than the fastest SMC tools in programs where tools happen to examine the same number of executions, always scales similarly or better than them, and outperforms them by an exponential factor in programs where the reads-from equivalence is coarser than the standard one. We also present two non-trivial use cases where the new equivalence is particularly effective, as well as the significant performance advantage that Nidhugg/rfsc offers compared to state-of-the-art SMC and systematic concurrency testing tools.
Funder
Vetenskapsrådet
Stiftelsen för Strategisk Forskning
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
33 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Testing Concurrent Algorithms on JVM with Lincheck and IntelliJ IDEA;Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis;2024-09-11
2. SPORE: Combining Symmetry and Partial Order Reduction;Proceedings of the ACM on Programming Languages;2024-06-20
3. 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
4. Greybox Fuzzing for Concurrency Testing;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2;2024-04-27
5. How Hard Is Weak-Memory Testing?;Proceedings of the ACM on Programming Languages;2024-01-05