Side-by-Side Composition
Consider two state machines connected in parallel:The components are
StateMachineA = ( StatesA , InputsA , OutputsA, updateA, initialStateA)
StateMachineB = ( StatesB, InputsB, OutputsB, updateB, initialStateB )
Let the composition be given by
StateMachine = ( States, Inputs, Outputs, update, initialState )
Definition of the composition:
- States = StatesA ×StatesB
- Inputs = InputsA × InputsB
- Outputs = OutputsA × OutputsB
- initialState = (initialStateA , initialStateB )
- update((sA, sB), (xA, xB)) = ((s'A, s'B), (yA, yB))
where
(s'A, yA) = updateA(sA , xA)
(s'B, yB) = updateB(sB , xB)
Stuttering element:
- stutter = (absent, absent)