Module de.learnlib.algorithm.lambda
Package de.learnlib.algorithm.lambda.ttt
Class AbstractTTTLambda<M extends net.automatalib.automaton.concept.SuffixOutput<I,D>,I,D>
- java.lang.Object
-
- de.learnlib.algorithm.lambda.ttt.AbstractTTTLambda<M,I,D>
-
- All Implemented Interfaces:
LearningAlgorithm<M,I,D>
,net.automatalib.alphabet.SupportsGrowingAlphabet<I>
,net.automatalib.automaton.concept.FiniteRepresentation
- Direct Known Subclasses:
TTTLambdaDFA
,TTTLambdaMealy
public abstract class AbstractTTTLambda<M extends net.automatalib.automaton.concept.SuffixOutput<I,D>,I,D> extends Object implements LearningAlgorithm<M,I,D>, net.automatalib.alphabet.SupportsGrowingAlphabet<I>, net.automatalib.automaton.concept.FiniteRepresentation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.learnlib.algorithm.LearningAlgorithm
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>, LearningAlgorithm.MooreLearner<I,O>, LearningAlgorithm.NFALearner<I>
-
-
Field Summary
Fields Modifier and Type Field Description protected PrefixTree<I,D>
ptree
protected SuffixTrie<I>
strie
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractTTTLambda(net.automatalib.alphabet.Alphabet<I> alphabet, MembershipOracle<I,D> ceqs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAlphabetSymbol(I symbol)
protected abstract AbstractDecisionTree<I,D>
dtree()
protected abstract DTLeaf<I,D>
getState(net.automatalib.word.Word<I> prefix)
protected abstract int
maxSearchIndex(int ceLength)
boolean
refineHypothesis(DefaultQuery<I,D> counterexample)
Triggers a refinement of the model by providing a counterexample.void
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided model object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.learnlib.algorithm.LearningAlgorithm
getHypothesisModel
-
-
-
-
Field Detail
-
strie
protected final SuffixTrie<I> strie
-
ptree
protected final PrefixTree<I,D> ptree
-
-
Constructor Detail
-
AbstractTTTLambda
protected AbstractTTTLambda(net.automatalib.alphabet.Alphabet<I> alphabet, MembershipOracle<I,D> ceqs)
-
-
Method Detail
-
maxSearchIndex
protected abstract int maxSearchIndex(int ceLength)
-
dtree
protected abstract AbstractDecisionTree<I,D> dtree()
-
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 interfaceLearningAlgorithm<M extends net.automatalib.automaton.concept.SuffixOutput<I,D>,I,D>
-
refineHypothesis
public boolean refineHypothesis(DefaultQuery<I,D> counterexample)
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 ofLearningAlgorithm.startLearning()
should be illegal.- Specified by:
refineHypothesis
in interfaceLearningAlgorithm<M extends net.automatalib.automaton.concept.SuffixOutput<I,D>,I,D>
- Parameters:
counterexample
- 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).
-
-