Introduction to Automata Theory, Languages, and Computation (2nd Edition)