In Extended Abstract: A Functional Derivation
of the Warren Abstract Machine, Maciej Pir´og and Jeremy Gibbons describe a data structure as
semi-persistent [7] " if we can backtrack to its previous versions,
but we never simultaneously keep two different modifications (siblings) of
the same ancestor."
Assume some object dict : System.Collections.Dictionary<A, FSharp.Collections.List<B>>
.
Let the values in the dictionary represent the states relevant to certain keys. Would dict
be an effectively semi-persistent state-tracking mechanism, assuming only one such Dictionary
is used? Is that guaranteed by the mutability of the Dictionary
type coupled with the sequences of previous states?
That's a tough one (to parse, no less answer) - please NOTE: this is per my understanding of the abstract given... The answer would be Yes AND No. The key here lies in the usage, not necessarily the structure. Dictionary itself is persistent. Like the authors you could use it in a semi-persistent manner. Having the state values in a list, however, can be a bit troubling, as you may be tempted to retain siblings (again, in the usage).
For a better understanding - go to the source:
https://www.lri.fr/~conchon/publis/spds-esop08.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With