Two-sorted algebraic decompositions of Brookes’s shared-state denotational semantics

Yotam Dvir*, Ohad Kammar, Ori Lahav, Gordon Plotkin

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationFoundations of Software Science and Computation Structures - 28th International Conference, FoSSaCS 2025, Held as Part of the International Joint Conferences on Theory and Practice of Software, ETAPS 2025, Proceedings
EditorsParosh Aziz Abdulla, Delia Kesner
PublisherSpringer Science and Business Media Deutschland GmbH
Pages377-398
Number of pages22
ISBN (Print)9783031908965
DOIs
StatePublished - 2025
Event28th International Conference on Foundations of Software Science and Computation Structures, FOSSACS 2025, held as part of the International Joint Conferences on Theory and Practice of Software, ETAPS 2025 - Hamilton, Canada
Duration: 3 May 20258 May 2025

Publication series

NameLecture Notes in Computer Science
Volume15691 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference28th International Conference on Foundations of Software Science and Computation Structures, FOSSACS 2025, held as part of the International Joint Conferences on Theory and Practice of Software, ETAPS 2025
Country/TerritoryCanada
CityHamilton
Period3/05/258/05/25

Funding

FundersFunder number
Danel Ahman
Royal Society
European Research Council
Israel Science Foundation814/22
Horizon 2020 Framework Programme851811

    Keywords

    • algebraic effects
    • closure pairs
    • concurrency
    • denotational semantics
    • equational theory
    • global state
    • join semilattices
    • mnemoids
    • monads
    • multi-sorted algebra
    • representability
    • shared state
    • trace semantics

    Fingerprint

    Dive into the research topics of 'Two-sorted algebraic decompositions of Brookes’s shared-state denotational semantics'. Together they form a unique fingerprint.

    Cite this