Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Source Sets: A Foundation for Optimal Dynamic Partial Order Reduction

Published: 17 August 2017 Publication History

Abstract

Stateless model checking is a powerful method for program verification that, however, suffers from an exponential growth in the number of explored executions. A successful technique for reducing this number, while still maintaining complete coverage, is Dynamic Partial Order Reduction (DPOR), an algorithm originally introduced by Flanagan and Godefroid in 2005 and since then not only used as a point of reference but also extended by various researchers. In this article, we present a new DPOR algorithm, which is the first to be provably optimal in that it always explores the minimal number of executions. It is based on a novel class of sets, called source sets, that replace the role of persistent sets in previous algorithms. We begin by showing how to modify the original DPOR algorithm to work with source sets, resulting in an efficient and simple-to-implement algorithm, called source-DPOR. Subsequently, we enhance this algorithm with a novel mechanism, called wakeup trees, that allows the resulting algorithm, called optimal-DPOR, to achieve optimality. Both algorithms are then extended to computational models where processes may disable each other, for example, via locks. Finally, we discuss tradeoffs of the source- and optimal-DPOR algorithm and present programs that illustrate significant time and space performance differences between them. We have implemented both algorithms in a publicly available stateless model checking tool for Erlang programs, while the source-DPOR algorithm is at the core of a publicly available stateless model checking tool for C/pthread programs running on machines with relaxed memory models. Experiments show that source sets significantly increase the performance of stateless model checking compared to using the original DPOR algorithm and that wakeup trees incur only a small overhead in both time and space in practice.

References

