Copyright | (c) Jesper Kuiper 2021 Leander van Boven 2021 Ramon Meffert 2021 |
---|---|
License | BSD3 |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data State = State {}
- printState :: State -> Bool -> IO ()
- validCalls :: GossipGraph -> ([Call], [GroupCall])
- makeCall :: Call -> State -> State
- executeCalls :: [Call] -> State -> IO State
- evaluateGossipAtom :: State -> GossipAtom -> Bool
- evaluateBddVar :: State -> Int -> Bool
- evaluate :: State -> Form -> Bool
- (|=) :: State -> Form -> Bool
- evaluate' :: State -> GossipForm -> Bool
State type
The gossip state.
State | |
|
Call validation and execution
validCalls :: GossipGraph -> ([Call], [GroupCall]) Source #
Determines based on the current GossipGraph state which calls are actually allowed to be made. Note that no protocols are used for this, a call between a and b is valid iff a knows the number of b.
executeCalls :: [Call] -> State -> IO State Source #
Makes multiple calls by repeatedly invoking makeCall
.
Epistemic formula evaluation
evaluateGossipAtom :: State -> GossipAtom -> Bool Source #
Evaluates a gossip atom (N(x,y), S(x,y) or C(x,y)), given the current state
evaluateBddVar :: State -> Int -> Bool Source #
Evaluates a Bdd variable as Int, given the current state