Name a state only if it does not already have one.
Code for extracting transition information from an automaton.