The leaky semicolon: compositional semantic dependencies for relaxed-memory concurrency
Open Access
- 12 January 2022
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 6 (POPL) , 1-30
Abstract
Program logics and semantics tell a pleasant story about sequential composition: when executing (S1;S2), we first execute S1 then S2. To improve performance, however, processors execute instructions out of order, and compilers reorder programs even more dramatically. By design, single-threaded systems cannot observe these reorderings; however, multiple-threaded systems can, making the story considerably less pleasant. A formal attempt to understand the resulting mess is known as a “relaxed memory model.” Prior models either fail to address sequential composition directly, or overly restrict processors and compilers, or permit nonsense thin-air behaviors which are unobservable in practice. To support sequential composition while targeting modern hardware, we enrich the standard event-based approach with preconditions and families of predicate transformers. When calculating the meaning of (S1; S2), the predicate transformer applied to the precondition of an event e from S2 is chosen based on the set of events in S1 upon which e depends. We apply this approach to two existing memory models.Keywords
Funding Information
- National Science Foundation (CCR-1617175)
- Engineering and Physical Sciences Research Council (EP/V000470/1, EP/R032971/1)
This publication has 39 references indexed in Scilit:
- On Validity of Program Transformations in the Java Memory Model2008
- Z3: An Efficient SMT Solver2008
- Resources, concurrency, and local reasoningTheoretical Computer Science, 2007
- The Java memory modelACM SIGPLAN Notices, 2005
- Full Abstraction for a Shared-Variable Parallel LanguageInformation and Computation, 1996
- The equational theory of pomsetsTheoretical Computer Science, 1988
- LCF considered as a programming languageTheoretical Computer Science, 1977
- Fully abstract models of typed λ-calculiTheoretical Computer Science, 1977
- Guarded commands, nondeterminacy and formal derivation of programsCommunications of the ACM, 1975
- An axiomatic basis for computer programmingCommunications of the ACM, 1969