Documentation

CslibFrontier.Computability.Distributed.SetAgreement.AtomicSnapshot

Wait-free single-writer atomic snapshot memory #

As an unbounded sequence-numbered single-writer step toward #7504, this module formalizes the unbounded wait-free single-writer atomic snapshot algorithm of Afek, Attiya, Dolev, Gafni, Merritt, and Shavit ([AAD+93], §§2.1, 3, Figures 1 and 3, Lemmas 3.1–3.4, and Theorem 1; author PDF pp. 4–10, JACM 40(4):873–890).

Each process i : P owns a single-writer, multi-reader (SWMR) atomic register SnapshotReg P Data holding (data, seq, view) (initialized to (dInit, 0, fun _ => dInit)). Crucially, collect is not modeled as an atomic multi-register read: each step of collectA or collectB reads one register s.reg j at a time along a ScanOrder P, allowing arbitrary interleaved reads, writes, invocations, and crashes by other processes between any two register reads. Relative to Figure 1 (p. 4) and §3.1 (pp. 7–8), which separate internal Scan_i / Update_i(d) transitions from external ScanReturn_i / UpdateReturn_i outputs, stepSnapshot fuses scan_i's final local decision (finishScan) with .doneScan and fuses update_i's atomic register write (readyToWrite) with .doneUpdate.

Scope note #

This module formalizes the unbounded sequence-numbered single-writer construction as a step toward #7504 (after [AAD+93], §3, Theorem 1). Their bounded-register toggle/handshake single-writer (§4, Theorem 2) and multi-writer (§5, Theorem 3) constructions remain open in #7504.

Main definitions #

Main results #

References #