mutable_automaton: normalize
We should explore the possibility of building denormalized automata, i.e., relax the constraint that there should never be two transitions (s, l, d)
(same states and label). This makes add_transition
extremely costly compared to new_transition
.
However in some cases, e.g., compose
, we would like to accept temporarily "denormalized" automata, which would allow to use only the fast new_transition
. Then normalizing a state would ensure that there are no such repeated transitions.
Another possibility is to completely relax this constraint, and allow our automata to have such repeated transitions. It used to be the case in Vaucanson 1, and Jacques decided that it should not be possible in Vaucanson 2; but I don't know why exactly. Maybe we should reconsider this decision. BTW, OpenFST does create such repeated transitions when, for instance, compose two automata.