Skip to content

Instantly share code, notes, and snippets.

@grogers0
Created May 31, 2017 22:19
Show Gist options
  • Save grogers0/f0f39ad5a8a9d9ac04e5470e498b95c6 to your computer and use it in GitHub Desktop.
Save grogers0/f0f39ad5a8a9d9ac04e5470e498b95c6 to your computer and use it in GitHub Desktop.
\* Timestamps is the set of possible timestamps for operations to choose from.
\* Each operation uses a unique timestamp.
\* Values is the set of possible values to set the register to.
\* Acceptors is the set of nodes which act as acceptors in the paxos sense.
\* Quorums is the set of all possible quorums, typically simple majorities.
CONSTANTS Timestamps, Values, Acceptors, Quorums
ASSUME Timestamps \subseteq Nat
ASSUME IsFiniteSet(Timestamps)
NoTS == -1
ASSUME NoTS \notin Timestamps
ASSUME Quorums \subseteq SUBSET Acceptors
ASSUME \A q1, q2 \in Quorums : q1 \intersect q2 /= {}
\* The initial value is chosen arbitrarily
InitVal == CHOOSE v \in Values : TRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment