Optimal Stateless Model Checking for Reads-From Equivalence under Sequential Consistency

被引:32
作者
Abdulla, Parosh Aziz [1 ]
Atig, Mohamed Faouzi [1 ]
Jonsson, Bengt [1 ]
Lang, Magnus [1 ]
Tuan Phong Ngo [1 ]
Sagonas, Konstantinos [1 ]
机构
[1] Uppsala Univ, Uppsala, Sweden
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2019年 / 3卷 / OOPSLA期
基金
瑞典研究理事会;
关键词
concurrent programs; sequential consistency; program verification; stateless model checking; dynamic partial order reduction;
D O I
10.1145/3360576
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:29
相关论文
共 40 条
[1]  
Abdulla Parosh Aziz, 2015, Tools and Algorithms for the Construction and Analysis of Systems. 21st International Conference, TACAS 2015, held as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015. Proceedings: LNCS 9035, P353, DOI 10.1007/978-3-662-46681-0_28
[2]   Optimal Dynamic Partial Order Reduction [J].
Abdulla, Parosh ;
Aronis, Stavros ;
Jonsson, Bengt ;
Sagonas, Konstantinos .
ACM SIGPLAN NOTICES, 2014, 49 (01) :373-384
[3]   Optimal Stateless Model Checking under the Release-Acquire Semantics [J].
Abdulla, Parosh Aziz ;
Atig, Mohamed Faouzi ;
Jonsson, Bengt ;
Tuan Phong Ngo .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2 (OOPSLA)
[4]   Source Sets: A Foundation for Optimal Dynamic Partial Order Reduction [J].
Abdulla, Parosh Aziz ;
Aronis, Stavros ;
Jonsson, Bengt ;
Sagonas, Konstantinos .
JOURNAL OF THE ACM, 2017, 64 (04)
[5]  
Abdulla Parosh Aziz, 2019, OPTIMAL STATELESS MO, DOI [10.5281/zenodo.3401442, DOI 10.5281/ZENODO.3401442]
[6]   Context-Sensitive Dynamic Partial Order Reduction [J].
Albert, Elvira ;
Arenas, Puri ;
Garcia de la Banda, Maria ;
Gomez-Zamalloa, Miguel ;
Stuckey, Peter J. .
COMPUTER AIDED VERIFICATION, CAV 2017, PT I, 2017, 10426 :526-543
[7]  
[Anonymous], 2013, P 5 USENIX WORKSH HO
[8]   Optimal Dynamic Partial Order Reduction with Observers [J].
Aronis, Stavros ;
Jonsson, Bengt ;
Lang, Magnus ;
Sagonas, Konstantinos .
TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, TACAS 2018, PT II, 2018, 10806 :229-248
[9]  
Biswas Ranadeep, 2019, P ACM PROGR LANG OOP
[10]  
Burckhardt S, 2010, ASPLOS XV: FIFTEENTH INTERNATIONAL CONFERENCE ON ARCHITECTURAL SUPPORT FOR PROGRAMMING LANGUAGES AND OPERATING SYSTEMS, P167