CompiledAutomaton
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
Constructors
Create this, passing simplify=true, so that we try to simplify the automaton.
Create this. If simplify is true, we run possibly expensive operations to determine if the automaton is one the cases in AUTOMATON_TYPE. Set finite to true if the automaton is finite, otherwise set to false if infinite or you don't know.
Types
Properties
Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
Shared common suffix accepted by the automaton. Only valid for AUTOMATON_TYPE.NORMAL, and only when the automaton accepts an infinite language. This will be null if the common prefix is length 0.
Matcher directly run on a NFA, it will determinize the state on need and caches it, note that this field and .runAutomaton will not be non-null at the same time
For AUTOMATON_TYPE.SINGLE this is the singleton term.
If simplify is true this will be the "simplified" type; else, this is NORMAL
Functions
Finds largest term accepted by this Automaton, that's <= the provided input term. The result is placed in output; it's fine for output and input to point to the same bytes. The returned result is either the provided output, or null if there is no floor term (ie, the provided input term is before the first term accepted by this Automaton).
Get a ByteRunnable instance, it will be different depending on whether a NFA or DFA is passed in, and does not guarantee returning non-null object
Get a TransitionAccessor instance, it will be different depending on whether a NFA or DFA is passed in, and does not guarantee returning non-null object
Return the memory usage of this object in bytes. Negative values are illegal.
Report back to a QueryVisitor how this automaton matches terms