-
Notifications
You must be signed in to change notification settings - Fork 1
/
QuorumProof.scala
51 lines (39 loc) · 1.16 KB
/
QuorumProof.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package distribution
import stainless.collection._
import stainless.lang._
import Networking._
import FifoNetwork._
import Protocol._
object ProtocolProof {
def networkInvariant(
param: Parameter,
states: Map[ActorId,State],
messages: Map[(ActorId,ActorId),List[Message]],
getActor: Map[ActorId,Actor]
) = {
true
}
def validId(net: VerifiedNetwork, id: ActorId) = {
true
}
def peekMessageEnsuresReceivePre(net: VerifiedNetwork, sender: ActorId, receiver: ActorId, m: Message) = {
true
} holds
def runActorsPrecondition(p: Parameter, initialActor: Actor, schedule: List[(ActorId,ActorId,Message)]) = {
true
}
def init_states_fun(id: ActorId): State = Waiting()
def init_messages_fun(ids: (ActorId,ActorId)): List[Message] = Nil()
def init_getActor_fun(id: ActorId): Actor = {
id match {
case ScrutId() => Scrutineer(id)
case MemberId(_) => AssemblyMember(id)
}
}
def init_states = Map(init_states_fun)
def init_messages = Map(init_messages_fun)
def init_getActor = Map(init_getActor_fun)
def makeNetwork(p: Parameter) = {
VerifiedNetwork(p, init_states, init_messages, init_getActor)
}
}