Automaton generator