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

automaton.accessible

Create a new automaton from the accessible part of the input, i.e., the subautomaton whose states can be reached from an initial state.

Preconditions:

  • None

Postconditions:

  • Result.is_accessible()

See also:

Examples

import vcsn

The following automaton has one unreachable state:

%%automaton a context = "lal_char(abc), b" $ -> 0 0 -> 1 a 1 -> $ 2 -> 0 a 1 -> 3 a
Image in a Jupyter notebook
a.is_accessible()
False

Calling accessible returns a copy of the automaton without non-accessible states:

a.accessible()
Image in a Jupyter notebook
a.accessible().is_accessible()
True