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

automaton.strip

Remove all the decorations from an automaton, i.e., remove state names.

Examples

import vcsn
a = vcsn.B.expression('ab*').automaton() a
Image in a Jupyter notebook

Stripping a plain automaton, or stripping twice, is allowed.

a.strip()
Image in a Jupyter notebook
a.strip().strip()
Image in a Jupyter notebook

Operations like determinize introduce decorations:

a = vcsn.context('lal(ab), b').de_bruijn(1).determinize() a
Image in a Jupyter notebook
a.strip()
Image in a Jupyter notebook
a.type()
'determinized_automaton<mutable_automaton<context<letterset<char_letters>, b>>, vcsn::wet_kind_t::bitset, false>'
a.strip().type()
'mutable_automaton<context<letterset<char_letters>, b>>'

The derived_term of an expression also uses decorations:

a = vcsn.Z.expression('<3>ab*c{3}').derived_term() a
Image in a Jupyter notebook
a.strip()
Image in a Jupyter notebook