Last active
May 31, 2017 22:34
-
-
Save grogers0/6e199f589ea38f0c9527e0b21f60deef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Messages == [type: {"prepare"}, acceptor: Acceptors, ts: Timestamps] | |
\union [type: {"promise"}, acceptor: Acceptors, ts: Timestamps, | |
prevTS: Timestamps \union {NoTS}, prevVal: Values] | |
\union [type: {"accept"}, acceptor: Acceptors, ts: Timestamps, val: Values] | |
\union [type: {"accepted"}, acceptor: Acceptors, ts: Timestamps, val: Values] | |
\* Each operation represents a CAS from an oldVal to a newVal. In Gryadka, | |
\* reads are treated the same as CAS(val, val) | |
Operations == [oldVal: Values, newVal: Values] | |
Events == [type: {"invoke", "response"}, ts: Timestamps] | |
TypeOK == /\ msgs \subseteq Messages | |
/\ ops \in [Timestamps -> Operations] | |
/\ acceptorTS \in [Acceptors -> Timestamps \union {NoTS}] | |
/\ acceptorValTS \in [Acceptors -> Timestamps \union {NoTS}] | |
/\ acceptorValue \in [Acceptors -> Values] | |
/\ history \in Seq(Events) | |
Init == /\ msgs = {} | |
/\ ops \in [Timestamps -> Operations] | |
/\ acceptorTS = [a \in Acceptors |-> NoTS] | |
/\ acceptorValTS = [a \in Acceptors |-> NoTS] | |
/\ acceptorValue = [a \in Acceptors |-> InitVal] | |
/\ history = <<>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment