Formal Methods in System Design

, Volume 41, Issue 2, pp 178–210 | Cite as

A formal hierarchy of weak memory models

  • Jade AlglaveEmail author


We present in this paper a formal generic framework, implemented in the Coq proof assistant, for defining and reasoning about weak memory models. We first present the three axioms of our framework, with several examples as illustration and justification. Then we show how to implement several existing weak memory models in our framework, and prove formally that our implementation is equivalent to the native definition for each of these models.


Weak memory models Semantics Formal proofs 



We thank the anonymous reviewers of several versions of this paper for their helpful and insightful reviews. We thank Gérard Boudol, Damien Doligez, Matthew Hague, Maurice Herlihy, Xavier Leroy, Luc Maranget, Susmit Sarkar and Peter Sewell for invaluable discussions and comments, Assia Mahboubi and Vincent Siles for advice on the Coq development, and Thomas Braibant, Matt Lewis, Jules Villard and Boris Yakobowski for comments on a draft.


  1. 1.
    Sparc Architecture Manual (1992 and 1994) Versions 8 and 9 Google Scholar
  2. 2.
    Power ISA (2009) Version 2.06 Google Scholar
  3. 3.
    Adir A, Attiya H, Shurek G (2003) Information-flow models for shared memory with an application to the powerPC architecture. In: TPDS Google Scholar
  4. 4.
    Adve SV (1993) Designing memory consistency models for shared-memory multiprocessors. PhD thesis, 1993 Google Scholar
  5. 5.
    Adve SV, Gharachorloo K (1995) Shared memory consistency models: a tutorial. IEEE Comput 29:66–76 CrossRefGoogle Scholar
  6. 6.
    Adve SV, Boehm H-J (2012) Memory models: a case for rethinking parallel languages and hardware. Commun ACM. doi: 10.1145/1787234.1787255 Google Scholar
  7. 7.
    Ahamad M, Bazzi RA, John R, Kohli P, Neiger G (1993) The power of processor consistency. In: SPAA Google Scholar
  8. 8.
    Alglave J (2010) A shared memory poetics. PhD thesis, Université Paris 7 and INRIA.
  9. 9.
    Alglave J, Kroening D, Lugton J, Nimal V, Tautschnig M (2011) Soundness of data flow analyses on weak memory models In: APLAS 11 Google Scholar
  10. 10.
    Alglave J, Maranget L (2011) Stability in weak memory models. In: CAV Google Scholar
  11. 11.
    Alglave J, Maranget L, Sarkar S, Sewell P (2010) Fences in weak memory models. In: CAV Google Scholar
  12. 12.
    Alglave J, Maranget L, Sarkar S, Sewell P (2011) Litmus: running tests against hardware. In: TACAS Google Scholar
  13. 13.
    Alpha Architecture Reference Manual, 4th edn (2002) Google Scholar
  14. 14.
    Arvind, Maessen J-W (2006) Memory model = instruction reordering + store atomicity. In: ISCA Google Scholar
  15. 15.
    Bertot Y, Casteran P (2004) Coq’Art, EATCS texts in theoretical computer science. Springer, Berlin Google Scholar
  16. 16.
    Boehm H-J, Adve SV (2008) Foundations of the C++ concurrency memory model. In: PLDI Google Scholar
  17. 17.
    Boudol G, Petri G (2009) Relaxed memory models: an operational approach. In: POPL Google Scholar
  18. 18.
    Burckhardt S, Musuvathi M (2008) Effective program verification for relaxed memory models. In: CAV Google Scholar
  19. 19.
    Burckhardt S, Musuvathi M, Singh V (2010) Verifying local transformations of concurrent programs. In: CC Google Scholar
  20. 20.
    Cantin J, Lipasti M, Smith J (2003) The complexity of verifying memory coherence. In: SPAA Google Scholar
  21. 21.
    Collier WW (1992) Reasoning about parallel architectures. Prentice Hall, New York zbMATHGoogle Scholar
  22. 22.
    Dubois M, Scheurich C (1990) Memory access dependencies in shared-memory multiprocessors. IEEE Trans Softw Eng 16(6). doi: 10.1109/32.55094
  23. 23.
    Ferreira R, Feng X, Shao Z (2010) Parameterized memory models and concurrent separation logic. In: ESOP Google Scholar
  24. 24.
    Gharachorloo K (1995) Memory consistency models for shared-memory multiprocessors. WRL Res Rep 95(9). doi:
  25. 25.
    Hangal S, Vahia D, Manovit C, Lu J-YJ, Narayanan S (2004) TSOTool: a program for verifying memory systems using the memory consistency model. In: ISCA Google Scholar
  26. 26.
    Higham L, Kawash J, Verwaal N (1998) Weak memory consistency models part I: definitions and comparisons. Technical report 98/612/03, Department of Computer Science, The University of Calgary Google Scholar
  27. 27.
    Intel 64 Architecture Memory Ordering White Paper, August 2007 Google Scholar
  28. 28.
    Intel 64 and IA-32 Architectures Software Developer’s Manual, vol 3A, October 2011 Google Scholar
  29. 29.
    A Formal Specification of Intel Itanium Processor Family Memory Ordering, October 2002. Intel Document 251429-001 Google Scholar
  30. 30.
    Lamport L (1979) How to make a correct multiprocess program execute correctly on a multiprocessor. IEEE Trans Comput 46(7):779–782 MathSciNetCrossRefGoogle Scholar
  31. 31.
    Landin A, Hagersten E, Haridi S (1991) Race-free interconnection networks and multiprocessor consistency. Comput Archit News 19(3):106–115 CrossRefGoogle Scholar
  32. 32.
    Manson J, Pugh W, Adve SV (2005) The Java memory model. In: POPL Google Scholar
  33. 33.
    Owens S, Sarkar S, Sewell P (2009) A better x86 memory model: x86-TSO. In: TPHOL Google Scholar
  34. 34.
    Sarkar S, Sewell P, Zappa Nardelli F, Owens S, Ridge T, Braibant T, Myreen M, Alglave J (2009) The semantics of x86-CC multiprocessor machine code. In: POPL Google Scholar
  35. 35.
    Sarkar S, Sewell P, Alglave J, Maranget L, Williams D (2011) Understanding power multiprocessors. In: PLDI 11 Google Scholar
  36. 36.
    Sparc Architecture Manual Version 8 (1992) Google Scholar
  37. 37.
    Sparc Architecture Manual Version 9 (1994) Google Scholar
  38. 38.
    Yang Y, Gopalakrishnan G, Lindstrom G (2007) UMM: an operational memory model specification framework with integrated model checking capability. In: CCPE Google Scholar
  39. 39.
    Yang Y, Gopalakrishnan G, Linstrom G, Slind K (2004) Nemos: a framework for axiomatic and executable specifications of memory consistency models. In: IPDPS Google Scholar
  40. 40.
    Zappa Nardelli F, Sewell P, Sevcik J, Sarkar S, Owens S, Maranget L, Batty M, Alglave J (2009) Relaxed memory models must be rigorous. In: EC2 09 Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2012

Authors and Affiliations

  1. 1.INRIARocquencourtFrance
  2. 2.Oxford UniversityOxfordUK
  3. 3.Queen Mary University of LondonLondonUK

Personalised recommendations