Skip to main content
Log in

Quasi-optimal partial order reduction

  • Published:
Formal Methods in System Design Aims and scope Submit manuscript

Abstract

A dynamic partial order reduction (DPOR) algorithm is optimal when it always explores at most one representative per Mazurkiewicz trace. Existing literature suggests that the reduction obtained by the non-optimal, state-of-the-art Source-DPOR (SDPOR) algorithm is comparable to optimal DPOR. We show the first program with \(\mathop {\mathcal {O}}(n)\) Mazurkiewicz traces where SDPOR explores \(\mathop {\mathcal {O}}(2^n)\) redundant schedules. We furthermore identify the cause of this blow-up as an NP-hard problem. Our main contribution is a new approach, called Quasi-Optimal POR, that can arbitrarily approximate an optimal exploration using a provided constant k. We present an implementation of our method in a new tool called Dpu  using specialised data structures. Experiments with Dpu, including Debian packages, show that optimality is achieved with low values of k, outperforming state-of-the-art tools.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Notes

  1. Observe that in this case, if \(\mathop { en }(C) \subseteq D\), the execution of never reaches line 10.

  2. See https://github.com/sosy-lab/sv-benchmarks/releases/tag/svcomp17.

References

  1. Abdulla P, Aronis S, Jonsson B, Sagonas K (2014) Optimal dynamic partial order reduction. In: The 41st annual ACM SIGPLAN-SIGACT symposium on principles of programming languages (POPL’14). ACM

  2. Abdulla PA, Aronis S, Atig MF, Jonsson B, Leonardsson C, Sagonas K (2015) Stateless model checking for TSO and PSO. In: International conference on tools and algorithms for the construction and analysis of systems (TACAS). Springer, pp 353–367

  3. Abdulla PA, Aronis S, Jonsson B, Sagonas K (2017a) Comparing source sets and persistent sets for partial order reduction. In: Models, algorithms, logics and tools—essays dedicated to Kim Guldstrand Larsen on the occasion of his 60th birthday, pp 516–536

  4. Abdulla PA, Aronis S, Jonsson B, Sagonas K (2017) Source sets: a foundation for optimal dynamic partial order reduction. J ACM 64(4):25:1–25:49

    Article  MathSciNet  Google Scholar 

  5. Abdulla PA, Atig MF, Jonsson B, Lång M, Ngo TP (2019) Sagonas K Optimal stateless model checking for reads-from equivalence under sequential consistency. Proc ACM Program Lang 3(OOPSLA):150:1–150:29

    Article  Google Scholar 

  6. Albert E, Gómez-Zamalloa M, Isabel M, Rubio A (2018) Constrained dynamic partial order reduction. In: Chockler H, Weissenbacher G (eds) Computer aided verification—30th international conference, CAV 2018, held as part of the federated logic conference, FloC 2018, Oxford, UK, July 14–17, 2018, Proceedings, Part II, Springer, Lecture Notes in Computer Science, vol 10982, pp 392–410

  7. Albert E, de la Banda MG, Gómez-Zamalloa M, Isabel M, Stuckey PJ (2019) Optimal context-sensitive dynamic partial order reduction with observers. In: Proceedings of the 28th ACM SIGSOFT international symposium on software testing and analysis. Association for Computing Machinery, Beijing, China, ISSTA 2019, pp 352–362. https://doi.org/10.1145/3293882.3330565

  8. Blktrace (2014) http://brick.kernel.dk/snaps/, version 1.1.0

  9. Chalupa M, Chatterjee K, Pavlogiannis A, Sinha N, Vaidya K (2018) Data-centric dynamic partial order reduction. Proc ACM Program Lang 2(POPL):31:1–31:30

    Article  Google Scholar 

  10. Chatterjee K, Pavlogiannis A, Toman V (2019) Value-centric dynamic partial order reduction. Proc ACM Program Lang 3(OOPSLA):124:1–124:29

    Article  Google Scholar 

  11. Chen D, Jiang Y, Xu C, Ma X, Lu J (2018) Testing multithreaded programs via thread speed control. In: Proceedings of the 2018 26th ACM joint meeting on European software engineering conference and symposium on the foundations of software engineering. Association for Computing Machinery, Lake Buena Vista, FL, USA, ESEC/FSE 2018, pp 15–25. https://doi.org/10.1145/3236024.3236077

  12. Clarke EM, Grumberg O, Peled D (1999) Model checking. MIT Press, Cambridge

    MATH  Google Scholar 

  13. Coons KE, Musuvathi M, McKinley KS (2013) Bounded partial-order reduction. In: OOPSLA, pp 833–848

  14. Esparza J (2010) A false history of true concurrency: From Petri to tools. In: Pol JVD, Weber M (eds) Proceedings of the SPIN, LNCS, vol 6349. Springer, pp 180–186

  15. Esparza J, Heljanko K (2008) Unfoldings—a partial-order approach to model checking. In: EATCS monographs in theoretical computer science. Springer

  16. Farzan A, Holzer A, Razavi N, Veith H (2013) Con2colic testing. In: Proceedings of the 2013 9th joint meeting on foundations of software engineering. ACM, New York, NY, USA, ESEC/FSE 2013, pp 37–47

  17. Flanagan C, Godefroid P (2005) Dynamic partial-order reduction for model checking software. In: Principles of programming languages (POPL). ACM, pp 110–121. https://doi.org/10.1145/1040305.1040315

  18. Godefroid P (1996) Partial-order methods for the verification of concurrent systems - An Approach to the State-Explosion Problem, LNCS, vol 1032. Springer, Berlin

    MATH  Google Scholar 

  19. Godefroid P (1997) Model checking for programming languages using VeriSoft. In: Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on principles of programming languages. Association for Computing Machinery, Paris, France, POPL ’97, pp 174–186. https://doi.org/10.1145/263699.263717

  20. Gueta G, Flanagan C, Yahav E, Sagiv M (2007) Cartesian partial-order reduction. In: Model checking software (SPIN), LNCS, vol 4595. Springer, pp 95–112

  21. MAFFT (2013) http://mafft.cbrc.jp/alignment/software/, version 7.307

  22. Mazurkiewicz A (1987) Trace theory. In: Petri nets: applications and relationships to other models of concurrency, LNCS, vol 255. Springer, pp 278–324

  23. McMillan KL (1993) Using unfoldings to avoid the state explosion problem in the verification of asynchronous circuits. In: Bochmann GV, Probst DK (eds) Proceedings of the CAV’92, LNCS, vol 663. Springer, pp 164–177

  24. Murata T (1989) Petri nets: properties, analysis and applications. Proc IEEE 77(4):541–580

    Article  Google Scholar 

  25. Musuvathi M, Qadeer S (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. Association for Computing Machinery, San Diego, California, USA, pp 446–455. https://doi.org/10.1145/1250734.1250785

  26. Nguyen HTT, Rodríguez C, Sousa M, Coti C, Petrucci L (2018) Quasi-optimal partial order reduction. In: Chockler H, Weissenbacher G (eds) Computer aided verification, lecture notes in computer science. Springer International Publishing, pp 354–371. https://doi.org/10.1007/978-3-319-96142-2_22

  27. Nielsen M, Plotkin GD, Winskel G (1979) Petri nets, event structures and domains. In: Proceedings of the international symposium on semantics of concurrent computation. LNCS, vol 70. Springer, pp 266–284

  28. Nielsen M, Plotkin G, Winskel G (1981) Petri nets, event structures and domains, part I. Theor Comput Sci 13(1):85–108

    Article  Google Scholar 

  29. Pham TA, Jéron T, Quinson M (2019) Unfolding-based dynamic partial order reduction of asynchronous distributed programs. In: Pérez JA, Yoshida N (eds) Formal techniques for distributed objects, components, and systems—39th IFIP WG 6.1 international conference, FORTE 2019, held as part of the 14th international federated conference on distributed computing techniques, DisCoTec 2019, Kongens Lyngby, Denmark, June 17–21, 2019, Proceedings, Springer, Lecture Notes in Computer Science, vol 11535, pp 224–241. https://doi.org/10.1007/978-3-030-21759-4_13

  30. Pugh W (1989) Skip lists: a probabilistic alternative to balanced trees. In: Algorithms and data structures, workshop WADS ’89, Ottawa, Canada, August 17–19, 1989, Proceedings, pp 437–449

  31. Rodríguez C, Sousa M, Sharma S, Kroening D (2015a) Unfolding-based partial order reduction. In: Proceedings of the CONCUR, pp 456–469

  32. Rodríguez C, Sousa M, Sharma S, Kroening D (2015b) Unfolding-based partial order reduction. CoRR arXiv:1507.00980

  33. Schemmel D, Büning J, Rodríguez C, Laprell D, Wehrle K (2020) Symbolic partial-order execution for testing multi-threaded programs. In: Lahiri SK, Wang C (eds) Computer aided verification, lecture notes in computer science. Springer International Publishing, Cham, pp 376–400. https://doi.org/10.1007/978-3-030-53288-8_18

  34. Sousa M, Rodríguez C, D’Silva V, Kroening D (2017) Abstract interpretation with unfoldings. CoRR arXiv:1705.00595

  35. Thomson P, Donaldson AF, Betts A (2016) Concurrency testing using controlled schedulers: an empirical study. TOPC 2(4):23:1–23:37

    Article  Google Scholar 

  36. Wang C, Yang Z, Kahlon V, Gupta A (2008) Peephole partial order reduction. In: Ramakrishnan CR, Rehof J (eds) Tools and algorithms for the construction and analysis of systems, 14th international conference, TACAS 2008, held as part of the joint european conferences on theory and practice of software, ETAPS 2008, Budapest, Hungary, March 29–April 6, 2008. Proceedings, Lecture Notes in Computer Science, vol 4963. Springer, pp 382–396

  37. Yang Y, Chen X, Gopalakrishnan G, Kirby RM (2008) Efficient stateful dynamic partial order reduction. In: Model checking software (SPIN), LNCS, vol 5156. Springer, pp 288–305

  38. Yu J, Narayanasamy S, Pereira C, Pokam G (2012) Maple: a coverage-driven testing tool for multithreaded programs. In: OOPSLA, pp 485–502

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Laure Petrucci.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

An independently and concurrently discovered example program with the same characteristics is presented in [4]

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Coti, C., Petrucci, L., Rodríguez, C. et al. Quasi-optimal partial order reduction. Form Methods Syst Des 57, 3–33 (2021). https://doi.org/10.1007/s10703-020-00350-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10703-020-00350-4

Keywords

Navigation