This repo contains TLA+ specifications of simple key-value store exhibiting snapshot algorithm.
Andrew Helwer contributed the following:
KeyValueStore.tla
has the TLA+ specs for the key-value store with snapshot isolationMCKS.tla
is the file to use for TLC model checkingMCKVS*.cfg
are alternative config files to use for TLC checking
Murat Demirbas wrote a PlusCal version of the key-value store with snapshot isolation. He also instantiated the ClientCentric.tla
(from Tim Soethout's work) to be able to properly check the key-value store for snapshot isolation semantics.
KVsnap.tla
is the Pluscal model for the key-value storeMCKVsnap.tla
is the file to use for TLC model checkingMCKVsnap.cfg
is the corresponding config file for model checking (with this config, model checking completes under a minute; it is possible to add another key and model check)
If you uncomment the Serialization invariant in KVsnap.tla
, and MCKVsnap.cfg
, you can see a counterexample of how this snapshot-isolation key-value store violates serializability.
- Make sure TLA+ plugin is installed in VSCode
- Open the .cfg file you are interested in checking in VSCode
- Get the VSCode panel (Option+X on Mac), and choose "TLA+: Check Model with TLC")