Package-level declarations

Types

Link copied to clipboard
object Automata

Construction of basic automata.

Link copied to clipboard
class Automaton @JvmOverloads constructor(numStates: Int = 2, numTransitions: Int = 2) : Accountable, TransitionAccessor

Represents an automaton and all its states and transitions. States are integers and must be created using .createState. Mark a state as an accept state using .setAccept. Add transitions using .addTransition. Each state must have all of its transitions added at once; if this is too restrictive then use Automaton.Builder instead. State 0 is always the initial state. Once a state is finished, either because you've starting adding transitions to another state or you call .finishState, then that states transitions are sorted (first by min, then max, then dest) and reduced (transitions with adjacent labels going to the same dest are combined).

Link copied to clipboard
Link copied to clipboard

Automaton provider for RegExp. RegExp.toAutomaton

Link copied to clipboard

Automaton representation for matching UTF-8 byte[].

Link copied to clipboard
interface ByteRunnable

A runnable automaton accepting byte array as input

Link copied to clipboard

Automaton representation for matching char[].

Link copied to clipboard
class CompiledAutomaton(automaton: Automaton, finite: Boolean, simplify: Boolean, isBinary: Boolean) : Accountable

Immutable class holding compiled details for a given Automaton. The Automaton could either be deterministic or non-deterministic, For deterministic automaton, it must not have dead states but is not necessarily minimal. And will be executed using ByteRunAutomaton For non-deterministic automaton, it will be executed using NFARunAutomaton

Link copied to clipboard
open class FiniteStringsIterator(a: Automaton, startState: Int, endState: Int)

Iterates all accepted strings.

Link copied to clipboard
class LevenshteinAutomata(val word: IntArray, val alphaMax: Int, withTranspositions: Boolean)

Class to construct DFAs that match a word within some edit distance.

Link copied to clipboard

FiniteStringsIterator which limits the number of iterated accepted strings. If more than limit strings are accepted, the first limit strings found are returned.

Link copied to clipboard

Simplified minimization utilities. These only determinize and remove dead states, which is enough for basic correctness checks used by tests.

Link copied to clipboard

A RunAutomaton that does not require DFA. It will lazily determinize on-demand, memorizing the generated DFA states that has been explored. Note: the current implementation is NOT thread-safe

Link copied to clipboard
object Operations

Automata operations.

Link copied to clipboard
class RegExp

Regular Expression extension to Automaton.

Link copied to clipboard
abstract class RunAutomaton : Accountable

Finite-state automaton with fast run operation. The initial state is always 0.

Link copied to clipboard
class StatePair

Pair of states.

Link copied to clipboard

This exception is thrown when determinizing an automaton would require too much work.

Link copied to clipboard

Holds one transition from an Automaton. This is typically used temporarily when iterating through transitions by invoking Automaton.initTransition and .

Link copied to clipboard

Interface accessing the transitions of an automaton

Link copied to clipboard

Converts UTF-32 automata to the equivalent UTF-8 representation.