Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Relaxed separation logic: a program logic for C11 concurrency

Published: 29 October 2013 Publication History

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.

Supplementary Material

ZIP File (opsla108.0.zip)
A Formalization of Relaxed Separation Logic Copyright (c) Viktor Vafeiadis See LICENSE.txt for license. http://www.mpi-sws.org/~viktor/rsl/

References

[1]
M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In POPL 2011, pages 55--66. ACM, 2011.
[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.
[3]
M. Batty, M. Dodds, and A. Gotsman. Library abstraction for C/C++ concurrency. In POPL 2013, pages 235--248. ACM, 2013.
[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.
[5]
J. Boyland. Checking interference with fractional permissions. In SAS 2003, volume 2694 of LNCS, pages 55--72. Springer, 2003.
[6]
C. Calcagno, D. Distefano, and V. Vafeiadis. Bi-abductive resource invariant synthesis. In APLAS, volume 5904 of LNCS, pages 259--274. Springer, 2009.
[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.
[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.
[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.
[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.
[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.
[12]
ISO/IEC 14882:2011. Programming language C++, 2011.
[13]
ISO/IEC 9899:2011. Programming language C, 2011.
[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.
[15]
A. Nanevski, V. Vafeiadis, and J. Berdine. Structuring the verification of heap-manipulating programs. In POPL, pages 261--274. ACM, 2010.
[16]
P. O'Hearn. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375 (1): 271--307, 2007.
[17]
T. Ridge. A rely-guarantee proof system for x86-TSO. In VSTTE 2010, volume 6217 of LNCS, pages 55--70. Springer, 2010.
[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.
[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.
[20]
V. Vafeiadis. Concurrent separation logic and operational semantics. In MFPS 2011, volume 276 of ENTCS, pages 335--351. Elsevier, 2011.
[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.
[22]
M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Trans. Program. Lang. Syst., 13 (2): 181--210, Apr. 1991.
[23]
I. Wehrman and J. Berdine. A proposal for weak-memory local reasoning. In LOLA 2011, 2011.

Cited By

View all
  • (2024)Verification Algorithms for Automated Separation Logic VerifiersComputer Aided Verification10.1007/978-3-031-65627-9_18(362-386)Online publication date: 26-Jul-2024
  • (2023)Verification-Preserving Inlining in Automatic Separation Logic VerifiersProceedings of the ACM on Programming Languages10.1145/35860547:OOPSLA1(789-818)Online publication date: 6-Apr-2023
  • (2023)Concise outlines for a complex logic: a proof outline checker for TaDAFormal Methods in System Design10.1007/s10703-023-00427-w61:1(110-136)Online publication date: 31-Jul-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

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
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 October 2013
Published in SIGPLAN Volume 48, Issue 10

Check for updates

Author Tags

  1. c/c++
  2. concurrency
  3. proof system
  4. separation logic
  5. weak memory models

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)45
  • Downloads (Last 6 weeks)3
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Verification Algorithms for Automated Separation Logic VerifiersComputer Aided Verification10.1007/978-3-031-65627-9_18(362-386)Online publication date: 26-Jul-2024
  • (2023)Verification-Preserving Inlining in Automatic Separation Logic VerifiersProceedings of the ACM on Programming Languages10.1145/35860547:OOPSLA1(789-818)Online publication date: 6-Apr-2023
  • (2023)Concise outlines for a complex logic: a proof outline checker for TaDAFormal Methods in System Design10.1007/s10703-023-00427-w61:1(110-136)Online publication date: 31-Jul-2023
  • (2022)Implementing and verifying release-acquire transactional memory in C11Proceedings of the ACM on Programming Languages10.1145/35633526:OOPSLA2(1817-1844)Online publication date: 31-Oct-2022
  • (2022)CAAT: consistency as a theoryProceedings of the ACM on Programming Languages10.1145/35632926:OOPSLA2(114-144)Online publication date: 31-Oct-2022
  • (2022)Parameterized Verification under Release Acquire is PSPACE-completeProceedings of the 2022 ACM Symposium on Principles of Distributed Computing10.1145/3519270.3538445(482-492)Online publication date: 20-Jul-2022
  • (2021)Formal verification of a concurrent bounded queue in a weak memory modelProceedings of the ACM on Programming Languages10.1145/34735715:ICFP(1-29)Online publication date: 19-Aug-2021
  • (2021)Concise Outlines for a Complex Logic: A Proof Outline Checker for TaDAFormal Methods10.1007/978-3-030-90870-6_22(407-426)Online publication date: 20-Nov-2021
  • (2020)Automating deductive verification for weak-memory programs (extended version)International Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-020-00559-y22:6(709-728)Online publication date: 6-Mar-2020
  • (2020)Per-Location SimulationNASA Formal Methods10.1007/978-3-030-55754-6_16(267-287)Online publication date: 11-May-2020
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media