automaton.insplit(lazy=False)

Create the insplit automaton from the input.

In the insplit automaton, each state has either only spontaneous transitions, or no spontaneous transition at all. The input states are split to respect that condition, and the result automaton is equivalent to the input one.

Insplitting is used as a preprocessing in the conjunction of automata and the composition of transducers.

Insplitting can also be run on-the-fly, with an optional lazy argument.

Precondition:

  • the labelset has one (label of spontaneous transitions)

See also:

References:

Examples

In [1]:
import vcsn
In [2]:
%%automaton -s a
context = lan_char, b
$ -> 0
0 -> 1 a, \e
1 -> 2 b
1 -> $
2 -> $
%3 I0 0 0 I0->0 F1 F2 1 1 0->1 ε, a 1->F1 2 2 1->2 b 2->F2

State 1 has both incoming spontaneous and proper transitions.

In [3]:
a.insplit()
Out[3]:
%3 I0 0 0, !ε I0->0 F1 F2 F3 1 1, ε 0->1 ε 2 1, !ε 0->2 a 1->F1 3 2, !ε 1->3 b 2->F2 2->3 b 3->F3

During lazy insplitting, the states are not resolved, but they will be as needed.

In [4]:
i = a.insplit(lazy=True)
i
Out[4]:
%3 I0 0 0, !ε I0->0
In [5]:
%%automaton b
context = lan_char, b
$ -> 0
0 -> 1 a
1 -> $
%3 I0 0 0 I0->0 F1 1 1 0->1 a 1->F1
In [6]:
i & b
Out[6]:
%3 I0 0 (0, !ε), (0, !ε) I0->0 F1 1 (1, !ε), (1, !ε) 0->1 a 2 (1, ε), (0, !ε) 0->2 ε 1->F1

The state $2, !\varepsilon$ is not resolved yet.

In [7]:
i
Out[7]:
%3 I0 0 0, !ε I0->0 F1 F2 1 1, ε 0->1 ε 2 1, !ε 0->2 a 1->F1 3 2, !ε 1->3 b 2->F2 2->3 b