StateMachineCell:
PROC [public: Core.Wire, fsa: StateMachine, name:
ROPE ←
NIL, props: Core.Properties ←
NIL, completeCheck:
BOOL ←
FALSE, assert: Boole.Expression ← Boole.true]
RETURNS [cellType: Core.CellType];
Checks that all source states are target states and vice versa. If completeCheck is TRUE then checks that, starting from each state, the possible transitions cover the input space and that no pair of transition is ambiguous, that is the OR of all transition expressions is TRUE and that pairwise AND of any two transition expressions is FALSE. Under the user assertion on inputs, what we need to prove is that assert implies OR of all transition expressions and that assert implies NOT AND of pairwise transition expressions. Id est:
assert -> all <=> (NOT assert) OR all = true
assert -> ~(e1 AND e2) <=> assert AND e1 AND e2 = false
Hence, the check under constraint consists in initializing the global OR to NOT assert and of checking that the global OR is Equal to true and that for each pair (e1,e2), assert AND e1 AND e2 is Equal to false.