majority.pp 633 Bytes
Newer Older
1
population protocol "Majority Protocol" {
Philipp Meyer's avatar
Philipp Meyer committed
2
    states      { good bad neutral mildlybad }
3
4
    transitions { x_good_bad x_good_mildlybad x_bad_neutral x_neutral_mildlybad }
    arcs {
Philipp Meyer's avatar
Philipp Meyer committed
5
6
7
       { good,    bad       } -> x_good_bad          -> { neutral,   mildlybad }
       { good,    mildlybad } -> x_good_mildlybad    -> { good,      neutral   }
       { bad,     neutral   } -> x_bad_neutral       -> { bad,       mildlybad }
8
9
       { neutral, mildlybad } -> x_neutral_mildlybad -> { mildlybad, mildlybad }
    }
Philipp Meyer's avatar
Philipp Meyer committed
10
11
12
    initial   { good bad }
    true      { good neutral }
    false     { bad mildlybad }
13
    predicate { good > bad }
14
}