automaton.info(key=None, detailed=False)

A dictionary of facts about an automaton.

Arguments:

  • keys: if specified, return just the corresponding result.
  • detailed: also provide facts costly to compute.

See also:

Examples

In [1]:
import vcsn
a = vcsn.Q.expression('(<1/2>a*+<1/3>b*)*').automaton()
a
Out[1]:
%3 I0 0 0 I0->0 F0 F1 F2 0->F0 ⟨6⟩ 1 1 0->1 ⟨3⟩a 2 2 0->2 ⟨2⟩b 1->F1 ⟨6⟩ 1->1 ⟨4⟩a 1->2 ⟨2⟩b 2->F2 ⟨6⟩ 2->1 ⟨3⟩a 2->2 ⟨3⟩b
In [2]:
a.info()
Out[2]:
{'is codeterministic': False,
 'is complete': True,
 'is deterministic': True,
 'is empty': False,
 'is eps-acyclic': True,
 'is normalized': False,
 'is proper': True,
 'is standard': True,
 'is trim': True,
 'is useless': False,
 'is valid': True,
 'number of accessible states': 3,
 'number of coaccessible states': 3,
 'number of codeterministic states': 1,
 'number of deterministic states': 3,
 'number of final states': 3,
 'number of initial states': 1,
 'number of lazy states': 0,
 'number of spontaneous transitions': 0,
 'number of states': 3,
 'number of transitions': 6,
 'number of useful states': 3,
 'type': 'mutable_automaton<letterset<char_letters(ab)>, q>'}
In [3]:
a.info(detailed=True)
Out[3]:
{'is ambiguous': False,
 'is codeterministic': False,
 'is complete': True,
 'is cycle ambiguous': False,
 'is deterministic': True,
 'is empty': False,
 'is eps-acyclic': True,
 'is normalized': False,
 'is proper': True,
 'is standard': True,
 'is synchronizing': True,
 'is trim': True,
 'is useless': False,
 'is valid': True,
 'number of accessible states': 3,
 'number of coaccessible states': 3,
 'number of codeterministic states': 1,
 'number of deterministic states': 3,
 'number of final states': 3,
 'number of initial states': 1,
 'number of lazy states': 0,
 'number of spontaneous transitions': 0,
 'number of states': 3,
 'number of strongly connected components': 2,
 'number of transitions': 6,
 'number of useful states': 3,
 'type': 'mutable_automaton<letterset<char_letters(ab)>, q>'}
In [4]:
a.info('type')
Out[4]:
'mutable_automaton<letterset<char_letters(ab)>, q>'
In [5]:
a.info('number of states')
Out[5]:
3