automaton.is_empty

Whether the automaton is empty, i.e., it has no states.

See also:

Examples


In [1]:
import vcsn



In [2]:
%%automaton a daut
context = "lal_char, b"
0


%3 0 0

This automaton is useless (it accepts the empty language), yet it is not empty.


In [3]:
a.is_empty()


Out[3]:
False

If we trim it, then it is empty (which is why it seems that there is no result):


In [4]:
a.trim()


Out[4]:
%3

In [5]:
a.trim().is_empty()


Out[5]:
True