[1]
Parosh Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson, and Konstantinos Sagonas. 2015. Stateless model checking for TSO and PSO. In Proceedings of the 21st International Conference on Tools and Algorithms for the Construction and Analysis of Systems TACAS’15), Christel Baier and Cesare Tinelli (Eds.), LCNS, Vol. 9035, Springer, Berlin, 353--367.
[2]
Joe Armstrong. 2010. Erlang. Commun. ACM 539 (Sept. 2010). 68--75.
[3]
Stavros Aronis and Konstantinos Sagonas. 2012. On using Erlang for parallelization—experience from parallelizing Dialyzer. In Proceedings of the 13th International Symposium on Trends in Functional Programming, Hans-Wolfgang Loidl and Ricardo Peña (Eds.), LCNS, Vol. 7829, Springer, Berlin, 295--310.
[4]
Maria Christakis, Alkis Gotovos, and Konstantinos Sagonas. 2013. Systematic testing for detecting concurrency errors in Erlang programs. In Proceedings of the 6th IEEE International Conference on Software Testing, Verification and Validation (ICST’13). IEEE Computer Society, Los Alamitos, CA, 154--163.
[5]
Edmund M. Clarke, E. Allen Emerson, and A. Prasad Sistla. 1983. Automatic verification of finite-state concurrent systems using temporal logics specification: A practical approach. In Proceedings of the 10th Annual ACM Symposium on Principles of Programming Languages. ACM Press, 117--126.
[6]
Edmund M. Clarke, Orna Grumberg, Marius Minea, and Doron Peled. 1999. State space reduction using partial order techniques. Int. J. Softw. Tools Technol. Transfer 2, 3 (Nov. 1999), 279--287.
[7]
Brian Demsky and Patrick Lam. 2015. SATCheck: SAT-directed stateless model checking for SC and TSO. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’15). ACM, New York, NY, 20--36.
[8]
Michael Emmi, Shaz Qadeer, and Zvonimir Rakamarić. 2011. Delay-bounded scheduling. In Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’11). ACM, New York, NY, 411--422.
[9]
Cormac Flanagan and Patrice Godefroid. 2005a. Addendum to Dynamic Partial-order Reduction for Model Checking Software. Retrieved from http://research.microsoft.com/en-us/um/people/pg/
[10]
Cormac Flanagan and Patrice Godefroid. 2005b. Dynamic partial-order reduction for model checking software. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’05). ACM, New York, NY, 110--121.
[11]
Patrice Godefroid. 1996. Partial-Order Methods for the Verification of Concurrent Systems: An Approach to the State-Explosion Problem. Ph.D. Dissertation. University of Liège.
[12]
Patrice Godefroid. 1997. Model checking for programming languages using VeriSoft. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’97). ACM, New York, NY, 174--186.
[13]
Patrice Godefroid. 2005. Software model checking: The VeriSoft approach. Formal Methods Syst. Des. 26, 2 (March 2005), 77--101.
[14]
Patrice Godefroid, Gerard J. Holzmann, and Didier Pirottin. 1995. State-space caching revisited. Formal Methods Syst. Des. 7, 3 (Nov. 1995), 227--241.
[15]
Patrice Godefroid and Didier Pirottin. 1993. Refining dependencies improves partial-order verification methods. In Computer Aided Verification, Costas Courcoubetis (Ed.), LCNS, Vol. 697, Springer, London, UK, 438--449.
[16]
Patrice Godefroid and Pierre Wolper. 1991. Using partial orders for the efficient verification of deadlock freedom and safety properties. In Computer Aided Verification, Kim G. Larsen and Arne Skou (Eds.), LCNS, Vol. 575, Springer-Verlag, London, UK, 332--342.
[17]
Jeff Huang. 2015. Stateless model checking concurrent programs with maximal causality reduction. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2015). ACM, New York, NY, 165--174.
[18]
Kari K&aumle;hk&oumle;nen, Olli Saarikivi, and Keijo Heljanko. 2012. Using unfoldings in automated testing of multithreaded programs. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering (ASE 2012). ACM, New York, NY, 150--159.
[19]
Vineet Kahlon, Chao Wang, and Aarti Gupta. 2009. Monotonic partial order reduction: An optimal symbolic partial order reduction technique. In Computer Aided Verification, Ahmed Bouajjani and Oded Maler (Eds.), LCNS, Vol. 5643, Springer, Berlin, 398--413.
[20]
Harmen Kastenberg and Arend Rensink. 2008. Dynamic partial order reduction using probe sets. In Concurrency Theory, Franck van Breugel and Marsha Chechnik (Eds.), LNCS, Vol. 5201, Springer, 233--247.
[21]
Shmuel Katz and Doron Peled. 1992. Defining conditional independence using collapses. Theoret. Comput. Sci. 101, 2 (July 1992), 337--359.
[22]
Sarfraz Khurshid, Corina S. Păsăreanu, and Willem Visser. 2003. Generalized symbolic execution for model checking and testing. In Proceedings of the 9th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, Hubert Garavel and John Hatcliff (Eds.), LNCS, Vol. 2619, Springer, Berlin, Heidelberg, 553--568.
[23]
Michalis Kokologiannakis and Konstantinos Sagonas. 2017. Stateless model checking of the Linux Kernel’s hierarchical read-copy-update (tree RCU). In Proceedings of the 24th International SPIN Symposium on Model Checking of Software (SPIN’17). ACM, New York, NY, 172--181.
[24]
Leslie Lamport. 1978. Time, clocks and the ordering of events in a distributed system. Comm. ACM 21, 7 (July 1978), 558--565.
[25]
Steven Lauterburg, Rajesh K. Karmani, Darko Marinov, and Gul Agha. 2010. Evaluating ordering heuristics for dynamic partial-order reduction techniques. In Fundamental Approaches to Software Engineering, 13th International Conference (FASE’10), David S. Rosenblum and Gabriele Taentzer (Eds.), LNCS, Vol. 6013, Springer, Berlin Heidelberg, 308--322.
[26]
Yu Lei and Richard H. Carver. 2006. Reachability testing of concurrent programs. IEEE Trans. Softw. Eng. 32, 6 (June 2006), 382--403.
[27]
Friedemann Mattern. 1989. Virtual time and global states of distributed systems. In Proceedings of the Workshop on Parallel and Distributed Algorithms, M. Cosnard et al. (Ed.). North-Holland/Elsevier, 215--226.
[28]
Antoni Mazurkiewicz. 1987. Trace theory. In Petri Nets: Applications and Relationships to Other Models of Concurrency, W. Brauer, W. Reisig, and G. Rozenberg (Eds.), LNCS, Vol. 255, Springer, Berlin, 279--324.
[29]
Kenneth L. McMillan. 1995. A technique of a state space search based on unfolding. Formal Methods Syst. Des. 6, 1 (Jan. 1995), 45--65.
[30]
Madanlal Musuvathi and Shaz Qadeer. 2007. Iterative context bounding for systematic testing of multithreaded programs. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’07). ACM, New York, NY, 446--455.
[31]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gerald Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. 2008. Finding and reproducing Heisenbugs in concurrent programs. In Proceedings of the 8th USENIX Symposium on Operating Systems Design and Implementation (OSDI’08). USENIX Association, Berkeley, CA, 267--280. http://dl.acm.org/citation.cfm?id=1855741.1855760
[32]
Doron Peled. 1993. All from one, one for all, on model-checking using representatives. In Computer Aided Verification, Costas Courcoubetis (Ed.), LNCS, Vol. 697, Springer-Verlag, London, UK, 409--423.
[33]
Jean-Pierre Queille and Joseph Sifakis. 1982. Specification and verification of concurrent systems in CESAR. In Proceedings of the International Symposium on Programming, Mariangiola Dezani-Ciancaglini and Ugo Montanari (Eds.), LNCS, Vol. 137, Springer Verlag, Berlin, 337--351.
[34]
C&ecute;sar Rodríguez, Marcelo Sousa, Subodh Sharma, and Daniel Kroening. 2015. Unfolding-based partial order reduction. In Proceedings of the 26th International Conference on Concurrency Theory (CONCUR’15), LIPIcs, Vol. 42, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 456--469.
[35]
Stuart Russell and Peter Norvig. 2009. Artificial Intelligence: A Modern Approach (3rd ed.). Pearson Education Limited, Essex, UK.
[36]
Olli Saarikivi, Kari K&aumle;hk&oumle;nen, and Keijo Heljanko. 2012. Improving dynamic partial order reductions for concolic testing. In Proceedings of the 12th International Conference on Application of Concurrency to System Design (ACSD’12). IEEE, Los Alamitos, CA, 132--141.
[37]
Koushik Sen and Gul Agha. 2006. Automated systematic testing of open distributed programs. In Fundamental Approaches to Software Engineering, 9th International Conference (FASE’06), Luciano Baresi and Reiko Heckel (Eds.), LCNS, Vol. 3922, Springer, Berlin, 339--356.
[38]
Koushik Sen and Gul Agha. 2007. A race-detection and flipping algorithm for automated testing of multi-threaded programs. In Haifa Verification Conference, Eyal Bin, Avi Ziv, and Shmuel Ur (Eds.), LNCS, Vol. 4383, Springer, Berlin, 166--182.
[39]
Traian-Florin Serbanuta, Feng Chen, and Grigore Rosu. 2012. Maximal causal models for sequentially consistent systems. In Runtime Verification, Third International Conference, RV 2012, Revised Selected Papers. Shaz Qadeer and Serdar Tasiran (Eds.), LCNS, Vol. 7687, Springer, Berlin, 136--150.
[40]
Samira Tasharofi, Rajesh K. Karmani, Steven Lauterburg, Axel Legay, Darko Marinov, and Gul Agha. 2012. TransDPOR: A novel dynamic partial-order reduction technique for testing actor programs. In Formal Techniques for Distributed Systems. Holger Giese and Grigore Rosu (Eds.), LNCS, Vol. 7273, Springer, Berlin Heidelberg, 219--234.
[41]
Antti Valmari. 1991. Stubborn sets for reduced state space generation. In Advances in Petri Nets 1990, Grzegorz Rozenberg (Ed.), LCNS, Vol. 483, Springer-Verlag, London, UK, 491--515.

