ICFP 2024
Mon 2 - Sat 7 September 2024 Milan, Italy
Wed 4 Sep 2024 13:48 - 14:06 at Green 1-2-3 - Separation Logic Chair(s): Jacques Garrigue

We say that an imperative data structure is \emph{snapshottable} or \emph{supports snapshots} if we can efficiently capture its current state, and restore a previously captured state to become the current state again. This is useful, for example, to implement backtracking search processes that update the data structure during search.

Inspired by a data structure proposed in 1978 by Baker, we present a \emph{snapshottable store}, a bag of mutable references that supports snapshots. Instead of capturing and restoring an array, we can capture an arbitrary set of references (of any type) and restore all of them at once. This snapshottable store can be used as a building block to support snapshots for arbitrary data structures, by simply replacing all mutable references in the data structure by our store references. We present use-cases of a snapshottable store when implementing type-checkers and automated theorem provers.

Our implementation is designed to provide a very low overhead over normal references, in the common case where the capture/restore operations are infrequent. Read and write in store references are essentially as fast as in plain references in most situations, thanks to a key optimisation we call \emph{record elision}. In comparison, the common approach of replacing references by integer indices into a persistent map incurs a logarithmic overhead on reads and writes, and sophisticated algorithms typically impose much larger constant factors.

The implementation, which is inspired by Baker's and the OCaml implementation of persistent arrays by Conchon and Filliâtre, is both fairly short and very hard to understand: it relies on shared mutable state in subtle ways. We provide a mechanized proof of correctness of its core using the Iris framework for the Coq proof assistant.

Wed 4 Sep

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

13:30 - 15:00
Separation Logic ICFP Papers and Events at Green 1-2-3
Chair(s): Jacques Garrigue Nagoya University
13:30
18m
Talk
Error Credits: Resourceful Reasoning about Error Bounds for Higher-Order Probabilistic ProgramsDistinguished Paper
ICFP Papers and Events
Alejandro Aguirre Aarhus University, Philipp G. Haselwarter Aarhus University, Markus de Medeiros New York University, Kwing Hei Li Aarhus University, Simon Oddershede Gregersen New York University, Joseph Tassarotti New York University, Lars Birkedal Aarhus University
DOI Pre-print
13:48
18m
Talk
Snapshottable StoresDistinguished Paper
ICFP Papers and Events
Clément Allain Inria, Basile Clément OCamlPro, Alexandre Moine Inria, Gabriel Scherer Université Paris Cité - Inria - CNRS
DOI
14:06
18m
Talk
Almost-Sure Termination by Guarded Refinement
ICFP Papers and Events
Simon Oddershede Gregersen New York University, Alejandro Aguirre Aarhus University, Philipp G. Haselwarter Aarhus University, Joseph Tassarotti New York University, Lars Birkedal Aarhus University
DOI Pre-print
14:24
18m
Talk
Refinement Composition Logic
ICFP Papers and Events
Youngju Song MPI-SWS, Dongjae Lee Seoul National University
DOI
14:42
18m
Talk
Specification and Verification for Unrestricted Algebraic Effects and Handling
ICFP Papers and Events
Yahui Song National University of Singapore, Darius Foo National University of Singapore, Wei-Ngan Chin National University of Singapore
DOI Pre-print