Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45903
Kernel: Python 3

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.

import vcsn import sys q = vcsn.context('lal_char(abc), q')

Basic expressions

exp = q.expression('(<1/6>a*+<1/3>b*)*') exp.inductive('standard')
Image in a Jupyter notebook
exp.standard()
Image in a Jupyter notebook

Extended expressions

ext_exp = q.expression('[ab]*a[ab]{2} & [ab]*a[ac]{4}') ext_exp.inductive('standard')
Image in a Jupyter notebook
try: ext_exp.standard() except RuntimeError as e: print(e, file=sys.stderr)
standard: operator conjunction not supported: (a+b)*a(a+b){2}&(a+b)*a(a+c){4} while computing standard automaton of: (a+b)*a(a+b){2}&(a+b)*a(a+c){4}