Skip to content

Instantly share code, notes, and snippets.

@grogers0
Created May 31, 2017 22:49
Show Gist options
  • Save grogers0/b2fb86765993e895868ff9c5656dd1d6 to your computer and use it in GitHub Desktop.
Save grogers0/b2fb86765993e895868ff9c5656dd1d6 to your computer and use it in GitHub Desktop.
SelectMessages(type, ts) == {m \in msgs : m.type = type /\ m.ts = ts}
Prepare(ts) == /\ SelectMessages("prepare", ts) = {} \* Each timestamp must be unique
/\ msgs' = msgs \union [type: {"prepare"}, acceptor: Acceptors, ts: {ts}]
/\ history' = Append(history, [type |-> "invoke", ts |-> ts])
/\ UNCHANGED <<ops, acceptorTS, acceptorValTS, acceptorValue>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment