skip to main content
research-article

Relaxed separation logic: a program logic for C11 concurrency

Authors Info & Claims
Published:29 October 2013Publication History
Skip Abstract Section

Abstract

We introduce relaxed separation logic (RSL), the first program logic for reasoning about concurrent programs running under the C11 relaxed memory model. From a user's perspective, RSL is an extension of concurrent separation logic (CSL) with proof rules for the various kinds of C11 atomic accesses. As in CSL, individual threads are allowed to access non-atomically only the memory that they own, thus preventing data races. Ownership can, however, be transferred via certain atomic accesses. For SC-atomic accesses, we permit arbitrary ownership transfer; for acquire/release atomic accesses, we allow ownership transfer only in one direction; whereas for relaxed atomic accesses, we rule out ownership transfer completely. We illustrate RSL with a few simple examples and prove its soundness directly over the axiomatic C11 weak memory model.

Skip Supplemental Material Section

Supplemental Material

References

  1. M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In POPL 2011, pages 55--66. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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, pages 509--520. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Batty, M. Dodds, and A. Gotsman. Library abstraction for C/C++ concurrency. In POPL 2013, pages 235--248. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. Birkedal, K. Støvring, and J. Thamsborg. The category-theoretic solution of recursive metric-space equations. Theoretical Computer Science, 411 (47): 4102--4122, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Boyland. Checking interference with fractional permissions. In SAS 2003, volume 2694 of LNCS, pages 55--72. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Calcagno, D. Distefano, and V. Vafeiadis. Bi-abductive resource invariant synthesis. In APLAS, volume 5904 of LNCS, pages 259--274. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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
  8. D. Distefano, P. W. O'Hearn, and H. Yang. A local shape analysis based on separation logic. In TACAS, volume 3920 of LNCS, pages 287--302. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. Dudka, P. Peringer, and T. Vojnar. Predator: A practical tool for checking manipulation of dynamic data structures using separation logic. In CAV, volume 6806 of LNCS, pages 372--378. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Ferreira, X. Feng, and Z. Shao. Parameterized memory models and concurrent separation logic. In ESOP 2010, volume 6012 of LNCS, pages 267--286. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan, A. Sabry, B. F. Duba, and M. Felleisen. The essence of compiling with continuations. In PLDI 1993, pages 237--247. ACM, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. ISO/IEC 14882:2011. Programming language C++, 2011.Google ScholarGoogle Scholar
  13. ISO/IEC 9899:2011. Programming language C, 2011.Google ScholarGoogle Scholar
  14. P. E. McKenney and B. Garst. N1525: Memory-order rationale, 2011. Available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1525.htm.Google ScholarGoogle Scholar
  15. A. Nanevski, V. Vafeiadis, and J. Berdine. Structuring the verification of heap-manipulating programs. In POPL, pages 261--274. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. O'Hearn. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375 (1): 271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Ridge. A rely-guarantee proof system for x86-TSO. In VSTTE 2010, volume 6217 of LNCS, pages 55--70. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. Sarkar, K. Memarian, S. Owens, M. Batty, P. Sewell, L. Maranget, J. Alglave, and D. Williams. Synchronising C/C++ and POWER. In PLDI 2012, pages 311--322. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Turon, D. Dreyer, and L. Birkedal. Unifying refinement and Hoare-style reasoning in a logic for higher-order concurrency. In ICFP 2013. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. V. Vafeiadis. Concurrent separation logic and operational semantics. In MFPS 2011, volume 276 of ENTCS, pages 335--351. Elsevier, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR 2007, volume 4703 of LNCS, pages 256--271. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Trans. Program. Lang. Syst., 13 (2): 181--210, Apr. 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. I. Wehrman and J. Berdine. A proposal for weak-memory local reasoning. In LOLA 2011, 2011.Google ScholarGoogle Scholar

Index Terms

  1. Relaxed separation logic: a program logic for C11 concurrency

          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 48, Issue 10
            OOPSLA '13
            October 2013
            867 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2544173
            Issue’s Table of Contents
            • cover image ACM Conferences
              OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
              October 2013
              904 pages
              ISBN:9781450323741
              DOI:10.1145/2509136

            Copyright © 2013 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 29 October 2013

            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!