skip to main content
10.1145/2509136.2509532acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
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
  • (2025)Formal Foundations for Translational Separation Logic VerifiersProceedings of the ACM on Programming Languages10.1145/37048569:POPL(569-599)Online publication date: 9-Jan-2025
  • (2024)A Proof Recipe for Linearizability in Relaxed Memory Separation LogicProceedings of the ACM on Programming Languages10.1145/36563848:PLDI(175-198)Online publication date: 20-Jun-2024
  • (2024)An Axiomatic Basis for Computer Programming on the Relaxed Arm-A Architecture: The AxSL LogicProceedings of the ACM on Programming Languages10.1145/36328638:POPL(604-637)Online publication date: 5-Jan-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 October 2013

Permissions

Request permissions for this article.

Check for updates

Author Tags

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

Qualifiers

  • Research-article

Conference

SPLASH '13
Sponsor:

Acceptance Rates

OOPSLA '13 Paper Acceptance Rate 50 of 189 submissions, 26%;
Overall Acceptance Rate 268 of 1,244 submissions, 22%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)34
  • Downloads (Last 6 weeks)12
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Formal Foundations for Translational Separation Logic VerifiersProceedings of the ACM on Programming Languages10.1145/37048569:POPL(569-599)Online publication date: 9-Jan-2025
  • (2024)A Proof Recipe for Linearizability in Relaxed Memory Separation LogicProceedings of the ACM on Programming Languages10.1145/36563848:PLDI(175-198)Online publication date: 20-Jun-2024
  • (2024)An Axiomatic Basis for Computer Programming on the Relaxed Arm-A Architecture: The AxSL LogicProceedings of the ACM on Programming Languages10.1145/36328638:POPL(604-637)Online publication date: 5-Jan-2024
  • (2024)Formalisation of a New Weak Semantics for AuDaLaAutomated Technology for Verification and Analysis10.1007/978-3-031-78750-8_5(93-116)Online publication date: 21-Oct-2024
  • (2023)Spirea: A Mechanized Concurrent Separation Logic for Weak Persistent MemoryProceedings of the ACM on Programming Languages10.1145/36228207:OOPSLA2(632-657)Online publication date: 16-Oct-2023
  • (2023)Sound Predictive Fuzzing for Multi-threaded Programs2023 IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC)10.1109/COMPSAC57700.2023.00110(810-819)Online publication date: Jun-2023
  • (2023)Rely-Guarantee Reasoning for Causally Consistent Shared MemoryComputer Aided Verification10.1007/978-3-031-37706-8_11(206-229)Online publication date: 17-Jul-2023
  • (2023)Reasoning About Promises in Weak Memory Models with Event StructuresFormal Methods10.1007/978-3-031-27481-7_17(282-300)Online publication date: 6-Mar-2023
  • (2022)Compositional Reasoning for Non-multicopy Atomic ArchitecturesFormal Aspects of Computing10.1145/357413735:2(1-30)Online publication date: 14-Dec-2022
  • (2022)Compass: strong and compositional library specifications in relaxed memory separation logicProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523451(792-808)Online publication date: 9-Jun-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media