skip to main content
research-article

GPS: navigating weak memory with ghosts, protocols, and separation

Authors Info & Claims
Published:15 October 2014Publication History
Skip Abstract Section

Abstract

Weak memory models formalize the inconsistent behaviors that one can expect to observe in multithreaded programs running on modern hardware. In so doing, however, they complicate the already-difficult task of reasoning about correctness of concurrent code. Worse, they render impotent the sophisticated formal methods that have been developed to tame concurrency, which almost universally assume a strong (i.e. sequentially consistent) memory model.

This paper introduces GPS, the first program logic to provide a full-fledged suite of modern verification techniques - including ghost state, protocols, and separation logic - for high-level, structured reasoning about weak memory. We demonstrate the effectiveness of GPS by applying it to challenging examples drawn from the Linux kernel as well as lock-free data structures. We also define the semantics of GPS and prove in Coq that it is sound with respect to the axiomatic C11 weak memory model.

Skip Supplemental Material Section

Supplemental Material

References

  1. Appendix and Coq development for this paper available at the following URL: http://plv.mpi-sws.org/gps/.Google ScholarGoogle Scholar
  2. J. Alglave, D. Kroening, V. Nimal, and M. Tautschnig. Software verification for weak memory via program transformation. In ESOP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Batty, K. Memarian, S. Owens, S. Sarkar, and P. Sewell. Clarifying and compiling C/C++ concurrency: From C++11 to POWER. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Batty, M. Dodds, and A. Gotsman. Library abstraction for C/C++ concurrency. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. H.-J. Boehm and S. V. Adve. Foundations of the C++ concurrency memory model. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Bugliesi, S. Calzavara, F. Eigner, and M. Maffei. Logical foundations of secure resource management in protocol implementations. In POST, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Cohen and B. Schirmer. From total store order to sequential consistency: A practical reduction theorem. In ITP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. Cohen, M. Dahlweid, M. A. Hillebrand, D. Leinenbach, M. Moskal, T. Santen, W. Schulte, and S. Tobies. VCC: A practical system for verifying concurrent C. In TPHOLs, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Corbet. Ticket spinlocks, 2008. http://lwn.net/Articles/267968/.Google ScholarGoogle Scholar
  11. P. da Rocha Pinto, T. Dinsdale-Young, and P. Gardner. TaDA: A logic for time and data abstraction. In ECOOP, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. W. Dijkstra. EWD123: Cooperating Sequential Processes. Technical report, 1965. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP 2010, volume 6183 of LNCS, pages 504--528. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Dinsdale-Young, L. Birkedal, P. Gardner, M. J. Parkinson, and H. Yang. Views: Compositional reasoning for concurrent programs. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. X. Feng. Local rely-guarantee reasoning. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Ferreira, X. Feng, and Z. Shao. Parameterized memory models and concurrent separation logic. In ESOP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. Flanagan, A. Sabry, B. F. Duba, and M. Felleisen. The essence of compiling with continuations. In PLDI, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Howells and P. E. McKenney. Circular buffers. https://www.kernel.org/doc/Documentation/circular-buffers.txt.Google ScholarGoogle Scholar
  19. ISO/IEC 14882:2011. Programming language C++, 2011.Google ScholarGoogle Scholar
  20. ISO/IEC 9899:2011. Programming language C, 2011.Google ScholarGoogle Scholar
  21. J. Jensen and L. Birkedal. Fictional separation logic. In ESOP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. B. Jones. Tentative steps toward a development method for interfering programs. TOPLAS, 5 (4): 596--619, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. K. R. M. Leino, P. Müller, and J. Smans. Verification of concurrent programs with Chalice. In Foundations of Security Analysis and Design V, volume 5705 of LNCS. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Ley-Wild and A. Nanevski. Subjective auxiliary state for coarse-grained concurrency. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. P. McKenney. Exploiting deferred destruction: an analysis of read-copy-update techniques in operating system kernels. PhD thesis, Oregon Graduate Institute, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. M. Michael and M. L. Scott. Nonblocking algorithms and preemption-safe locking on multiprogrammed shared memory multiprocessors. JPDC, 51 (1): 1--26, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A. Nanevski, R. Ley-Wild, I. Sergey, and G. A. Delbianco. Communicating state transition systems for fine-grained concurrent resources. In ESOP, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. O'Hearn. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375 (1): 271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Owens. Reasoning about the implementation of concurrency abstractions on x86-TSO. In ECOOP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. S. Owens, S. Sarkar, and P. Sewell. A better x86 memory model: x86-TSO. In TPHOLs, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. Ridge. A rely-guarantee proof system for x86-TSO. In VSTTE, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. V. A. Saraswat, R. Jagadeesan, M. Michael, and C. von Praun. A theory of memory models. In PPoPP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. Singh, S. Narayanasamy, D. Marino, T. Millstein, and M. Musuvathi. End-to-end sequential consistency. In ISCA, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. K. Svendsen and L. Birkedal. Impredicative concurrent abstract predicates. In ESOP, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Turon, D. Dreyer, and L. Birkedal. Unifying refinement and Hoare-style reasoning in a logic for higher-order concurrency. In ICFP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. V. Vafeiadis and C. Narayan. Relaxed separation logic: A program logic for C11 concurrency. In OOPSLA, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. I. Wehrman and J. Berdine. A proposal for weak-memory local reasoning. In LOLA, 2011.Google ScholarGoogle Scholar
  40. M. Dodds, X. Feng, M. Parkinson, and V. Vafeiadis. Deny-guarantee reasoning. In ESOP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. GPS: navigating weak memory with ghosts, protocols, and separation

          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

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 49, Issue 10
            OOPSLA '14
            October 2014
            907 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2714064
            • Editor:
            • Andy Gill
            Issue’s Table of Contents
            • cover image ACM Conferences
              OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications
              October 2014
              946 pages
              ISBN:9781450325851
              DOI:10.1145/2660193

            Copyright © 2014 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 15 October 2014

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!