automaton.is_realtime

Check whether the automaton is realtime, i.e. it has only letter transitions (as viewed the labelset), so no words or spontaneous transitions.

It is equivalent to being both is_letterized and is_proper.

See also:

Examples

In [1]:
import vcsn
ctx = vcsn.context("law_char, b")
In [2]:
a1 = ctx.expression("abc").standard()
a1
Out[2]:
%3 I0 0 0 I0->0 F1 1 1 0->1 abc 1->F1
In [3]:
a1.is_realtime()
Out[3]:
False

Here, a1 has a word transition, so it is not letterized.

In [4]:
a2 = ctx.expression("a*+b(c+d)").thompson()
a2
Out[4]:
%3 I0 0 0 I0->0 F1 4 4 0->4 ε 6 6 0->6 ε 1 1 1->F1 2 2 3 3 2->3 a 3->2 ε 5 5 3->5 ε 4->2 ε 4->5 ε 5->1 ε 7 7 6->7 b 8 8 7->8 ε 10 10 8->10 ε 12 12 8->12 ε 9 9 9->1 ε 11 11 10->11 c 11->9 ε 13 13 12->13 d 13->9 ε
In [5]:
a2.is_realtime()
Out[5]:
False

Here, a2 has spontaneous transitions, so it is not proper.

In [6]:
a3 = ctx.expression("a*+b(c+d)").standard()
a3
Out[6]:
%3 I0 0 0 I0->0 F0 F1 F5 F7 0->F0 1 1 0->1 a 3 3 0->3 b 1->F1 1->1 a 5 5 3->5 c 7 7 3->7 d 5->F5 7->F7
In [7]:
a3.is_realtime()
Out[7]:
True