http://en.wikipedia.org/wiki/Automata-based_programming