Compositional semantics for shared-variable concurrency

Mikhail Svyatlovskiy, Shai Mermelstein, Ori Lahav

Research output: Contribution to journalArticlepeer-review

Abstract

We revisit the fundamental problem of defining a compositional semantics for a concurrent programming language under sequentially consistent memory with the aim of equating the denotations of pieces of code if and only if these pieces induce the same behavior under all program contexts. While the denotational semantics presented by Brookes [Information and Computation 127, 2 (1996)] has been considered a definitive solution, we observe that Brookes's full abstraction result crucially relies on the availability of an impractical whole-memory atomic read-modify-write instruction. In contrast, we consider a language with standard primitives, which apply to a single variable. For that language, we propose an alternative denotational semantics based on traces that track program write actions together with the writes expected from the environment, and equipped with several closure operators to achieve necessary abstraction. We establish the adequacy of the semantics, and demonstrate full abstraction for the case that the analyzed code segment is loop-free. Furthermore, we show that by including a whole-memory atomic read in the language, one obtains full abstraction for programs with loops. To gain confidence, our results are fully mechanized in Coq.

Original languageEnglish
Article number169
JournalProceedings of the ACM on Programming Languages
Volume8
DOIs
StatePublished - 20 Jun 2024

Keywords

  • Compiler Optimizations
  • Concurrency
  • Denotational Semantics
  • Shared-Memory

Fingerprint

Dive into the research topics of 'Compositional semantics for shared-variable concurrency'. Together they form a unique fingerprint.

Cite this