State Machine

Formal model of states and transitions.