expression.inductive(algo="auto")

Generate an automaton inductively from an expression.

The algo might be:

  • "auto": same as "standard".
  • "standard" generate a standard automaton.

Postconditions:

  • "standard"
    • Result is standard
    • If the expression is basic, Result is isomorphic to e.standard().

See also:

Examples

Standard

Contrary to expression.standard, inductive supports the extended expressions.

In [1]:
import vcsn
q = vcsn.context('lal_char(abc), q')
In [2]:
q.expression('(<1/6>a*+<1/3>b*)*').inductive('standard')
Out[2]:
%3 I0 0 0 I0->0 F0 F1 F2 0->F0 ⟨2⟩ 1 1 0->1 ⟨1/3⟩a 2 2 0->2 ⟨2/3⟩b 1->F1 ⟨2⟩ 1->1 ⟨4/3⟩a 1->2 ⟨2/3⟩b 2->F2 ⟨2⟩ 2->1 ⟨1/3⟩a 2->2 ⟨5/3⟩b
In [3]:
q.expression('[ab]*a[ab]{2} & [ab]*a[ac]{4}').inductive('standard')
Out[3]:
%3 I0 0 0 I0->0 F7 1 1 0->1 a 2 2 0->2 a 3 3 0->3 b 1->1 a 1->2 a 1->3 b 4 4 2->4 a 3->1 a 3->2 a 3->3 b 5 5 4->5 a 6 6 5->6 a 7 7 6->7 a 7->F7