skip to main content
10.1145/3385412.3385966acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections

Decidable verification under a causally consistent shared memory

Published:11 June 2020Publication History

ABSTRACT

Causal consistency is one of the most fundamental and widely used consistency models weaker than sequential consistency. In this paper, we study the verification of safety properties for finite-state concurrent programs running under a causally consistent shared memory model. We establish the decidability of this problem for a standard model of causal consistency (called also "Causal Convergence" and "Strong-Release-Acquire"). Our proof proceeds by developing an alternative operational semantics, based on the notion of a thread potential, that is equivalent to the existing declarative semantics and constitutes a well-structured transition system. In particular, our result allows for the verification of a large family of programs in the Release/Acquire fragment of C/C++11 (RA). Indeed, while verification under RA was recently shown to be undecidable for general programs, since RA coincides with the model we study here for write/write-race-free programs, the decidability of verification under RA for this widely used class of programs follows from our result. The novel operational semantics may also be of independent use in the investigation of weakly consistent shared memory models and their verification.

References

  1. Ori Lahav and Udi Boker. 2020. Supplementary material for this paper. https://www.cs.tau.ac.il/~orilahav/papers/pldi20full.pdfGoogle ScholarGoogle Scholar
  2. Parosh Aziz Abdulla. 2010. Well (and better) quasi-ordered transition systems. The Bulletin of Symbolic Logic 16, 4 (2010), 457–515. http: //www.jstor.org/stable/40961367Google ScholarGoogle ScholarCross RefCross Ref
  3. Parosh Aziz Abdulla, Jatin Arora, Mohamed Faouzi Atig, and Shankaranarayanan Krishna. 2019. Verification of programs under the releaseacquire semantics. In PLDI. ACM, New York, NY, USA, 1117–1132.Google ScholarGoogle Scholar
  4. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Ahmed Bouajjani, and Tuan Phong Ngo. 2018. A load-buffer semantics for total store ordering. Logical Methods in Computer Science Volume 14, Issue 1 (Jan. 2018). Google ScholarGoogle ScholarCross RefCross Ref
  5. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, and Tuan Phong Ngo. 2018. Optimal stateless model checking under the release-acquire semantics. Proc. ACM Program. Lang. 2, OOPSLA, Article 135 (Oct. 2018), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Parosh Aziz Abdulla, Mohamed Faouzi Atig, and Rojin Rezvan. 2019.Google ScholarGoogle Scholar
  7. Parameterized verification under TSO is PSPACE-complete. Proc. ACM Program. Lang. 4, POPL, Article 26 (Dec. 2019), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Parosh Aziz Abdulla, K¯ arlis Čer¯ ans, Bengt Jonsson, and Yih-Kuen Tsay. 2000. Algorithmic analysis of programs with well quasi-ordered domains. Information and Computation 160, 1 (2000), 109 – 127. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sarita V. Adve and Mark D. Hill. 1990. Weak ordering—a new definition. In ISCA. ACM, New York, NY, USA, 2–14. 325164.325100 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jade Alglave, Luc Maranget, and Michael Tautschnig. 2014. Herding cats: modelling, simulation, testing, and data mining for weak memory. ACM Trans. Program. Lang. Syst. 36, 2, Article 7 (July 2014), 74 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Masoud Saeida Ardekani, Pierre Sutra, and Marc Shapiro. 2013. Nonmonotonic snapshot isolation: Scalable and strong consistency for geo-replicated transactional systems. In SRDS. IEEE Computer Society, Washington, DC, USA, 163–172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Mohamed Faouzi Atig, Ahmed Bouajjani, Sebastian Burckhardt, and Madanlal Musuvathi. 2010.Google ScholarGoogle Scholar
  13. On the verification problem for weak Decidable Verification under a Causally Consistent Shared Memory PLDI ’20, June 15–20, 2020, London, UK memory models. In POPL. ACM, New York, NY, USA, 7–18. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Mohamed Faouzi Atig, Ahmed Bouajjani, Sebastian Burckhardt, and Madanlal Musuvathi. 2012.Google ScholarGoogle Scholar
  15. What’s decidable about weak memory models?. In ESOP. Springer-Verlag, Berlin, Heidelberg, 26–46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mark Batty, Kayvan Memarian, Kyndylan Nienhuis, Jean Pichon-Pharabod, and Peter Sewell. 2015.Google ScholarGoogle Scholar
  17. The problem of programming language concurrency semantics. In ESOP. Springer, Berlin, Heidelberg, 283–307. Google ScholarGoogle ScholarCross RefCross Ref
  18. Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. 2011. Mathematizing C++ concurrency. In POPL. ACM, New York, NY, USA, 55–66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Giovanni Bernardi and Alexey Gotsman. 2016. Robustness against consistency models with atomic visibility. In CONCUR. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 7:1–7:15. Google ScholarGoogle ScholarCross RefCross Ref
  20. Ahmed Bouajjani, Constantin Enea, Rachid Guerraoui, and Jad Hamza. 2017. On verifying causal consistency. In POPL. ACM, New York, NY, USA, 626–638. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Lucas Brutschy, Dimitar Dimitrov, Peter Müller, and Martin Vechev. 2018.Google ScholarGoogle Scholar
  22. Static serializability analysis for causal consistency. In PLDI. ACM, New York, NY, USA, 90–104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 3192415Google ScholarGoogle Scholar
  24. Sebastian Burckhardt. 2014. Principles of eventual consistency. Found. Trends Program. Lang. 1, 1-2 (Oct. 2014), 1–150. 1561/2500000011 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Andrea Cerone, Alexey Gotsman, and Hongseok Yang. 2015. Transaction chopping for parallel snapshot isolation. In DISC. Springer-Verlag, Berlin, Heidelberg, 388–404. 5_26 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Andrea Cerone, Alexey Gotsman, and Hongseok Yang. 2017. Algebraic laws for weak consistency. In CONCUR, Vol. 85. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 26:1–26:18. Google ScholarGoogle ScholarCross RefCross Ref
  27. Simon Doherty, Brijesh Dongol, Heike Wehrheim, and John Derrick. 2019.Google ScholarGoogle Scholar
  28. Verifying C11 programs operationally. In PPoPP. ACM, New York, NY, USA, 355–365. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Alain Finkel and Philippe Schnoebelen. 2001. Well-structured transition systems everywhere! Theoretical Computer Science 256, 1 (2001), 63 – 92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. ISO/IEC 14882:2011. 2011. Programming language C++.Google ScholarGoogle Scholar
  31. ISO/IEC 9899:2011. 2011. Programming language C.Google ScholarGoogle Scholar
  32. Jan-Oliver Kaiser, Hoang-Hai Dang, Derek Dreyer, Ori Lahav, and Viktor Vafeiadis. 2017.Google ScholarGoogle Scholar
  33. Strong logic for weak memory: Reasoning about release-acquire consistency in Iris. In ECOOP. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 17:1–17:29. Google ScholarGoogle ScholarCross RefCross Ref
  34. Jeehoon Kang, Chung-Kil Hur, Ori Lahav, Viktor Vafeiadis, and Derek Dreyer. 2017.Google ScholarGoogle Scholar
  35. A Promising Semantics for Relaxed-Memory Concurrency. In POPL. ACM, New York, NY, USA, 175–189. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Michalis Kokologiannakis, Ori Lahav, Konstantinos Sagonas, and Viktor Vafeiadis. 2017. Effective stateless model checking for C/C++ concurrency. Proc. ACM Program. Lang. 2, POPL, Article 17 (Dec. 2017), 32 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Michael Kuperstein, Martin Vechev, and Eran Yahav. 2011.Google ScholarGoogle Scholar
  38. Partialcoherence abstractions for relaxed memory models. In PLDI. ACM, New York, NY, USA, 187–198. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Ori Lahav. 2019. Verification under causally consistent shared memory. ACM SIGLOG News 6, 2 (April 2019), 43–56. 3326938.3326942 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Ori Lahav, Nick Giannarakis, and Viktor Vafeiadis. 2016.Google ScholarGoogle Scholar
  41. Taming release-acquire consistency. In POPL. ACM, New York, NY, USA, 649– 662. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Ori Lahav and Roy Margalit. 2019. Robustness against release/acquire semantics. In PLDI. ACM, New York, NY, USA, 126–141. org/10.1145/3314221.3314604 Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Ori Lahav and Viktor Vafeiadis. 2015.Google ScholarGoogle Scholar
  44. Owicki-Gries reasoning for weak memory models. In ICALP. Springer-Verlag, Berlin, Heidelberg, 311–323. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Ori Lahav and Viktor Vafeiadis. 2016.Google ScholarGoogle Scholar
  46. Explaining relaxed memory models with program transformations. In FM. Springer, Cham, 479–495. Google ScholarGoogle ScholarCross RefCross Ref
  47. Ori Lahav, Viktor Vafeiadis, Jeehoon Kang, Chung-Kil Hur, and Derek Dreyer. 2017. Repairing sequential consistency in C/C++11. In PLDI. ACM, New York, NY, USA, 618–632. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. 3062352Google ScholarGoogle Scholar
  49. Mohsen Lesani, Christian J. Bell, and Adam Chlipala. 2016. Chapar: Certified causally consistent distributed key-value stores. In POPL. ACM, New York, NY, USA, 357–370. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. 2837622Google ScholarGoogle Scholar
  51. Cheng Li, Daniel Porto, Allen Clement, Johannes Gehrke, Nuno Preguiça, and Rodrigo Rodrigues. 2012.Google ScholarGoogle Scholar
  52. Making geo-replicated systems fast as possible, consistent when necessary. In OSDI. USENIX Association, Berkeley, CA, USA, 265–278. http://dl.acm.org/citation. cfm?id=2387880.2387906Google ScholarGoogle Scholar
  53. Wyatt Lloyd, Michael J. Freedman, Michael Kaminsky, and David G. Andersen. 2011. Don’t settle for eventual: Scalable causal consistency for wide-area storage with COPS. In SOSP. ACM, New York, NY, USA, 401–416. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Mapping 2019. C/C++11 mappings to processors. Retrieved July 3, 2019 from http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.htmlGoogle ScholarGoogle Scholar
  55. Luc Maranget, Susmit Sarkar, and Peter Sewell. 2012.Google ScholarGoogle Scholar
  56. A tutorial introduction to the ARM and POWER relaxed memory models. http://www.cl.cam.ac.uk/~pes20/ppc-supplemental/test7.pdf.Google ScholarGoogle Scholar
  57. MongoDB Manual 4.2 2019. Causal consistency and read and write concerns. Retrieved November 19, 2019 from https://docs.mongodb. com/manual/core/causal-consistency-read-write-concernsGoogle ScholarGoogle Scholar
  58. Kartik Nagar and Suresh Jagannathan. 2018. Automated detection of serializability violations under weak consistency. In CONCUR, Vol. 118. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 41:1–41:18. Google ScholarGoogle ScholarCross RefCross Ref
  59. Scott Owens, Susmit Sarkar, and Peter Sewell. 2009.Google ScholarGoogle Scholar
  60. A better x86 memory model: x86-TSO. In TPHOLs. Springer, Heidelberg, 391–407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Azalea Raad, Ori Lahav, and Viktor Vafeiadis. 2018.Google ScholarGoogle Scholar
  62. On parallel snapshot isolation and release/acquire consistency. In ESOP. Springer, Berlin, Heidelberg, 940–967. 1_33 Google ScholarGoogle ScholarCross RefCross Ref
  63. Sylvain Schmitz and Philippe Schnoebelen. 2012.Google ScholarGoogle Scholar
  64. Algorithmic aspects of WQO theory. (Aug. 2012). https://cel.archives-ouvertes.fr/cel- 00727025 Lecture notes.Google ScholarGoogle Scholar
  65. Yair Sovran, Russell Power, Marcos K. Aguilera, and Jinyang Li. 2011.Google ScholarGoogle Scholar
  66. Transactional storage for geo-replicated systems. In SOSP. ACM, New York, NY, USA, 385–400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. Thibault Suzanne and Antoine Miné. 2016.Google ScholarGoogle Scholar
  68. From array domains to abstract interpretation under store-buffer-based memory models. In SAS. Springer, Berlin, Heidelberg, 469–488.Google ScholarGoogle Scholar
  69. Douglas B. Terry, Alan J. Demers, Karin Petersen, Mike Spreitzer, Marvin Theimer, and Brent W. Welch. 1994. Session guarantees for weakly consistent replicated data. In PDIS. IEEE Computer Society, Washington, DC, USA, 140–149. http://dl.acm.org/citation.cfm?id= 645792.668302Google ScholarGoogle ScholarDigital LibraryDigital Library
  70. Aaron Turon, Viktor Vafeiadis, and Derek Dreyer. 2014. GPS: Navigating weak memory with ghosts, protocols, and separation. In OOPSLA. ACM, New York, NY, USA, 691–707. Google ScholarGoogle ScholarDigital LibraryDigital Library
  71. 2660243 PLDI ’20, June 15–20, 2020, London, UK Ori Lahav and Udi BokerGoogle ScholarGoogle Scholar
  72. Viktor Vafeiadis and Chinmay Narayan. 2013.Google ScholarGoogle Scholar
  73. Relaxed separation logic: A program logic for C11 concurrency. In OOPSLA. ACM, New York, NY, USA, 867–884. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Decidable verification under a causally consistent shared memory

              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

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader