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.
Supplemental Material
Available for Download
A Formalization of Relaxed Separation Logic Copyright (c) Viktor Vafeiadis See LICENSE.txt for license. http://www.mpi-sws.org/~viktor/rsl/
- M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In POPL 2011, pages 55--66. ACM, 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Batty, M. Dodds, and A. Gotsman. Library abstraction for C/C++ concurrency. In POPL 2013, pages 235--248. ACM, 2013. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Boyland. Checking interference with fractional permissions. In SAS 2003, volume 2694 of LNCS, pages 55--72. Springer, 2003. Google Scholar
Digital Library
- C. Calcagno, D. Distefano, and V. Vafeiadis. Bi-abductive resource invariant synthesis. In APLAS, volume 5904 of LNCS, pages 259--274. Springer, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- ISO/IEC 14882:2011. Programming language C++, 2011.Google Scholar
- ISO/IEC 9899:2011. Programming language C, 2011.Google Scholar
- 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 Scholar
- A. Nanevski, V. Vafeiadis, and J. Berdine. Structuring the verification of heap-manipulating programs. In POPL, pages 261--274. ACM, 2010. Google Scholar
Digital Library
- P. O'Hearn. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375 (1): 271--307, 2007. Google Scholar
Digital Library
- T. Ridge. A rely-guarantee proof system for x86-TSO. In VSTTE 2010, volume 6217 of LNCS, pages 55--70. Springer, 2010. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- V. Vafeiadis. Concurrent separation logic and operational semantics. In MFPS 2011, volume 276 of ENTCS, pages 335--351. Elsevier, 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Trans. Program. Lang. Syst., 13 (2): 181--210, Apr. 1991. Google Scholar
Digital Library
- I. Wehrman and J. Berdine. A proposal for weak-memory local reasoning. In LOLA 2011, 2011.Google Scholar
Index Terms
Relaxed separation logic: a program logic for C11 concurrency
Recommendations
Relaxed separation logic: a program logic for C11 concurrency
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsWe 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 ...
Verifying read-copy-update in a logic for weak memory
PLDI '15Read-Copy-Update (RCU) is a technique for letting multiple readers safely access a data structure while a writer concurrently modifies it. It is used heavily in the Linux kernel in situations where fast reads are important and writes are infrequent. ...
Verifying read-copy-update in a logic for weak memory
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and ImplementationRead-Copy-Update (RCU) is a technique for letting multiple readers safely access a data structure while a writer concurrently modifies it. It is used heavily in the Linux kernel in situations where fast reads are important and writes are infrequent. ...







Comments