Class MealyDHC<I,​O>

    • Constructor Detail

      • MealyDHC

        public MealyDHC​(Alphabet<I> alphabet,
                        MembershipOracle<I,​Word<O>> oracle)
        Constructor, provided for backwards compatibility reasons.
        Parameters:
        alphabet - the learning alphabet
        oracle - the learning membership oracle
      • MealyDHC

        public MealyDHC​(Alphabet<I> alphabet,
                        MembershipOracle<I,​Word<O>> oracle,
                        GlobalSuffixFinder<? super I,​? super Word<O>> suffixFinder,
                        Collection<? extends Word<I>> initialSplitters)
        Constructor.
        Parameters:
        alphabet - the learning alphabet
        oracle - the learning membership oracle
        suffixFinder - the suffix finder to use for analyzing counterexamples
        initialSplitters - the initial set of splitters, null or an empty collection will result in the set of splitters being initialized as the set of alphabet symbols (interpreted as Words)
    • Method Detail

      • addGlobalSuffixes

        public boolean addGlobalSuffixes​(Collection<? extends Word<I>> newGlobalSuffixes)
        Description copied from interface: GlobalSuffixLearner
        Add the provided suffixes to the collection of global suffixes. As this method is designed to possibly trigger a refinement, it is illegal to invoke it before LearningAlgorithm.startLearning() has been called.

        The implementation may choose to (but is not required to) omit suffixes which are already present (that is, manage the global suffixes as a proper set).

        Specified by:
        addGlobalSuffixes in interface GlobalSuffixLearner<MealyMachine<?,​I,​?,​O>,​I,​Word<O>>
        Parameters:
        newGlobalSuffixes - the global suffixes to add
        Returns:
        true if a refinement was triggered by adding the global suffixes, false otherwise.
      • addSuffixesUnchecked

        protected boolean addSuffixesUnchecked​(Collection<? extends Word<I>> newSuffixes)
      • startLearning

        public void startLearning()
        Description copied from interface: LearningAlgorithm
        Starts the model inference process, creating an initial hypothesis in the provided model object. Please note that it should be illegal to invoke this method twice.
        Specified by:
        startLearning in interface LearningAlgorithm<MealyMachine<?,​I,​?,​O>,​I,​Word<O>>
      • refineHypothesis

        public boolean refineHypothesis​(DefaultQuery<I,​Word<O>> ceQuery)
        Description copied from interface: LearningAlgorithm
        Triggers a refinement of the model by providing a counterexample. A counterexample is a query which exposes different behavior of the real SUL compared to the hypothesis. Please note that invoking this method before an initial invocation of LearningAlgorithm.startLearning() should be illegal.
        Specified by:
        refineHypothesis in interface LearningAlgorithm<MealyMachine<?,​I,​?,​O>,​I,​Word<O>>
        Parameters:
        ceQuery - the query which exposes diverging behavior, as posed to the real SUL (i.e. with the SULs output).
        Returns:
        true if the counterexample triggered a refinement of the hypothesis, false otherwise (i.e., it was no counterexample).
      • resume

        public void resume​(MealyDHCState<I,​O> state)
        Description copied from interface: Resumable
        Resume the datastructure from a previously suspended point in time.
        Specified by:
        resume in interface Resumable<I>
        Parameters:
        state - The learner state.