customized formula* to sort by formula string
added automaton, where states are formulas and edges are worlds