Class LSharpMealy<I,​O>

  • Type Parameters:
    I - input symbol type
    O - output symbol type
    All Implemented Interfaces:
    LearningAlgorithm<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​net.automatalib.word.Word<O>>, LearningAlgorithm.MealyLearner<I,​O>

    public class LSharpMealy<I,​O>
    extends Object
    implements LearningAlgorithm.MealyLearner<I,​O>
    Implementation of the L# algorithm for MealyMachines. The implementation is based on the original implementation of the authors. However, it does not support all features (such as compressed ADSs or some of the more intricate equivalence checks on observation trees).
    • Constructor Detail

      • LSharpMealy

        public LSharpMealy​(net.automatalib.alphabet.Alphabet<I> alphabet,
                           AdaptiveMembershipOracle<I,​O> oracle,
                           Rule2 rule2,
                           Rule3 rule3,
                           @Nullable net.automatalib.word.Word<I> sinkState,
                           O sinkOutput,
                           Random random)
    • Method Detail

      • processCex

        public boolean processCex​(DefaultQuery<I,​net.automatalib.word.Word<O>> cex,
                                  net.automatalib.automaton.transducer.MealyMachine<Integer,​I,​?,​O> mealy)
      • processBinarySearch

        public void processBinarySearch​(net.automatalib.word.Word<I> ceInput,
                                        net.automatalib.word.Word<O> ceOutput,
                                        net.automatalib.automaton.transducer.MealyMachine<Integer,​I,​?,​O> mealy)
      • makeObsTreeAdequate

        public void makeObsTreeAdequate()
      • promoteFrontierState

        public void promoteFrontierState()
      • treeIsAdequate

        public boolean treeIsAdequate()
      • updateFrontierAndBasis

        public void updateFrontierAndBasis()
      • buildHypothesis

        public net.automatalib.automaton.transducer.impl.CompactMealy<I,​O> buildHypothesis()
      • constructHypothesis

        public net.automatalib.automaton.transducer.impl.CompactMealy<I,​O> constructHypothesis()
      • identifyFrontierOrBasis

        public net.automatalib.common.util.Pair<net.automatalib.word.Word<I>,​Boolean> identifyFrontierOrBasis​(net.automatalib.word.Word<I> seq)
      • initObsTree

        public void initObsTree​(@Nullable List<net.automatalib.common.util.Pair<net.automatalib.word.Word<I>,​net.automatalib.word.Word<O>>> logs)
      • checkFrontierConsistency

        public void checkFrontierConsistency()
      • checkConsistency

        public @Nullable DefaultQuery<I,​net.automatalib.word.Word<O>> checkConsistency​(net.automatalib.automaton.transducer.MealyMachine<Integer,​I,​?,​O> mealy)
      • startLearning

        public void startLearning()
        Specified by:
        startLearning in interface LearningAlgorithm<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​net.automatalib.word.Word<O>>
      • refineHypothesis

        public boolean refineHypothesis​(DefaultQuery<I,​net.automatalib.word.Word<O>> ceQuery)
        Specified by:
        refineHypothesis in interface LearningAlgorithm<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​net.automatalib.word.Word<O>>
      • getHypothesisModel

        public net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O> getHypothesisModel()
        Specified by:
        getHypothesisModel in interface LearningAlgorithm<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​net.automatalib.word.Word<O>>