In [1]:
import vcsn
The following automaton has states that cannot be reach any final(s) states:
In [2]:
%%automaton a
context = "lal_char(abc), b"
$ -> 0
0 -> 1 a
1 -> $
2 -> 0 a
1 -> 3 a
In [3]:
a.is_coaccessible()
Out[3]:
Calling coaccessible
returns the same automaton, but without its non-coaccessible states:
In [4]:
a.coaccessible()
Out[4]:
In [5]:
a.coaccessible().is_coaccessible()
Out[5]: