Class AbstractTTTHypothesis<S extends TTTState<I,​D>,​I,​D,​T>

  • Type Parameters:
    S - state class type
    I - input symbol type
    D - output domain type
    T - transition type
    All Implemented Interfaces:
    Iterable<S>, net.automatalib.alphabet.SupportsGrowingAlphabet<I>, net.automatalib.automaton.Automaton<S,​I,​T>, net.automatalib.automaton.concept.FiniteRepresentation, net.automatalib.automaton.concept.InputAlphabetHolder<I>, net.automatalib.automaton.concept.StateIDs<S>, net.automatalib.automaton.DeterministicAutomaton<S,​I,​T>, net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T>, net.automatalib.automaton.DeterministicAutomaton.IntAbstraction<T>, net.automatalib.automaton.FiniteAlphabetAutomaton<S,​I,​T>, net.automatalib.automaton.simple.SimpleAutomaton<S,​I>, net.automatalib.automaton.simple.SimpleDeterministicAutomaton<S,​I>, net.automatalib.automaton.simple.SimpleDeterministicAutomaton.FullIntAbstraction, net.automatalib.automaton.simple.SimpleDeterministicAutomaton.IntAbstraction, net.automatalib.graph.concept.GraphViewable, net.automatalib.ts.DeterministicTransitionSystem<S,​I,​T>, net.automatalib.ts.simple.SimpleDTS<S,​I>, net.automatalib.ts.simple.SimpleTS<S,​I>, net.automatalib.ts.TransitionSystem<S,​I,​T>
    Direct Known Subclasses:
    TTTHypothesisDFA, TTTHypothesisMealy, TTTHypothesisMoore

    public abstract class AbstractTTTHypothesis<S extends TTTState<I,​D>,​I,​D,​T>
    extends Object
    implements net.automatalib.automaton.DeterministicAutomaton<S,​I,​T>, net.automatalib.automaton.FiniteAlphabetAutomaton<S,​I,​T>, net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T>, net.automatalib.automaton.concept.StateIDs<S>, net.automatalib.alphabet.SupportsGrowingAlphabet<I>
    Hypothesis DFA for the TTT algorithm.
    • Constructor Detail

      • AbstractTTTHypothesis

        public AbstractTTTHypothesis​(net.automatalib.alphabet.Alphabet<I> alphabet)
        Constructor.
        Parameters:
        alphabet - the input alphabet
    • Method Detail

      • getInitialState

        public S getInitialState()
        Specified by:
        getInitialState in interface net.automatalib.ts.simple.SimpleDTS<S extends TTTState<I,​D>,​I>
      • getTransition

        public T getTransition​(int stateId,
                               int symIdx)
        Specified by:
        getTransition in interface net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<S extends TTTState<I,​D>>
      • getTransition

        public @Nullable T getTransition​(S state,
                                         I input)
        Specified by:
        getTransition in interface net.automatalib.ts.DeterministicTransitionSystem<S extends TTTState<I,​D>,​I,​D>
      • getInternalTransition

        public TTTTransition<I,​D> getInternalTransition​(TTTState<I,​D> state,
                                                              I input)
        Retrieves the internal transition (i.e., the TTTTransition object) for a given state and input. This method is required since the DFA interface requires the return value of getTransition(TTTState, Object) to refer to the successor state directly.
        Parameters:
        state - the source state
        input - the input symbol triggering the transition
        Returns:
        the transition object
      • mapTransition

        protected abstract T mapTransition​(TTTTransition<I,​D> internalTransition)
      • initialize

        public S initialize()
        Initializes the automaton, adding an initial state. Whether the initial state is accepting needs to be known at this point.
        Returns:
        the initial state of this newly initialized automaton
      • isInitialized

        public boolean isInitialized()
        Checks whether this automaton was initialized (i.e., initialize() has been called).
        Returns:
        true if this automaton was initialized, false otherwise.
      • newState

        protected abstract S newState​(int alphabetSize,
                                      TTTTransition<I,​D> parent,
                                      int id)
      • getInputAlphabet

        public net.automatalib.alphabet.Alphabet<I> getInputAlphabet()
        Specified by:
        getInputAlphabet in interface net.automatalib.automaton.concept.InputAlphabetHolder<S extends TTTState<I,​D>>
      • graphView

        public AbstractTTTHypothesis.GraphView graphView()
        Specified by:
        graphView in interface net.automatalib.automaton.FiniteAlphabetAutomaton<S extends TTTState<I,​D>,​I,​D>
        Specified by:
        graphView in interface net.automatalib.graph.concept.GraphViewable
      • getIntInitialState

        public int getIntInitialState()
        Specified by:
        getIntInitialState in interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton.IntAbstraction
      • numInputs

        public int numInputs()
        Specified by:
        numInputs in interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton.FullIntAbstraction
      • getIntSuccessor

        public int getIntSuccessor​(T trans)
        Specified by:
        getIntSuccessor in interface net.automatalib.automaton.DeterministicAutomaton.IntAbstraction<S extends TTTState<I,​D>>
      • fullIntAbstraction

        public net.automatalib.automaton.DeterministicAutomaton.FullIntAbstraction<T> fullIntAbstraction​(net.automatalib.alphabet.Alphabet<I> alphabet)
        Specified by:
        fullIntAbstraction in interface net.automatalib.automaton.DeterministicAutomaton<S extends TTTState<I,​D>,​I,​D>
        Specified by:
        fullIntAbstraction in interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton<S extends TTTState<I,​D>,​I>
      • addAlphabetSymbol

        public void addAlphabetSymbol​(I symbol)
        Specified by:
        addAlphabetSymbol in interface net.automatalib.alphabet.SupportsGrowingAlphabet<S extends TTTState<I,​D>>
      • getStates

        public Collection<S> getStates()
        Specified by:
        getStates in interface net.automatalib.automaton.simple.SimpleAutomaton<S extends TTTState<I,​D>,​I>
      • size

        public int size()
        Specified by:
        size in interface net.automatalib.automaton.concept.FiniteRepresentation
        Specified by:
        size in interface net.automatalib.automaton.simple.SimpleAutomaton<S extends TTTState<I,​D>,​I>
      • getStateId

        public int getStateId​(S state)
        Specified by:
        getStateId in interface net.automatalib.automaton.concept.StateIDs<S extends TTTState<I,​D>>
      • getState

        public S getState​(int id)
        Specified by:
        getState in interface net.automatalib.automaton.concept.StateIDs<S extends TTTState<I,​D>>
      • stateIDs

        public net.automatalib.automaton.concept.StateIDs<S> stateIDs()
        Specified by:
        stateIDs in interface net.automatalib.automaton.simple.SimpleAutomaton<S extends TTTState<I,​D>,​I>