computing SCC for automaton, will check in test case later.