FAdo.semigroup
Syntactic SemiGroup.
Deterministic and non-deterministic automata manipulation, conversion and evaluation.
-
class SSemiGroup[source]
Class support for the Syntactic SemiGroup.
- Variables:
elements – list of tuples representing the transformations
words – a list of pairs (index of the prefix transformation, index of the suffix char)
gen – a list of the max index of each generation
Sigma – set of symbols
-
WordI(i) → str[source]
Representative of an element given as index
- Parameters:
i (int) – index of the element
- Returns:
the first word originating the element
- Return type:
str
-
WordPS(pref, sym)[source]
Representative of an element given as prefix symb
- Parameters:
-
- Returns:
word
- Return type:
str
-
add(tr, pref, sym, tmplists)[source]
Try to add a new transformation to the monoid
- Parameters:
tr (tuple of int) – transformation
pref (int or None) – prefix of the generating word
sym (int) – suffix symbol
tmplists (pairs of lists as (elements,words)) – this generation lists
-
addGen(tmplist) → None[source]
Add a new generation to the monoid
- Parameters:
tmplist (pair of lists as (elements, words)) – the new generation data