Interface

KnuthBendix.Automata.traceFunction
trace(label, A::Automaton, σ)

Return τ if (σ, label, τ) is in A, otherwise return nothing.

source
trace(w::AbstractVector, A::Automaton[, σ=initial(A)])

Return a pair (l, τ), where

  • l is the length of the longest prefix of w which defines a path starting

at σ in A and

  • τ is the last state (node) on the path.
Note

If w defines a path to a fail state the last non-fail state will be

returned.

source

Proving finiteness

KnuthBendix.Automata.infiniteness_certificateFunction
infiniteness_certificate(ia::IndexAutomaton)

Find a family of irreducible words of unbounded length if it exists.

Returns a witness w of the infiniteness, i.e.

    [w.prefix * w.suffix^n for n in ℕ]

is an infinite family of words irreducible with respect to ia.

Conversly if w.suffix is the trivial word no such infinite family exists and therefore the there are only finitely many irreducible words for ia.

source
Base.isfiniteMethod
isfinite(ia::Automaton)

Return true if the language of the automaton is proven to be finite.

source
KnuthBendix.Automata.irreducible_wordsFunction
irreducible_words(a::Automaton[, min_length=0, max_length=typemax(UInt)])

All words from the language of a, of length between min_length and max_length.

The words are returned form depth-first search, and hence are not ordered lexicographically.

source