Hi everyone,
I would like to announce the first release of store
(docs), a library providing a snapshottable bag of mutable references, an efficient data-structure for back-tracking workloads.
To install it, type opam update && opam install store
.
Store provides a simple API for capturing and restoring state as well as easy-to-use high-level wrappers to automatically rollback changes on failure (tentatively
) or unconditionally (temporarily
). It boasts almost-zero overhead when back-tracking is not used and best-in-class performance for back-tracking use cases.
The design and implementation of Store is described in the paper Snapshottable stores, which was given a Distinguished Paper award at this year’s ICFP in Milan. As recognized by this award, the paper is well-written and easy to understand; please give it a read if you are interested in either back-tracking workloads or subtle data structure invariants!
I also want to give a shout-out to François Pottier’s Monolith, which proved invaluable during the development of Store to find and diagnose subtle bugs.
Store was developed through collaboration between myself (Basile Clément) at OCamlPro and Gabriel Scherer at Inria, and the persistent interface was formally verified by Clément Allain and Alexandre Moine at Inria.