Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype NodeJoinPlan = NodeJoinPlan (Map CoreNodeId SlotNo)
- coreNodeIdJoinSlot ∷ HasCallStack ⇒ NodeJoinPlan → CoreNodeId → SlotNo
- genNodeJoinPlan ∷ NumCoreNodes → NumSlots → Gen NodeJoinPlan
- nodeIdJoinSlot ∷ HasCallStack ⇒ NodeJoinPlan → NodeId → SlotNo
- shrinkNodeJoinPlan ∷ NodeJoinPlan → [NodeJoinPlan]
- trivialNodeJoinPlan ∷ NumCoreNodes → NodeJoinPlan
Node Join Plan
newtype NodeJoinPlan Source #
In which slot each node joins the network
Instances
Show NodeJoinPlan Source # | |
Defined in Test.ThreadNet.Util.NodeJoinPlan showsPrec ∷ Int → NodeJoinPlan → ShowS # show ∷ NodeJoinPlan → String # showList ∷ [NodeJoinPlan] → ShowS # | |
Condense NodeJoinPlan Source # | |
Defined in Test.ThreadNet.Util.NodeJoinPlan |
coreNodeIdJoinSlot ∷ HasCallStack ⇒ NodeJoinPlan → CoreNodeId → SlotNo Source #
Partial; error
for a node not in the plan
∷ NumCoreNodes | PRECONDITION: non-negative |
→ NumSlots | PRECONDITION: positive |
→ Gen NodeJoinPlan |
Generate a NodeJoinPlan
consistent with the given properties
INVARIANT: Nodes with higher Ids will not join before nodes with lower Ids. This eliminates some uninteresting symmetry and makes the counter-examples easier for humans to interpret.
nodeIdJoinSlot ∷ HasCallStack ⇒ NodeJoinPlan → NodeId → SlotNo Source #
Partial; error
for a node not in the plan
shrinkNodeJoinPlan ∷ NodeJoinPlan → [NodeJoinPlan] Source #
Shrink a node join plan
INVARIANT no inter-join delay increases
Specifically, we shrink by setting some of the delays to 0.
trivialNodeJoinPlan ∷ NumCoreNodes → NodeJoinPlan Source #
All nodes join immediately