Abstract
Stateless model checking (SMC) is an automatic technique with low memory requirements for finding errors in concurrent programs or for checking for their absence. To be effective, SMC tools require algorithms that combat the combinatorial explosion in the number of process/thread interactions that need to be explored. In recent years, a plethora of such algorithms have emerged, which can be classified broadly in those that explore interleavings (i.e., complete serializations of events) and those that explore traces (i.e., graphs of events). In either case, an SMC algorithm is optimal if it explores exactly one representative from each class of equivalent executions. In this paper, we examine the parallelization of a state-of-the-art graph-based algorithm for SMC under sequential consistency, based on the reads-from relation. The algorithm is provably optimal, and in practice spends only polynomial time per equivalence class. We present the modifications to the algorithm that its parallelization requires and implementation aspects that allow us to make it scalable. We report on the performance and scalability that we were able to achieve on C/pthread programs, and how this performance compares to that of other SMC tools. Finally, we argue for the inherent advantages that graph-based algorithms have over interleaving-based ones for achieving scalability when parallelism enters the picture.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
In Table 1, entries
signify that the tool cannot handle that program; a
symbol that the benchmark does not complete after running for more than ten hours. The circular-buffer program contains a concurrency error which only manifests itself for parameter values \(\ge 10\). The CDSChecker tool finds this error immediately (within the first few executions), hence the
symbols for its circular-buffer(10) entries. The remaining three tools are not so lucky in their search, and catch the error after exploring many executions. The parallel version of Nidhugg/rfsc detects this error at a point that is influenced by the distribution of tasks to threads, which also explains the slight variation in the curve of circular-buffer(10) in Fig. 4.
References
Abdulla, P.A., Aronis, S., Atig, M.F., Jonsson, B., Leonardsson, C., Sagonas, K.: Stateless model checking for TSO and PSO. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 353–367. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_28
Abdulla, P.A., Aronis, S., Jonsson, B., Sagonas, K.: Source sets: a foundation for optimal dynamic partial order reduction. J. ACM 64(4), 25:1–25:49 (2017). http://doi.acm.org/10.1145/3073408
Abdulla, P.A., Atig, M.F., Jonsson, B., Lång, M., Ngo, T.P., Sagonas, K.: Optimal stateless model checking for reads-from equivalence under sequential consistency. Proc. ACM Program. Lang. 3(OOPSLA), 150:1–150:29 (2019). https://doi.org/10.1145/3360576
Abdulla, P.A., Atig, M.F., Jonsson, B., Lång, M., Ngo, T.P., Sagonas, K.: Optimal Stateless Model Checking for Reads-From Equivalence under Sequential Consistency (2019). https://doi.org/10.5281/zenodo.3401442, artifact for the OOPSLA 2019 paper with the same title
Albert, E., Arenas, P., de la Banda, M.G., Gómez-Zamalloa, M., Stuckey, P.J.: Context-sensitive dynamic partial order reduction. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 526–543. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_26
Aronis, S., Jonsson, B., Lång, M., Sagonas, K.: Optimal dynamic partial order reduction with observers. In: Beyer, D., Huisman, M. (eds.) TACAS 2018. LNCS, vol. 10806, pp. 229–248. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89963-3_14
Blumofe, R.D., Leiserson, C.E.: Scheduling multithreaded computations by work stealing. J. ACM 46(5), 720–748 (1999). https://doi.org/10.1145/324133.324234
Chalupa, M., Chatterjee, K., Pavlogiannis, A., Sinha, N., Vaidya, K.: Data-centric dynamic partial order reduction. Proc. ACM Program. Lang. 2(POPL), 31:1–31:30 (2018). http://doi.acm.org/10.1145/3158119
Chatterjee, K., Pavlogiannis, A., Toman, V.: Value-centric dynamic partial order reduction. Proc. ACM Program. Lang. 3(OOPSLA), 124:1–124:29 (2019). https://doi.org/10.1145/3360550
Christakis, M., Gotovos, A., Sagonas, K.: Systematic testing for detecting concurrency errors in Erlang programs. In: Sixth IEEE International Conference on Software Testing, Verification and Validation, pp. 154–163. ICST 2013, IEEE, Los Alamitos, CA, USA, March 2013. https://doi.org/10.1109/ICST.2013.50
Flanagan, C., Godefroid, P.: Dynamic partial-order reduction for model checking software. In: Principles of Programming Languages, (POPL). pp. 110–121. ACM, New York, NY, USA, January 2005. http://doi.acm.org/10.1145/1040305.1040315
Godefroid, P.: Model checking for programming languages using VeriSoft. In: Principles of Programming Languages, (POPL), pp. 174–186. ACM Press, New York, NY, USA, January 1997. http://doi.acm.org/10.1145/263699.263717
Godefroid, P., Hanmer, R.S., Jagadeesan, L.: Model checking without a model: an analysis of the heart-beat monitor of a telephone switch using VeriSoft. In: Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 124–133. ISSTA, ACM, New York, NY, USA, March 1998. https://doi.org/10.1145/271771.271800
Holzmann, G.J., Bosnacki, D.: The design of a multicore extension of the SPIN model checker. IEEE Trans. Softw. Eng. 33(10), 659–674 (2007). https://doi.org/10.1109/TSE.2007.70724
Holzmann, G.J., Joshi, R., Groce, A.: Swarm verification techniques. IEEE Trans. Softw. Eng. 37(6), 845–857 (2011). https://doi.org/10.1109/TSE.2010.110
Kokologiannakis, M., Lahav, O., Sagonas, K., Vafeiadis, V.: Effective stateless model checking for C/C++ concurrency. Proc. ACM on Program. Lang. 2(POPL), 17:1–17:32 (2018). https://doi.org/10.1145/3158105
Kokologiannakis, M., Raad, A., Vafeiadis, V.: Model checking for weakly consistent libraries. In: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 96–110. PLDI 2019, ACM, New York, NY, USA, June 2019. https://doi.org/10.1145/3314221.3314609
Kokologiannakis, M., Sagonas, K.: Stateless model checking of the Linux kernel’s read-copy update (RCU). Int. J. Softw. Tools Technol. Transfer 21(3), 287–306 (2019). https://doi.org/10.1007/s10009-019-00514-6
Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Nainar, P.A., Neamtiu, I.: Finding and reproducing heisenbugs in concurrent programs. In: Proceedings of the 8th USENIX Symposium on Operating Systems Design and Implementation, pp. 267–280. OSDI 2008, USENIX Association, Berkeley, CA, USA, December 2008. http://dl.acm.org/citation.cfm?id=1855741.1855760
Norris, B., Demsky, B.: A practical approach for model checking C/C++11 code. ACM Trans. Program. Lang. Syst. 38(3), 10:1–10:51 (2016). http://doi.acm.org/10.1145/2806886
Puente, J.P.B.: Persistence for the masses: RRB-vectors in a systems language. Proc. ACM Program. Lang. 1(ICFP) (2017). https://doi.org/10.1145/3110260
Rodríguez, C., Sousa, M., Sharma, S., Kroening, D.: Unfolding-based partial order reduction. In: 26th International Conference on Concurrency Theory (CONCUR 2015). LIPIcs, vol. 42, pp. 456–469. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, August 2015. http://dx.doi.org/10.4230/LIPIcs.CONCUR.2015.456
Simsa, J., Bryant, R., Gibson, G., Hickey, J.: Scalable dynamic partial order reduction. In: Qadeer, S., Tasiran, S. (eds.) RV 2012. LNCS, vol. 7687, pp. 19–34. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-35632-2_4
Stern, U., Dill, D.L.: Parallelizing the mur\(\phi \) verifier. Formal Methods Syst. Des. 18, 117–129 (2001). https://doi.org/10.1023/A:1008771324652
Yang, Y., Chen, X., Gopalakrishnan, G., Kirby, R.M.: Distributed dynamic partial order reduction based verification of threaded software. In: Bošnački, D., Edelkamp, S. (eds.) SPIN 2007. LNCS, vol. 4595, pp. 58–75. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73370-6_6
Zhang, N., Kusano, M., Wang, C.: Dynamic partial order reduction for relaxed memory models. In: Programming Language Design and Implementation (PLDI), pp. 250–259. ACM, New York, NY, USA, June 2015. http://doi.acm.org/10.1145/2737924.2737956
Acknowledgments
We would like to acknowledge the work of Nodari Kankava and Alexis Remmers for an initial prototype implementation of the algorithm which formed the basis for Par-RF-SMC ’s implementation in Nidhugg. This work has been partially supported by the Swedish Research Council through grant #621-2017-04812, and by the Swedish Foundation for Strategic Research through the aSSIsT project.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Lång, M., Sagonas, K. (2020). Parallel Graph-Based Stateless Model Checking. In: Hung, D.V., Sokolsky, O. (eds) Automated Technology for Verification and Analysis. ATVA 2020. Lecture Notes in Computer Science(), vol 12302. Springer, Cham. https://doi.org/10.1007/978-3-030-59152-6_21
Download citation
DOI: https://doi.org/10.1007/978-3-030-59152-6_21
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-59151-9
Online ISBN: 978-3-030-59152-6
eBook Packages: Computer ScienceComputer Science (R0)