Skip to main content

Checking Opacity and Durable Opacity with FDR

  • Conference paper
  • First Online:
Software Engineering and Formal Methods (SEFM 2021)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 13085))

Included in the following conference series:

Abstract

Software transactional memory (STMs) is a software-enabled form of transactional memory, typically implemented as a language library, that provides fine-grained concurrency control on behalf of a programmer. STM algorithms have been recently adapted to cope with non-volatile memory (NVM), aka persistent memory, which is a new paradigm for memory that preserves its contents even after power loss. This paper presents a model checking approach to validating correctness of STM algorithms using FDR (a model checker for \(\mathsf{CSP}\) specifications). Our proofs are based on operational transactional memory specifications that allow proofs of (durable) opacity, the main safety property for STMs under volatile and persistent memory, to be verified by refinement. Since FDR enables automatic proofs of refinement, we obtain an automatic technique for checking both opacity and durable opacity of bounded models of STM algorithms.

Dongol is supported by VeTSS project “Persistent Safety and Security” and EPSRC grants EP/R019045/2, EP/R032556/1 and EP/V038915/1.

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 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.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

Notes

  1. 1.

    This is in contrast to lazy implementations that defer transactional writes until the commit operation is executed (e.g., [8, 12]).

  2. 2.

    The full model is given in Appendix A.

  3. 3.

    Details of SyncTransactions is not shown, since it is composed using synchronisation in a similar manner to SyncTransactions_TMS in TMS2 (see Sect. 5.3).

