State Transition Diagram
When the number of states is finite (and reasonably small), the state machine can be described by a very readable diagram. Create one bubble for each state, one arc for each transition:
state ∈
States
guard1 ⊂
Inputs
guard2 ⊂
Inputs
output1 ∈
Outputs
output2 ∈
Outputs
else = {x ∈ Inputs | x ∉ guard1 ∪ guard2 }
The else arc can be implicit if
- it is a self loop
- it produces the stuttering output (absent)