Modeling State Transitions with Automata