package cactus
Module Btree.MakeSource
Parameters
module InValue : Input.Valuemodule Size : Input.SizeSignature
create ?cache ?record root creates a btree storage in directory root. If no cache is specified each call to create opens a fresh instance. If record is specified then a trace is recorded in file record.
replay ?prog path t replays the operations stored in file path.
init ~root n ~read performs a batch initialisation. read is an iterator-like function : read n reads the next n bindings and returns them in a single string chunk which is the concatenation of each key ^ value. init is (much) faster than adding each bindings one by one. It assumes that the bindings are sorted.
reconstruct root is like create root but assumes that the b.tree file in directory root is corrupted (nodes are possibly corrupted but the leaves are not impacted) and repairs it first.
For every node/leaf in t which are at least depth away from the leaves, snapshot ~depth t, write in a file its rep as given by their corresponding pp function.