Reference. An Algebraic Theory for Shared-State Concurrency
Cite
Cited by (3)
A Brookes-Style Denotational Semantics for Release/Acquire Concurrency dvir-2025-a
We present a compositional denotational semantics for a functional language with first-class parallel composition and shared-memory operations whose operational semantics follows the Release/Acquire weak memory model (RA). The semantics is formulated in Moggi’s monadic approach and is based on Brookes-style traces. To do so we adapt Brookes’s traces to view-based machine for RA by Kang et al., and supplement Brookes’s mumble and stutter closure operations with additional operations, specific to RA. The latter provides a more nuanced understanding of traces that uncouples them from operational interrupted executions. We show that our denotational semantics is adequate and use it to validate various program transformations of interest. This is the first work to put weak memory models on the same footing as many other programming effects in Moggi’s standard monadic approach.
Two-sorted algebraic decompositions of Brookes’s shared-state denotational semantics dvir-2025-two
We define a two sorted equational theory of algebraic effects that models concurrent shared state with preemptive interleaving, recovering Brookes’s seminal 1996 trace-based model precisely. The decomposition allows us to analyse Brookes’s model algebraically in terms of separate but interacting components. The multiple sorts partition terms into layers. We use two sorts: a “hold” sort for layers that disallow interleaving of environment memory accesses, analogous to holding a global lock on the memory; and a “cede” sort for the opposite. The algebraic signature comprises of independent interlocking components: two new operators that switch between these sorts, delimiting the atomic layers, thought of as acquiring and releasing the global lock; non-deterministic choice; and state-accessing operators. The axioms similarly divide cleanly: the delimiters behave as a closure pair; all operators are strict, and distribute over non-empty non-deterministic choice; and non-deterministic global state obeys Plotkin and Power’s presentation of global state. Our representation theorem expresses the free algebras over a two-sorted family of variables as sets of traces with suitable closure conditions. When the held sort has no variables, we recover Brookes’s trace semantics. We define several other single-and two-sorted theories to elucidate the connection to Brookes’s model via translation embeddings and equivalences.
A Denotational Approach to Release/Acquire Concurrency dvir-2024-a
We present a compositional denotational semantics for a functional language with first-class parallel composition and shared-memory operations whose operational semantics follows the Release/Acquire weak memory model (RA). The semantics is formulated in Moggi’s monadic approach, and is based on Brookes-style traces. To do so we adapt Brookes’s traces to Kang et al.’s view-based machine for RA, and supplement Brookes’s mumble and stutter closure operations with additional operations, specific to RA. The latter provides a more nuanced understanding of traces that uncouples them from operational interrupted executions. We show that our denotational semantics is adequate and use it to validate various program transformations of interest. This is the first work to put weak memory models on the same footing as many other programming effects in Moggi’s standard monadic approach.
Cites 42 works (5 here)
With notes (5)
On the expressive power of user-defined effects: Effect handlers, monadic reflection, delimited control forster-2019-on
We compare the expressive power of three programming abstractions for user-defined computational effects: Plotkin and Pretnar’s effect handlers, Filinski’s monadic reflection, and delimited control. This comparison allows a precise discussion about the relative expressiveness of each programming abstraction. It also demonstrates the sensitivity of the relative expressiveness of user-defined effects to seemingly orthogonal language features. We present three calculi, one per abstraction, extending Levy’s call-by-push-value. For each calculus, we present syntax, operational semantics, a natural type-and-effect system, and, for effect handlers and monadic reflection, a set-theoretic denotational semantics. We establish their basic metatheoretic properties: safety, termination, and, where applicable, soundness and adequacy. Using Felleisen’s notion of a macro translation, we show that these abstractions can macro express each other, and show which translations preserve typeability. We use the adequate finitary set-theoretic denotational semantics for the monadic calculus to show that effect handlers cannot be macro expressed while preserving typeability either by monadic reflection or by delimited control. Our argument fails with simple changes to the type system such as polymorphism and inductive types. We supplement our development with a mechanised Abella formalisation.
NetKAT: Semantic foundations for networks anderson2014netkat
Recent years have seen growing interest in high-level languages for programming networks. But the design of these languages has been largely ad hoc, driven more by the needs of applications and the capabilities of network hardware than by foundational principles. The lack of a semantic foundation has left language designers with little guidance in determining how to incorporate new features, and programmers without a means to reason precisely about their code. This paper presents NetKAT, a new network programming language that is based on a solid mathematical foundation and comes equipped with a sound and complete equational theory. We describe the design of NetKAT, including primitives for filtering, modifying, and transmitting packets; union and sequential composition operators; and a Kleene star operator that iterates programs. We show that NetKAT is an instance of a canonical and well-studied mathematical structure called a Kleene algebra with tests (KAT) and prove that its equational theory is sound and complete with respect to its denotational semantics. Finally, we present practical applications of the equational theory including syntactic techniques for checking reachability, proving non-interference properties that ensure isolation between programs, and establishing the correctness of compilation algorithms.
Algebraic foundations for effect-dependent optimisations kammar-2012-algebraic
Just do it: simple monadic equational reasoning gibbons-2011-just
Call-By-Push-Value: A Functional/Imperative Synthesis levy-2003-callbypushvalue
External (37)
- The leaky semicolon: compositional semantic dependencies for relaxed-memory concurrency (2022)
- Concurrent NetKAT: Modeling and analyzing stateful, concurrent networks (2022)
- Complete trace models of state and control (2021)
- Pomsets with preconditions: a simple model of relaxed memory (2020)
- Factorisation systems for logical relations and monadic lifting in type-and-effect system semantics (2018)
- A Denotational Semantics for SPARC TSO (2018)
- List Objects with Algebraic Structure (2017)
- Strong Logic for Weak Memory: Reasoning About Release-Acquire Consistency in Iris (2017)
- A monad for full ground reference cells (2017)
- A promising semantics for relaxed-memory concurrency (2017)
- Effect-dependent transformations for concurrent programs (2016)
- Taming release-acquire consistency (2016)
- Weak memory models using event structures (2016)
- Operational aspects of C/C++ concurrency (2016)
- Intensionality, Definability and Computation (2014)
- KAT + B! (2014)
- Algebraic theory of type-and-effect systems (2014)
- The laws of programming unify process calculi (2013)
- A Concurrent Logical Relation (2012)
- A Model of Cooperative Threads (2010)
- Handlers of Algebraic Effects (2009)
- Combining algebraic effects with continuations (2006)
- Combining effects: Sum and tensor (2006)
- Algebraic Operations and Generic Effects (2003)
- Notions of computation determine monads (2002)
- Full Abstraction for a Shared-Variable Parallel Language (1996)
- The Type and Effect Discipline (1994)
- Polymorphic type, region and effect inference (1992)
- Algebraic reconstruction of types and effects (1991)
- Notions of computation and monads (1991)
- Polymorphic effect systems (1988)
- On powerdomains and modality (1985)
- Type Algebras, Functor Categories, and Block Structure (1983)
- A Category-Theoretic Approach to the Semantics of Programming Languages (1983)
- Petri nets, event structures and domains, part I (1981)
- The essence of Algol (1981)
- An outline of functorial semantics (1969)