Class ClassicLStarMealy<I,​O>

  • Type Parameters:
    I - input symbol type
    O - output symbol type
    All Implemented Interfaces:
    GlobalSuffixLearner<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O>, LearningAlgorithm<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O>, ObservationTableFeature<I,​O>, OTLearner<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O>, Resumable<AutomatonLStarState<I,​O,​net.automatalib.automaton.transducer.impl.CompactMealy<I,​O>,​Integer>>, net.automatalib.alphabet.SupportsGrowingAlphabet<I>

    public class ClassicLStarMealy<I,​O>
    extends AbstractExtensibleAutomatonLStar<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O,​Integer,​net.automatalib.automaton.impl.CompactTransition<O>,​Void,​O,​net.automatalib.automaton.transducer.impl.CompactMealy<I,​O>>
    An implementation of the L*Mealy algorithm for inferring Mealy machines, as described by Oliver Niese in his Ph.D. thesis.
    • Constructor Detail

      • ClassicLStarMealy

        public ClassicLStarMealy​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                 MembershipOracle<I,​O> oracle)
        Constructor.
        Parameters:
        alphabet - the learning alphabet
        oracle - the (Mealy) oracle
      • ClassicLStarMealy

        public ClassicLStarMealy​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                 MembershipOracle<I,​O> oracle,
                                 ObservationTableCEXHandler<? super I,​? super O> cexHandler,
                                 ClosingStrategy<? super I,​? super O> closingStrategy)
        Constructor.
        Parameters:
        alphabet - the learning alphabet
        oracle - the (Mealy) oracle
        cexHandler - the counterexample handler
        closingStrategy - the closing strategy
    • Method Detail

      • getHypothesisModel

        public net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O> getHypothesisModel()
        Description copied from interface: LearningAlgorithm
        Returns the current hypothesis model.

        N.B.: By the contract of this interface, the model returned by this method should not be modified by external code (i.e., M generally should refer to an immutable interface), and its validity is retained only until the next invocation of LearningAlgorithm.refineHypothesis(DefaultQuery). If older hypotheses have to be maintained, a copy of the returned model must be made.

        Please note that it should be illegal to invoke this method before an initial invocation of LearningAlgorithm.startLearning().

        Returns:
        the current hypothesis model.
      • stateProperty

        protected Void stateProperty​(ObservationTable<I,​O> table,
                                     Row<I> stateRow)
        Description copied from class: AbstractAutomatonLStar
        Derives a state property from the corresponding row.
        Specified by:
        stateProperty in class AbstractAutomatonLStar<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O,​Integer,​net.automatalib.automaton.impl.CompactTransition<O>,​Void,​O,​net.automatalib.automaton.transducer.impl.CompactMealy<I,​O>>
        Parameters:
        table - the current observation table
        stateRow - the row for which the state is created
        Returns:
        the state property of the corresponding state
      • transitionProperty

        protected O transitionProperty​(ObservationTable<I,​O> table,
                                       Row<I> stateRow,
                                       int inputIdx)
        Description copied from class: AbstractAutomatonLStar
        Derives a transition property from the corresponding transition.

        Note that not the transition row is passed to this method, but the row for the outgoing state. The transition row can be retrieved using Row.getSuccessor(int).

        Specified by:
        transitionProperty in class AbstractAutomatonLStar<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O,​Integer,​net.automatalib.automaton.impl.CompactTransition<O>,​Void,​O,​net.automatalib.automaton.transducer.impl.CompactMealy<I,​O>>
        Parameters:
        table - the observation table
        stateRow - the row for the source state
        inputIdx - the index of the input symbol to consider
        Returns:
        the transition property of the corresponding transition
      • addAlphabetSymbol

        public void addAlphabetSymbol​(I symbol)
        Specified by:
        addAlphabetSymbol in interface net.automatalib.alphabet.SupportsGrowingAlphabet<I>
        Overrides:
        addAlphabetSymbol in class AbstractAutomatonLStar<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O,​Integer,​net.automatalib.automaton.impl.CompactTransition<O>,​Void,​O,​net.automatalib.automaton.transducer.impl.CompactMealy<I,​O>>
      • hypothesisOutput

        protected net.automatalib.automaton.concept.SuffixOutput<I,​O> hypothesisOutput()
        Specified by:
        hypothesisOutput in class AbstractLStar<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​O>