Added emptiness check and counter-example finding to automata