Class AbstractDFAPassiveLearnerIT


  • public abstract class AbstractDFAPassiveLearnerIT
    extends Object
    Abstract integration test for passive DFA learning algorithms.

    If run, this integration test tests the functionality of all variants of a DFA learning algorithm against all the examples contained in LearningExamples.createDFAExamples().

    Subclasses can perform further sample filtering by overriding the generateSamplesInternal(Alphabet, DFA) method, e.g. if the learning algorithm is only capable of learning from positive examples.

    • Constructor Detail

      • AbstractDFAPassiveLearnerIT

        public AbstractDFAPassiveLearnerIT()
    • Method Detail

      • createExampleITCases

        @Factory
        public Object[] createExampleITCases()
      • generateSamplesInternal

        protected <I> Collection<DefaultQuery<I,​Boolean>> generateSamplesInternal​(Alphabet<I> alphabet,
                                                                                        DFA<?,​I> reference)
        Utility method, that may be overriden by subclasses.
        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet of the target system
        reference - the reference system from which samples will be drawn
        Returns:
        the collection of generated queries used for learning
      • addLearnerVariants

        protected abstract <I> void addLearnerVariants​(Alphabet<I> alphabet,
                                                       PassiveLearnerVariantList<DFA<?,​I>,​I,​Boolean> variants)
        Adds, for a given setup, all the variants of the DFA learner to be tested to the specified variant list.
        Parameters:
        alphabet - the input alphabet
        variants - list to add the learner variants to