Cited By

View all
  • (2024)SPORE: Combining Symmetry and Partial Order ReductionProceedings of the ACM on Programming Languages10.1145/36564498:PLDI(1781-1803)Online publication date: 20-Jun-2024
  • (2024)Parsimonious Optimal Dynamic Partial Order ReductionComputer Aided Verification10.1007/978-3-031-65630-9_2(19-43)Online publication date: 25-Jul-2024
  • (2024)Fairness and Liveness Under Weak ConsistencyTaming the Infinities of Concurrency10.1007/978-3-031-56222-8_1(1-21)Online publication date: 20-Mar-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Journal of the ACM
Journal of the ACM  Volume 64, Issue 4
August 2017
197 pages
ISSN:0004-5411
EISSN:1557-735X
DOI:10.1145/3133211
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 August 2017
Accepted: 01 March 2017
Revised: 01 March 2017
Received: 01 April 2016
Published in JACM Volume 64, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Dynamic partial order reduction
  2. concurrency
  3. software model checking
  4. source sets
  5. systematic testing
  6. wakeup trees

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • Linnaeus centre of excellence UPMARC (Uppsala Programming for Multicore Architectures Research Center)
  • EU FP7 STREP project RELEASE
  • Swedish Research Council

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)31
  • Downloads (Last 6 weeks)2
Reflects downloads up to 01 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)SPORE: Combining Symmetry and Partial Order ReductionProceedings of the ACM on Programming Languages10.1145/36564498:PLDI(1781-1803)Online publication date: 20-Jun-2024
  • (2024)Parsimonious Optimal Dynamic Partial Order ReductionComputer Aided Verification10.1007/978-3-031-65630-9_2(19-43)Online publication date: 25-Jul-2024
  • (2024)Fairness and Liveness Under Weak ConsistencyTaming the Infinities of Concurrency10.1007/978-3-031-56222-8_1(1-21)Online publication date: 20-Mar-2024
  • (2023)Depth-First Net Unfoldings and Equivalent ReductionSymmetry10.3390/sym1509177515:9(1775)Online publication date: 16-Sep-2023
  • (2023)Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation LevelsProceedings of the ACM on Programming Languages10.1145/35912437:PLDI(565-590)Online publication date: 6-Jun-2023
  • (2023)Tailoring Stateless Model Checking for Event-Driven Multi-threaded ProgramsAutomated Technology for Verification and Analysis10.1007/978-3-031-45332-8_9(176-198)Online publication date: 19-Oct-2023
  • (2023)Overcoming Memory Weakness with Unified FairnessComputer Aided Verification10.1007/978-3-031-37706-8_10(184-205)Online publication date: 17-Jul-2023
  • (2023)A Pragmatic Approach to Stateful Partial Order ReductionVerification, Model Checking, and Abstract Interpretation10.1007/978-3-031-24950-1_7(129-154)Online publication date: 16-Jan-2023
  • (2022)Abstractions for the local-time semantics of timed automata: a foundation for partial-order methodsProceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3531130.3533343(1-14)Online publication date: 2-Aug-2022
  • (2022)A dual number abstraction for static analysis of Clarke JacobiansProceedings of the ACM on Programming Languages10.1145/34987186:POPL(1-30)Online publication date: 12-Jan-2022
  • Show More Cited By

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media