References

  1. Armstrong, A., Dongol, B.: Modularising opacity verification for hybrid transactional memory. In: Bouajjani, A., Silva, A. (eds.) FORTE 2017. LNCS, vol. 10321, pp. 33–49. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-60225-7_3

    Chapter  Google Scholar 

  2. Armstrong, A., Dongol, B., Doherty, S.: Proving opacity via linearizability: a sound and complete method. In: Bouajjani, A., Silva, A. (eds.) FORTE 2017. LNCS, vol. 10321, pp. 50–66. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-60225-7_4

    Chapter  Google Scholar 

  3. Attiya, H., Gotsman, A., Hans, S., Rinetzky, N.: A programming language perspective on transactional memory consistency. In: Fatourou, P., Taubenfeld, G. (eds.) PODC 2013, pp. 309–318. ACM (2013)

    Google Scholar 

  4. Baek, W., Bronson, N.G., Kozyrakis, C., Olukotun, K.: Implementing and evaluating a model checker for transactional memory systems. In: Calinescu, R., Paige, R.F., Kwiatkowska, M.Z. (eds.) ICECCS, pp. 117–126. IEEE Computer Society (2010)

    Google Scholar 

  5. Bila, E., Derrick, J., Doherty, S., Dongol, B., Schellhorn, G., Wehrheim, H.: Modularising verification of durable opacity. CoRR abs/2011.15013 (2020)

    Google Scholar 

  6. Bila, E., Doherty, S., Dongol, B., Derrick, J., Schellhorn, G., Wehrheim, H.: Defining and verifying durable opacity: correctness for persistent software transactional memory. In: Gotsman, A., Sokolova, A. (eds.) FORTE 2020. LNCS, vol. 12136, pp. 39–58. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-50086-3_3

    Chapter  Google Scholar 

  7. Dalessandro, L., Dice, D., Scott, M., Shavit, N., Spear, M.: Transactional mutex locks. In: D’Ambra, P., Guarracino, M., Talia, D. (eds.) Euro-Par 2010. LNCS, vol. 6272, pp. 2–13. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15291-7_2

    Chapter  Google Scholar 

  8. Dalessandro, L., Spear, M.F., Scott, M.L.: Norec: streamlining STM by abolishing ownership records. In: Govindarajan, R., Padua, D.A., Hall, M.W. (eds.) PPoPP, pp. 67–78. ACM (2010)

    Google Scholar 

  9. Derrick, J., Doherty, S., Dongol, B., Schellhorn, G., Travkin, O., Wehrheim, H.: Mechanized proofs of opacity: a comparison of two techniques. Formal Aspects Comput. 30(5), 597–625 (2017). https://doi.org/10.1007/s00165-017-0433-3

    Article  MathSciNet  MATH  Google Scholar 

  10. Derrick, J., Doherty, S., Dongol, B., Schellhorn, G., Wehrheim, H.: Verifying correctness of persistent concurrent data structures. In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) FM 2019. LNCS, vol. 11800, pp. 179–195. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30942-8_12

    Chapter  Google Scholar 

  11. Derrick, J., Dongol, B., Schellhorn, G., Travkin, O., Wehrheim, H.: Verifying opacity of a transactional mutex lock. In: Bjørner, N., de Boer, F. (eds.) FM 2015. LNCS, vol. 9109, pp. 161–177. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19249-9_11

    Chapter  Google Scholar 

  12. Dice, D., Shalev, O., Shavit, N.: Transactional locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006). https://doi.org/10.1007/11864219_14

    Chapter  Google Scholar 

  13. Doherty, S., Dongol, B., Derrick, J., Schellhorn, G., Wehrheim, H.: Proving opacity of a pessimistic STM. In: Fatourou, P., Jiménez, E., Pedone, F. (eds.) OPODIS. LIPIcs, vol. 70, pp. 35:1–35:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2016)

    Google Scholar 

  14. Doherty, S., Groves, L., Luchangco, V., Moir, M.: Towards formally specifying and verifying transactional memory. Formal Asp. Comput. 25(5), 769–799 (2013)

    Article  MathSciNet  Google Scholar 

  15. Dongol, B., Le-Papin, J.: FDR models for “Checking Opacity and Durable Opacity with FDR”, October 2021. https://doi.org/10.6084/m9.figshare.16752550.v1

  16. Gibson-Robinson, T., Armstrong, P., Boulgakov, A., Roscoe, A.W.: FDR3 — a modern refinement checker for CSP. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 187–201. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_13

    Chapter  MATH  Google Scholar 

  17. Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: Chatterjee, S., Scott, M.L. (eds.) PPOPP, pp. 175–184. ACM (2008)

    Google Scholar 

  18. Guerraoui, R., Kapalka, M.: Principles of Transactional Memory. Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool Publishers, San Rafael (2010)

    Google Scholar 

  19. Guerraoui, R., Henzinger, T.A., Singh, V.: Model checking transactional memories. Distrib. Comput. 22(3), 129–145 (2010)

    Article  Google Scholar 

  20. Harris, T., Larus, J.R., Rajwar, R.: Transactional Memory. Synthesis Lectures on Computer Architecture, 2nd edn. Morgan & Claypool Publishers, San Rafael (2010)

    Google Scholar 

  21. Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. In: Smith, A.J. (ed.) ISCA, pp. 289–300. ACM (1993)

    Google Scholar 

  22. Herlihy, M., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM TOPLAS 12(3), 463–492 (1990)

    Article  Google Scholar 

  23. Hoare, C.A.R.: Communicating sequential processes. Commun. ACM 21(8), 666–677 (1978)

    Article  Google Scholar 

  24. Iiboshi, H., Ugawa, T.: Towards model checking library for persistent data structures. In: NVMSA, pp. 119–120. IEEE (2018)

    Google Scholar 

  25. Izraelevitz, J., Mendes, H., Scott, M.L.: Linearizability of persistent memory objects under a full-system-crash failure model. In: Gavoille, C., Ilcinkas, D. (eds.) DISC 2016. LNCS, vol. 9888, pp. 313–327. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53426-7_23

    Chapter  Google Scholar 

  26. Koskinen, E., Parkinson, M.J.: The push/pull model of transactions. In: Grove, D., Blackburn, S.M. (eds.) PLDI, pp. 186–195. ACM (2015)

    Google Scholar 

  27. Lesani, M.: On the Correctness of Transactional Memory Algorithms. Ph.D. thesis, UCLA (2014)

    Google Scholar 

  28. Lesani, M., Luchangco, V., Moir, M.: A framework for formally verifying software transactional memory algorithms. In: Koutny, M., Ulidowski, I. (eds.) CONCUR 2012. LNCS, vol. 7454, pp. 516–530. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32940-1_36

    Chapter  Google Scholar 

  29. Lesani, M., Luchangco, V., Moir, M.: Putting opacity in its place. In: Workshop on the Theory of Transactional Memory (2012)

    Google Scholar 

  30. Lesani, M., Palsberg, J.: Decomposing opacity. In: Kuhn, F. (ed.) DISC 2014. LNCS, vol. 8784, pp. 391–405. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-45174-8_27

    Chapter  Google Scholar 

  31. Lesani, M.: Transaction protocol verification with labeled synchronization logic. In: Badger, J.M., Rozier, K.Y. (eds.) NFM 2019. LNCS, vol. 11460, pp. 280–297. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-20652-9_19

    Chapter  Google Scholar 

  32. Lowe, G.: Analysing lock-free linearizable datatypes using CSP. In: Gibson-Robinson, T., Hopcroft, P., Lazić, R. (eds.) Concurrency, Security, and Puzzles. LNCS, vol. 10160, pp. 162–184. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-51046-0_9

    Chapter  Google Scholar 

  33. Lynch, N.A., Tuttle, M.R.: Hierarchical correctness proofs for distributed algorithms. In: PODC, pp. 137–151. ACM, New York, NY, USA (1987)

    Google Scholar 

  34. Raad, A., Wickerson, J., Vafeiadis, V.: Weak persistency semantics from the ground up: formalising the persistency semantics of ARMV8 and transactional models. PACMPL 3(OOPSLA), 135:1–135:27 (2019)

    Google Scholar 

  35. Roscoe, A.W.: Understanding Concurrent Systems. Texts in Computer Science. Springer, London (2010). https://doi.org/10.1007/978-1-84882-258-0

  36. Rudoff, A.: Persistent memory programming. Login USENIX Mag. 42(2), 34–40 (2017)

    Google Scholar 

  37. Scargall, S.: Programming Persistent Memory. Apress, Berkeley (2020). https://doi.org/10.1007/978-1-4842-4932-1

    Book  Google Scholar 

  38. Schellhorn, G., Wedel, M., Travkin, O., König, J., Wehrheim, H.: FastLane Is Opaque – a case study in mechanized proofs of opacity. In: Johnsen, E.B., Schaefer, I. (eds.) SEFM 2018. LNCS, vol. 10886, pp. 105–120. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-92970-5_7

    Chapter  Google Scholar 

  39. Zuriel, Y., Friedman, M., Sheffi, G., Cohen, N., Petrank, E.: Efficient lock-free durable sets. PACMPL 3(OOPSLA), 128:1–128:26 (2019)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Brijesh Dongol .

Editor information

Editors and Affiliations

Appendices

A Full (d)TMS2 Automata

figure o

B (d)NOrec

For reference, the code for NOrec  [8] and dNOrec  [5] is given below, with the recovery code used by dNOrec highlighted in .

figure q

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Dongol, B., Le-Papin, J. (2021). Checking Opacity and Durable Opacity with FDR. In: Calinescu, R., Păsăreanu, C.S. (eds) Software Engineering and Formal Methods. SEFM 2021. Lecture Notes in Computer Science(), vol 13085. Springer, Cham. https://doi.org/10.1007/978-3-030-92124-8_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-92124-8_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-92123-1

  • Online ISBN: 978-3-030-92124-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics