repeat

Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton. Never modifies the input automaton language.

Complexity: linear in number of states.


fun repeat(a: Automaton, count: Int): Automaton

Returns an automaton that accepts min or more concatenated repetitions of the language of the given automaton.

Complexity: linear in number of states and in min.


fun repeat(a: Automaton, min: Int, max: Int): Automaton

Returns an automaton that accepts between min and max (including both) concatenated repetitions of the language of the given automaton.

Complexity: linear in number of states and in min and max.