AutomatonTestUtil

Types

Link copied to clipboard

Lets you retrieve random strings accepted by an Automaton.

Properties

Link copied to clipboard

Default maximum number of states that {@link Operations#determinize} should create.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun assertMatches(a: Automaton, vararg strings: String)
Link copied to clipboard
Link copied to clipboard

Checks that an automaton has no detached states that are unreachable from the initial state.

Link copied to clipboard

Simple, original brics implementation of determinize()

Simple, original brics implementation of determinize() Determinizes the given automaton using the given set of initial states.

Link copied to clipboard
fun getFiniteStrings(a: Automaton, s: Int, pathstates: MutableSet<Int>, strings: MutableSet<IntsRef>, path: IntsRefBuilder, limit: Int): Boolean

Returns the strings that can be produced from the given state, or false if more than limit strings are found. limit<0 means "infinite".

Link copied to clipboard

Simple, original implementation of getFiniteStrings.

Link copied to clipboard

Returns true if the automaton is deterministic.

Link copied to clipboard
Link copied to clipboard

Simple, original brics implementation of Brzozowski minimize()

Link copied to clipboard

return a random NFA/DFA for testing

Link copied to clipboard

Returns random string, including full unicode range.

Link copied to clipboard
fun reverseOriginal(a: Automaton, initialStates: MutableSet<Int>?): Automaton

Original brics implementation of reverse(). It tries to satisfy multiple use-cases by populating a set of initial states too.

Link copied to clipboard

Returns true if these two automata accept exactly the same language. This is a costly computation! Both automata must be determinized and have no dead states!

Link copied to clipboard

Returns true if the language of a1 is a subset of the language of a2. Both automata must be determinized and must have no dead states.