Theory Uv_Defs
section ‹The UniformVoting Algorithm›
theory Uv_Defs
imports Heard_Of.HOModel "../Consensus_Types" "../Quorums"
begin
text ‹The contents of this file have been taken almost verbatim from the
Heard Of Model AFP entry. The only difference is that the types have been
changed.›
subsection ‹Model of the algorithm›
abbreviation "nSteps ≡ 2"
definition phase where "phase (r::nat) ≡ r div nSteps"
definition step where "step (r::nat) ≡ r mod nSteps"
text ‹
The following record models the local state of a process.
›
record 'val pstate =
last_obs :: 'val
agreed_vote :: "'val option"
decide :: "'val option"
text ‹
Possible messages sent during the execution of the algorithm, and characteristic
predicates to distinguish types of messages.
›