Whether all its states are useful, i.e., accessible and coaccessible.
Preconditions:
Postconditions:
See also:
import vcsn
The following automaton has useless states: 2 is not accessible, and 3 is not coaccessible.
%%automaton a
context = "lal_char(abc), b"
$ -> 0
0 -> 1 a
1 -> $
2 -> 0 a
1 -> 3 a
a.is_trim()
Calling trim
returns the same automaton, but without any useless states:
a.trim()
a.trim().is_trim()
a.accessible()
a.accessible().is_trim()
a.coaccessible()
a.coaccessible().is_trim()