Formal Languages and Logic/Finite state automata