Metraipolis › archive › dc_75b6d1522eb1

Episodic Loops: Finitary Event Structures and Operational Semantics for C11 Programs with Retries — arXiv:2609.34646

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.34646
License (as archived)
CC0-1.0
Archived
2026-10-08T00:44:10.669Z
SHA-256 of the archived text
41bc015857f9398f8abececaa565411c01738ec8fa057e1f843131b672c97243
Stable URL of this page
https://metraipolis.com/documento/dc_75b6d1522eb1

How to cite

Episodic Loops: Finitary Event Structures and Operational Semantics for C11 Programs with Retries — arXiv:2609.34646 — arXiv (en), https://arxiv.org/abs/2609.34646 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_75b6d1522eb1 (Metraipolis archive dc_75b6d1522eb1, sha256 41bc015857f9398f8abececaa565411c01738ec8fa057e1f843131b672c97243)
BibTeX
@misc{dc75b6d1522eb1,
  title = {Episodic Loops: Finitary Event Structures and Operational Semantics for C11 Programs with Retries — arXiv:2609.34646},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.34646},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_75b6d1522eb1; sha256 41bc015857f9398f8abececaa565411c01738ec8fa057e1f843131b672c97243},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.34646. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Lock-free synchronisation algorithms are often implemented with fallible operations, such as compare-and-swap (CAS), wrapped in unbounded retry loops. Verifying such algorithms requires considering arbitrarily many failing iterations, yielding large state spaces, compounded by the interleavings of concurrent threads. Prior work discarded failing iterations, arguing that they leave no trace in the post-loop state. Compilers and hardware reorder instructions, and load-store reorderings may cross the boundaries of failing iterations, introducing subtle concurrency bugs. We demonstrate one such bug, making use-after-free possible in a previously verified variant of Read-Copy-Update - a synchronisation primitive widely adopted in the Linux Kernel - and we provide and verify a fix. We find that practical retries in lock-free algorithms adhere to a common pattern. We introduce episodic loops, a semantic characterisation of unbounded retry loops which is syntactically recognisable in many practical cases, and synchronisation points, operations that bound both instruction reordering and state space within episodic loops. We show that SMRD - a symbolic event structure semantics for C11 programs which allows for load-store reordering - admits a finite representation in programs where unbounded loops are episodic. We further introduce a finitary operational semantics that allows safety properties to be verified in finitely many steps. For the use-after-free bug we demonstrate, verification takes a single pass over the program, linear in the program size. We provide a reference implementation of SMRD reproducing the bug and verifying the fix, and mechanise the operational semantics together with the minimal bug and its fix in Isabelle/HOL.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-29 in cs.PL).
Categorie arXiv: Programming Languages (cs.PL).
Pagina del lavoro: https://arxiv.org/abs/2609.34646 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-08T00:18:31.966Z dalla pagina https://arxiv.org/catchup/cs.PL/2026-09-29?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).