Backtracking reference stores - Trente-Quatrièmes Journées Francophones des Langages Applicatifs Access content directly
Conference Papers Year : 2023

Backtracking reference stores


François Pottier's unionFind library is parameterized over an underlying store of mutable references, and provides the usual references, transactional reference stores (for rolling back some changes in case of higher-level errors), and persistent reference stores. We extend this library with a new implementation of backtracking reference stores, to get a Union-Find implementation that efficiently supports arbitrary backtracking and also subsumes the transactional interface. Our backtracking reference stores are not specific to unionFind, they can be used to build arbitrary backtracking data structures. The natural implementation, using a journal to record all writes, provides amortized-constant-time operations with a space overhead linear in the number of store updates. A refined implementation reduces the memory overhead to be linear in the number of store cells updated, and gives performance that match non-backtracking references in practice.
Fichier principal
Vignette du fichier
jfla23_paper_9677.pdf (499.28 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03936704 , version 1 (12-01-2023)


  • HAL Id : hal-03936704 , version 1


Camille Noûs, Gabriel Scherer. Backtracking reference stores. JFLA 2023 - 34èmes Journées Francophones des Langages Applicatifs, Jan 2023, Praz-sur-Arly, France. pp.190-210. ⟨hal-03936704⟩
45 View
110 Download


Gmail Facebook Twitter LinkedIn More