Theory UvDefs
theory UvDefs
imports "../HOModel"
begin
section ‹Verification of the \emph{UniformVoting} Consensus Algorithm›
text ‹
Algorithm \emph{UniformVoting} is presented in~\<^cite>‹"charron:heardof"›.
It can be considered as a deterministic version of Ben-Or's well-known
probabilistic Consensus algorithm~\<^cite>‹"ben-or:advantage"›. We formalize
in Isabelle the correctness proof given in~\<^cite>‹"charron:heardof"›,
using the framework of theory ‹HOModel›.
›
subsection ‹Model of the Algorithm›
text ‹
We begin by introducing an anonymous type of processes of finite
cardinality that will instantiate the type variable ‹'proc›
of the generic HO model.
›
typedecl Proc
axiomatization where Proc_finite: "OFCLASS(Proc, finite_class)"
instance Proc :: finite by (rule Proc_finite)
abbreviation
"N ≡ card (UNIV::Proc set)"
text ‹
The algorithm proceeds in \emph{phases} of $2$ rounds each (we call
\emph{steps} the individual rounds that constitute a phase).
The following utility functions compute the phase and step of a round,
given the round number.
›
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 =
x :: 'val
vote :: "'val option"
decide :: "'val option"
text ‹
Possible messages sent during the execution of the algorithm, and characteristic
predicates to distinguish types of messages.
›