skip to main content

Truly stateless, optimal dynamic partial order reduction

Published:12 January 2022Publication History
Skip Abstract Section

Abstract

Dynamic partial order reduction (DPOR) verifies concurrent programs by exploring all their interleavings up to some equivalence relation, such as the Mazurkiewicz trace equivalence. Doing so involves a complex trade-off between space and time. Existing DPOR algorithms are either exploration-optimal (i.e., explore exactly only interleaving per equivalence class) but may use exponential memory in the size of the program, or maintain polynomial memory consumption but potentially explore exponentially many redundant interleavings.

In this paper, we show that it is possible to have the best of both worlds: exploring exactly one interleaving per equivalence class with linear memory consumption. Our algorithm, TruSt, formalized in Coq, is applicable not only to sequential consistency, but also to any weak memory model that satisfies a few basic assumptions, including TSO, PSO, and RC11. In addition, TruSt is embarrassingly parallelizable: its different exploration options have no shared state, and can therefore be explored completely in parallel. Consequently, TruSt outperforms the state-of-the-art in terms of memory and/or time.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This video summarizes the main results from POPL'22 paper "Truly Stateless, Optimal Dynamic Partial Order Reduction" and provides some insights on the key idea.

References

  1. 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. Vol. 9035. LNCS. Berlin, Heidelberg: Springer, pp. 353-367. doi: https://doi.org/10.1007/978-3-662-46681-0_28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Parosh Aziz Abdulla, Stavros Aronis, Bengt Jonsson, and Konstantinos Sagonas ( 2014 ). “Optimal dynamic partial order reduction.” In: POPL 2014. New York, NY, USA: ACM, pp. 373-384. doi: https://doi.org/10.1145/2535838.2535845. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Parosh Aziz Abdulla, Stavros Aronis, Bengt Jonsson, and Konstantinos Sagonas (Sept. 2017 ). “Source sets: A foundation for optimal dynamic partial order reduction.” In: J. ACM 64.4, 25 : 1-25 : 49. doi: https://doi.org/10.1145/3073408. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, Magnus Lång, Tuan Phong Ngo, and Konstantinos Sagonas (Oct. 10, 2019 ). “Optimal stateless model checking for reads-from equivalence under sequential consistency.” In: Proc. ACM Program. Lang. 3 (OOPSLA), 150 : 1-150 : 29. doi: https://doi.org/10.1145/3360576. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, and Carl Leonardsson ( 2016 ). “Stateless model checking for POWER.” In: CAV 2016. Vol. 9780. LNCS. Berlin, Heidelberg: Springer, pp. 134-156. doi: https://doi.org/10.1007/978-3-319-41540-6_8. Google ScholarGoogle ScholarCross RefCross Ref
  6. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, and Tuan Phong Ngo (Oct. 2018 ). “Optimal stateless model checking under the release-acquire semantics.” In: Proc. ACM Program. Lang. 2.OOPSLA, 135 : 1-135 : 29. doi: https : //doi.org/10.1145/3276505. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Pratyush Agarwal, Krishnendu Chatterjee, Shreya Pathak, Andreas Pavlogiannis, and Viktor Toman ( July 2021 ). “Stateless Model Checking Under a Reads-Value-From Equivalence.” In: CAV 2021. Ed. by Alexandra Silva and K. Rustan M. Leino. Cham: Springer International Publishing, pp. 341-366. doi: https://doi.org/10.1007/978-3-030-81685-8_16. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Elvira Albert, Miguel Gómez-Zamalloa, Miguel Isabel, and Albert Rubio ( 2018 ). “Constrained dynamic partial order reduction.” In: CAV 2018. Ed. by Hana Chockler and Georg Weissenbacher. Cham: Springer International Publishing, pp. 392-410. doi: https://doi.org/10.1007/978-3-319-96142-2_24. Google ScholarGoogle ScholarCross RefCross Ref
  9. Jade Alglave, Luc Maranget, and Michael Tautschnig ( July 2014 ). “Herding cats: Modelling, simulation, testing, and data mining for weak memory.” In: ACM Trans. Program. Lang. Syst. 36.2, 7 : 1-7 : 74. doi: https://doi.org/10.1145/2627752. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Stavros Aronis, Bengt Jonsson, Magnus Lång, and Konstantinos Sagonas ( 2018 ). “Optimal dynamic partial order reduction with observers. ” In: TACAS 2018. Vol. 10806. LNCS. Springer, pp. 229-248. doi: https://doi.org/10.1007/978-3-319-89963-3_14. Google ScholarGoogle ScholarCross RefCross Ref
  11. Ranadeep Biswas and Constantin Enea (Oct. 2019 ). “ On the Complexity of Checking Transactional Consistency.” In: Proc. ACM Program. Lang. 3.OOPSLA. doi: https://doi.org/10.1145/3360591. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Truc Lam Bui, Krishnendu Chatterjee, Tushar Gautam, Andreas Pavlogiannis, and Viktor Toman (Oct. 2021 ). “The Readsfrom Equivalence for the TSO and PSO Memory Models.” In: Proc. ACM Program. Lang. 5.OOPSLA. doi: https://doi.org/ 10.1145/3485541. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Marek Chalupa, Krishnendu Chatterjee, Andreas Pavlogiannis, Nishant Sinha, and Kapil Vaidya (Dec. 2017 ). “Data-centric dynamic partial order reduction.” In: Proc. ACM Program. Lang. 2.POPL, 31 : 1-31 : 30. doi: https://doi.org/10.1145/3158119. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Krishnendu Chatterjee, Andreas Pavlogiannis, and Viktor Toman (Oct. 2019 ). “ Value-Centric Dynamic Partial Order Reduction.” In: Proc. ACM Program. Lang. 3.OOPSLA. doi: https://doi.org/10.1145/3360550. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Cormac Flanagan and Patrice Godefroid ( 2005 ). “Dynamic partial-order reduction for model checking software.” In: POPL 2005. New York, NY, USA: ACM, pp. 110-121. doi: https://doi.org/10.1145/1040305.1040315. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Patrice Godefroid ( 1997 ). “Model checking for programming languages using VeriSoft.” In: POPL 1997. Paris, France: ACM, pp. 174-186. doi: https://doi.org/10.1145/263699.263717. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Patrice Godefroid (Mar. 2005 ). “Software Model Checking: The VeriSoft Approach.” In: Form. Meth. Syst. Des. 26.2, pp. 77-101. doi: https://doi.org/10.1007/s10703-005-1489-x. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Michalis Kokologiannakis, Ori Lahav, Konstantinos Sagonas, and Viktor Vafeiadis (Dec. 2017 ). “Efective stateless model checking for C/C++ concurrency.” In: Proc. ACM Program. Lang. 2.POPL, 17 : 1-17 : 32. doi: https://doi.org/10.1145/3158105. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Michalis Kokologiannakis, Iason Marmanis, Vladimir Gladstein, and Viktor Vafeiadis (Jan. 2022 ). “Truly Stateless, Optimal Dynamic Partial Order Reduction (supplementary material).” In: url: https://plv.mpi-sws.org/genmc.Google ScholarGoogle Scholar
  20. Michalis Kokologiannakis, Azalea Raad, and Viktor Vafeiadis ( 2019 ). “Model checking for weakly consistent libraries.” In: PLDI 2019. New York, NY, USA: ACM. doi: https://doi.org/10.1145/3314221.3314609. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Michalis Kokologiannakis and Viktor Vafeiadis ( 2020 ). “HMC: Model checking for hardware memory models.” In: ASPLOS 2020. ASPLOS '20. Lausanne, Switzerland: ACM, pp. 1157-1171. doi: https://doi.org/10.1145/3373376.3378480. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Ori Lahav and Viktor Vafeiadis ( 2015 ). “Owicki-Gries Reasoning for Weak Memory Models.” In: ICALP 2015. Vol. 9135. LNCS. Springer, pp. 311-323. doi: https://doi.org/10.1007/978-3-662-47666-6_25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ori Lahav, Viktor Vafeiadis, Jeehoon Kang, Chung-Kil Hur, and Derek Dreyer ( 2017 ). “Repairing sequential consistency in C/C++ 11.” In: PLDI 2017. Barcelona, Spain: ACM, pp. 618-632. doi: https://doi.org/10.1145/3062341.3062352. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Leslie Lamport (Sept. 1979 ). “How to Make a Multiprocessor Computer that Correctly Executes Multiprocess Programs.” In: IEEE Trans. Computers 28.9, pp. 690-691. doi: https://doi.org/10.1109/TC. 1979. 1675439. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Magnus Lång and Konstantinos Sagonas ( 2020 ). “Parallel Graph-Based Stateless Model Checking.” In: ATVA 2020. Ed. by Dang Van Hung and Oleg Sokolsky. Cham: Springer International Publishing, pp. 377-393. doi: https://doi.org/10.1007/978-3-030-59152-6_21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Antoni Mazurkiewicz ( 1987 ). “Trace Theory.” In: PNAROMC 1987. Vol. 255. LNCS. Berlin, Heidelberg: Springer, pp. 279-324. doi: https://doi.org/10.1007/3-540-17906-2_30. Google ScholarGoogle ScholarCross RefCross Ref
  27. 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, pp. 267-280. url: https://www.usenix.org/legacy/events/osdi08/tech/full_papers/musuvathi/musuvathi. pdf (visited on Nov. 16, 2020 ).Google ScholarGoogle Scholar
  28. Huyen T. T. Nguyen, César Rodríguez, Marcelo Sousa, Camille Coti, and Laure Petrucci ( 2018 ). “Quasi-optimal partial order reduction.” In: CAV 2018. Ed. by Hana Chockler and Georg Weissenbacher. Vol. 10982. LNCS. Springer, pp. 354-371. doi: https://doi.org/10.1007/978-3-319-96142-2_22. Google ScholarGoogle ScholarCross RefCross Ref
  29. Brian Norris and Brian Demsky ( 2013 ). “CDSChecker: Checking concurrent data structures written with C/C++ atomics.” In: OOPSLA 2013. ACM, pp. 131-150. doi: https://doi.org/10.1145/2509136.2509514. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Christopher Pulte, Shaked Flur, Will Deacon, Jon French, Susmit Sarkar, and Peter Sewell ( 2018 ). “Simplifying ARM concurrency: Multicopy-atomic axiomatic and operational models for ARMv8.” In: Proc. ACM Program. Lang. 2.POPL, 19 : 1-19 : 29. doi: https://doi.org/10.1145/3158107. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Peter Sewell, Susmit Sarkar, Scott Owens, Francesco Zappa Nardelli, and Magnus O. Myreen ( July 2010 ). “X86-TSO: A Rigorous and Usable Programmer's Model for x86 Multiprocessors.” In: Commun. ACM 53.7, pp. 89-97. doi: https: //doi.org/10.1145/1785414.1785443. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Dennis Shasha and Marc Snir (Apr. 1988 ). “Eficient and correct execution of parallel programs that share memory.” In: ACM Trans. Program. Lang. Syst. 10.2, pp. 282-312. doi: https://doi.org/10.1145/42190.42277. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. SPARC International Inc. ( 1994 ). The SPARC architecture manual (version 9). Prentice-Hall.Google ScholarGoogle Scholar
  34. Naling Zhang, Markus Kusano, and Chao Wang ( 2015 ). “Dynamic partial order reduction for relaxed memory models.” In: PLDI 2015. New York, NY, USA: ACM, pp. 250-259. doi: https://doi.org/10.1145/2737924.2737956. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Truly stateless, optimal dynamic partial order reduction

      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!