Skip to main content

Petrification: Software Model Checking for Programs with Dynamic Thread Management

  • Conference paper
  • First Online:
Verification, Model Checking, and Abstract Interpretation (VMCAI 2024)

Abstract

We address the verification problem for concurrent program that dynamically create (fork) new threads or destroy (join) existing threads. We present a reduction to the verification problem for concurrent programs with a fixed number of threads. More precisely, we present petrification, a transformation from programs with dynamic thread management to an existing, Petri net-based formalism for programs with a fixed number of threads. Our approach is implemented in a software model checking tool for C programs that use the pthreads API.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Base Specifications POSIX.1-2017. Standard, The Open Group, San Francisco, CA, January 2018. https://pubs.opengroup.org/onlinepubs/9699919799/

  2. Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard: version 2.6. Technical Report, Department of Computer Science, The University of Iowa (2017), www.SMT-LIB.org

  3. Beyer, D.: Competition on software verification and witness validation: SV-COMP 2023. In: Sankaranarayanan, S., Sharygina, N. (eds.) Tools and Algorithms for the Construction and Analysis of Systems. TACAS 2023. LNCS, vol. 13994, pp 495–522. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30820-8_29

  4. Beyer, D., Friedberger, K.: A light-weight approach for verifying multi-threaded programs with CPAchecker. In: MEMICS. EPTCS, vol. 233, pp. 61–71 (2016). https://doi.org/10.4204/EPTCS.233.6

  5. Beyer, D., Keremoglu, M.E.: CPAchecker: a tool for configurable software verification. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 184–190. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22110-1_16

    Chapter  Google Scholar 

  6. Beyer, D., Löwe, S., Wendler, P.: Reliable benchmarking: requirements and solutions. Int. J. Softw. Tools Technol. Transf. 21(1), 1–29 (2019). https://doi.org/10.1007/s10009-017-0469-y

    Article  Google Scholar 

  7. Clarke, E.M., Grumberg, O.: Avoiding the state explosion problem in temporal logic model checking. In: PODC, pp. 294–303. ACM (1987). https://doi.org/10.1145/41840.41865

  8. Clarke, E., Talupur, M., Touili, T., Veith, H.: Verification by network decomposition. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 276–291. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-28644-8_18

    Chapter  Google Scholar 

  9. Dietsch, D., Heizmann, M., Klumpp, D., Naouar, M., Podelski, A., Schätzle, C.: Verification of concurrent programs using Petri net unfoldings. In: Henglein, F., Shoham, S., Vizel, Y. (eds.) VMCAI 2021. LNCS, vol. 12597, pp. 174–195. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-67067-2_9

    Chapter  Google Scholar 

  10. Dietsch, D., Heizmann, M., Nutz, A., Schätzle, C., Schüssele, F.: Ultimate Taipan with symbolic interpretation and fluid abstractions. In: TACAS 2020. LNCS, vol. 12079, pp. 418–422. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45237-7_32

    Chapter  Google Scholar 

  11. Emerson, E.A., Kahlon, V.: Reducing model checking of the many to the few. In: McAllester, D. (ed.) CADE 2000. LNCS (LNAI), vol. 1831, pp. 236–254. Springer, Heidelberg (2000). https://doi.org/10.1007/10721959_19

    Chapter  Google Scholar 

  12. Farzan, A., Klumpp, D., Podelski, A.: Sound sequentialization for concurrent program verification. In: PLDI, pp. 506–521. ACM (2022). https://doi.org/10.1145/3519939.3523727

  13. Gavrilenko, N., Ponce-de-León, H., Furbach, F., Heljanko, K., Meyer, R.: BMC for weak memory models: relation analysis for compact SMT encodings. In: Dillig, I., Tasiran, S. (eds.) CAV 2019. LNCS, vol. 11561, pp. 355–365. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-25540-4_19

    Chapter  Google Scholar 

  14. Greitschus, M., Dietsch, D., Podelski, A.: Loop invariants from counterexamples. In: Ranzato, F. (ed.) SAS 2017. LNCS, vol. 10422, pp. 128–147. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66706-5_7

    Chapter  Google Scholar 

  15. He, F., Sun, Z., Fan, H.: Satisfiability modulo ordering consistency theory for multi-threaded program verification. In: PLDI, pp. 1264–1279. ACM (2021). https://doi.org/10.1145/3453483.3454108

  16. Heizmann, M., et al.: Ultimate Automizer and the CommuHash Normal Form. In: Sankaranarayanan, S., Sharygina, N. (eds.) Tools and Algorithms for the Construction and Analysis of Systems. TACAS 2023, LNCS, vol. 13994, pp. 577–581. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30820-8_39

  17. Heizmann, M., Klumpp, D., Nitzke, L., Schüssele, F.: Petrification: Software model checking for programs with dynamic thread management (extended version). CoRR abs/2311.01302 (2023). https://doi.org/10.48550/arXiv.2311.01302

  18. Hoenicke, J., Majumdar, R., Podelski, A.: Thread modularity at many levels: a pearl in compositional verification. In: POPL, pp. 473–485. ACM (2017). https://doi.org/10.1145/3009837.3009893

  19. Inverso, O., Tomasco, E., Fischer, B., La Torre, S., Parlato, G.: Bounded model checking of multi-threaded C programs via lazy sequentialization. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 585–602. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08867-9_39

    Chapter  Google Scholar 

  20. Klumpp, D., et al.: Ultimate GemCutter and the axes of generalization. In: TACAS 2022. LNCS, vol. 13244, pp. 479–483. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99527-0_35

    Chapter  Google Scholar 

  21. Ponce-de-León, H., Furbach, F., Heljanko, K., Meyer, R.: Dartagnan: bounded model checking for weak memory models (Competition contribution). In: TACAS 2020. LNCS, vol. 12079, pp. 378–382. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45237-7_24

    Chapter  Google Scholar 

  22. Microsoft: documentation of the System.Threading.Thread class (2023). https://learn.microsoft.com/en-us/dotnet/api/system.threading.thread, Accessed 01 Feb 2023

  23. Nguyen, T.L., Fischer, B., La Torre, S., Parlato, G.: Unbounded lazy-CSeq: a lazy sequentialization tool for C programs with unbounded context switches. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 461–463. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_45

    Chapter  Google Scholar 

  24. Oracle: Documentation of the java.lang.Thread class (2022). https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/Thread.html, Accessed 01 Feb 2023

  25. Owicki, S.S., Gries, D.: Verifying properties of parallel programs: an axiomatic approach. Commun. ACM 19(5), 279–285 (1976). https://doi.org/10.1145/360051.360224

    Article  MathSciNet  Google Scholar 

  26. Qadeer, S., Wu, D.: KISS: keep it simple and sequential. In: PLDI, pp. 14–24. ACM (2004). https://doi.org/10.1145/996841.996845

  27. Saan, S., et al.: Goblint: thread-modular abstract interpretation using side-effecting constraints. In: TACAS 2021. LNCS, vol. 12652, pp. 438–442. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-72013-1_28

    Chapter  Google Scholar 

  28. Schwarz, M., Saan, S., Seidl, H., Erhard, J., Vojdani, V.: Clustered relational thread-modular abstract interpretation with local traces. In: Wies, T. (eds.) Programming Languages and Systems. ESOP 2023. LNCS, vol. 13990, pp. 28–58. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30044-8_2

  29. The Ultimate team: Ultimate program analysis framework (2023). https://ultimate-pa.org/, Accessed 24 Aug 2023

  30. Yang, Q., Li, M.: A cut-off approach for bounded verification of parameterized systems. In: ICSE (1), pp. 345–354. ACM (2010). https://doi.org/10.1145/1806799.1806851

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Matthias Heizmann .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Heizmann, M., Klumpp, D., Nitzke, L., Schüssele, F. (2024). Petrification: Software Model Checking for Programs with Dynamic Thread Management. In: Dimitrova, R., Lahav, O., Wolff, S. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2024. Lecture Notes in Computer Science, vol 14500. Springer, Cham. https://doi.org/10.1007/978-3-031-50521-8_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-50521-8_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-50520-1

  • Online ISBN: 978-3-031-50521-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics