Class Automaton

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Automaton
    extends Object
    implements Serializable, Cloneable
    Finite-state automaton with regular expression operations.

    Class invariants:

    • An automaton is either represented explicitly (with State and Transition objects) or with a singleton string (see getSingleton() and expandSingleton()) in case the automaton is known to accept exactly one string. (Implicitly, all states and transitions of an automaton are reachable from its initial state.)
    • Automata are always reduced (see reduce()) and have no transitions to dead states (see removeDeadTransitions()).
    • If an automaton is nondeterministic, then isDeterministic() returns false (but the converse is not required).
    • Automata provided as input to operations are generally assumed to be disjoint.

    If the states or transitions are manipulated manually, the restoreInvariant() and setDeterministic(boolean) methods should be used afterwards to restore representation invariants that are assumed by the built-in automata operations.

    Anders Møller <>
    See Also:
    Serialized Form