skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Effective lock handling in stateless model checking

Published:10 October 2019Publication History
Skip Abstract Section

Abstract

Stateless Model Checking (SMC) is a verification technique for concurrent programs that checks for safety violations by exploring all possible thread interleavings. SMC is usually coupled with Partial Order Reduction (POR), which exploits the independence of instructions to avoid redundant explorations when an equivalent one has already been considered. While effective POR techniques have been developed for many different memory models, they are only able to exploit independence at the instruction level, which makes them unsuitable for programs with coarse-grained synchronization mechanisms such as locks.

We present a lock-aware POR algorithm, LAPOR, that exploits independence at both instruction and critical section levels. This enables LAPOR to explore exponentially fewer interleavings than the state-of-the-art techniques for programs that use locks conservatively. Our algorithm is sound, complete, and optimal, and can be used for verifying programs under several different memory models. We implement LAPOR in a tool and show that it can be exponentially faster than the state-of-the-art model checkers.

References

  1. Parosh Abdulla, Stavros Aronis, Bengt Jonsson, and Konstantinos Sagonas. 2014. Optimal dynamic partial order reduction. In POPL 2014. ACM, New York, NY, USA, 373–384. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson, and Konstantinos Sagonas. 2015. Stateless Model Checking for TSO and PSO. In TACAS 2015 (LNCS), Vol. 9035. Springer, Berlin, Heidelberg, 353–367. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, and Carl Leonardsson. 2016. Stateless Model Checking for POWER. In CAV 2016 (LNCS), Vol. 9780. Springer, Berlin, Heidelberg, 134–156. Google ScholarGoogle ScholarCross RefCross Ref
  4. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, and Tuan Phong Ngo. 2018. Optimal Stateless Model Checking Under the Release-acquire Semantics. Proc. ACM Program. Lang. 2, OOPSLA, Article 135 (Oct. 2018), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Elvira Albert, Miguel Gómez-Zamalloa, Miguel Isabel, and Albert Rubio. 2018. Constrained Dynamic Partial Order Reduction. In CAV 2018 (LNCS), Vol. 10982. Springer, Berlin, Heidelberg, 392–410. Google ScholarGoogle ScholarCross RefCross Ref
  6. Jade Alglave, Daniel Kroening, and Michael Tautschnig. 2013. Partial Orders for Efficient Bounded Model Checking of Concurrent Software. In CAV 2013 (LNCS), Vol. 8044. Springer, Berlin, Heidelberg, 141–157. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stavros Aronis, Bengt Jonsson, Magnus Lång, and Konstantinos Sagonas. 2018. Optimal Dynamic Partial Order Reduction with Observers. In TACAS 2018 (LNCS), Vol. 10806. Springer, Berlin, Heidelberg, 229–248. Google ScholarGoogle ScholarCross RefCross Ref
  8. Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. 2011. Mathematizing C++ Concurrency. In POPL 2011. ACM, New York, NY, USA, 55–66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Marek Chalupa, Krishnendu Chatterjee, Andreas Pavlogiannis, Nishant Sinha, and Kapil Vaidya. 2017. Data-centric Dynamic Partial Order Reduction. Proc. ACM Program. Lang. 2, POPL, Article 31 (Dec. 2017), 30 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cormac Flanagan and Patrice Godefroid. 2005. Dynamic partial-order reduction for model checking software. In POPL 2005. ACM, New York, NY, USA, 110–121. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Patrice Godefroid. 1997. Model Checking for Programming Languages using VeriSoft. In POPL 1997. ACM, New York, NY, USA, 174–186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Jeff Huang. 2015. Stateless model checking concurrent programs with maximal causality reduction. In PLDI 2015. ACM, New York, NY, USA, 165–174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Shiyou Huang and Jeff Huang. 2016. Maximal Causality Reduction for TSO and PSO. In OOPSLA 2016. ACM, New York, NY, USA, 447–461. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dileep Kini, Umang Mathur, and Mahesh Viswanathan. 2017. Dynamic Race Prediction in Linear Time. In PLDI 2017. ACM, New York, NY, USA, 157–170. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Michalis Kokologiannakis, Ori Lahav, Konstantinos Sagonas, and Viktor Vafeiadis. 2017. Effective Stateless Model Checking for C/C++ Concurrency. Proc. ACM Program. Lang. 2, POPL, Article 17 (Dec. 2017), 32 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Michalis Kokologiannakis, Azalea Raad, and Viktor Vafeiadis. 2019. Model Checking for Weakly Consistent Libraries. In PLDI 2019. ACM, New York, NY, USA, 15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Ori Lahav and Viktor Vafeiadis. 2015. Owicki-Gries Reasoning for Weak Memory Models. In ICALP 2015 (LNCS), Vol. 9135. Springer, Berlin, Heidelberg, 311–323. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ori Lahav, Viktor Vafeiadis, Jeehoon Kang, Chung-Kil Hur, and Derek Dreyer. 2017. Repairing Sequential Consistency in C/C++11. In PLDI 2017. ACM, New York, NY, USA, 618–632. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Leslie Lamport. 1979. How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs. IEEE Trans. Computers 28, 9 (Sept. 1979), 690–691. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Antoni Mazurkiewicz. 1987. Trace Theory. In Petri nets: Applications and relationships to other models of concurrency (LNCS), Vol. 255. Springer, Berlin, Heidelberg, 279–324. Google ScholarGoogle ScholarCross RefCross Ref
  21. Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gérard Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. 2008. Finding and Reproducing Heisenbugs in Concurrent Programs. In OSDI 2008. USENIX Association, Berkeley, CA, USA, 267–280.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Brian Norris and Brian Demsky. 2013. CDSChecker: Checking concurrent data structures written with C/C++ atomics. In OOPSLA 2013. ACM, New York, NY, USA, 131–150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Scott Owens, Susmit Sarkar, and Peter Sewell. 2009. A Better x86 Memory Model: x86-TSO. In TPHOLs 2009. Springer, 391–407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Christos H. Papadimitriou. 1979. The Serializability of Concurrent Database Updates. J. ACM 26, 4 (Oct. 1979), 631–653. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. César Rodríguez, Marcelo Sousa, Subodh Sharma, and Daniel Kroening. 2015. Unfolding-based Partial Order Reduction. In CONCUR 2015 (LIPIcs), Vol. 42. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 456–469. Google ScholarGoogle ScholarCross RefCross Ref
  26. Jake Roemer, Kaan Genç, and Michael D. Bond. 2018. High-coverage, Unbounded Sound Predictive Race Detection. In PLDI 2018. ACM, New York, NY, USA, 374–389. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Dennis Shasha and Marc Snir. 1988. Efficient and Correct Execution of Parallel Programs That Share Memory. ACM Trans. Program. Lang. Syst. 10, 2 (April 1988), 282–312. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound Predictive Race Detection in Polynomial Time. In POPL 2012. ACM, New York, NY, USA, 387–400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. SPARC International Inc. 1994. The SPARC architecture manual (version 9). Prentice-Hall.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. SV-COMP. 2019. Competition on Software Verification (SV-COMP). https://sv-comp.sosy-lab.org/2019/ [Online; accessed 27-March-2019].Google ScholarGoogle Scholar
  31. Naling Zhang, Markus Kusano, and Chao Wang. 2015. Dynamic partial order reduction for relaxed memory models. In PLDI 2015. ACM, New York, NY, USA, 250–259. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Effective lock handling in stateless model checking

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!