Whether the automaton is useless, i.e., whether it has successful computations. Morally, should be equivalent to whether it accepts no words, but see below.
This is equivalent to testing whether the trim part is empty.
Caveat:
See also:
In [1]:
import vcsn
In [2]:
%%automaton a
1 -> 1 a, b
1 -> 2 a
2 -> 2 a, b
This automaton is not empty, but totally useless:
In [3]:
a.is_empty()
Out[3]:
In [4]:
a.is_useless()
Out[4]:
If we trim it, then it is empty (which is why it seems that there is no result):
In [5]:
a.trim()
Out[5]:
In [6]:
a.trim().is_empty()
Out[6]:
On some specific structures, automaton.is_useless
returns false although the automaton accepts no words.
In [7]:
%%automaton a
context = "lal_char, z"
$ -> 0
0 -> 1 a
0 -> 2 <-1>a
1 -> $
2 -> $
In [8]:
a.is_useless()
Out[8]:
In [9]:
a.shortest(10)
Out[9]: