public abstract class AbstractDTLearner<M extends net.automatalib.automata.concepts.SuffixOutput<I,D>,I,D,SP,TP> extends Object implements LearningAlgorithm<M,I,D>, SupportsGrowingAlphabet<I>, ResumableLearner<DTLearnerState<I,D,SP,TP>>
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDTLearner.BuilderDefaults |
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>
Modifier and Type | Field and Description |
---|---|
protected net.automatalib.words.Alphabet<I> |
alphabet |
protected AbstractWordBasedDiscriminationTree<I,D,HState<I,D,SP,TP>> |
dtree |
protected DTLearnerHypothesis<I,D,SP,TP> |
hypothesis |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDTLearner(net.automatalib.words.Alphabet<I> alphabet,
MembershipOracle<I,D> oracle,
LocalSuffixFinder<? super I,? super D> suffixFinder,
boolean repeatedCounterexampleEvaluation,
AbstractWordBasedDiscriminationTree<I,D,HState<I,D,SP,TP>> dtree) |
Modifier and Type | Method and Description |
---|---|
void |
addAlphabetSymbol(I symbol) |
protected HState<I,D,SP,TP> |
createState(HTransition<I,D,SP,TP> trans) |
AbstractWordBasedDiscriminationTree<I,D,HState<I,D,SP,TP>> |
getDiscriminationTree() |
DTLearnerHypothesis<I,D,SP,TP> |
getHypothesisDS() |
protected void |
initializeState(HState<I,D,SP,TP> newState) |
boolean |
refineHypothesis(DefaultQuery<I,D> ceQuery)
Triggers a refinement of the model by providing a counterexample.
|
protected boolean |
refineHypothesisSingle(DefaultQuery<I,D> ceQuery) |
void |
resume(DTLearnerState<I,D,SP,TP> state)
Does not get the learner to continue learning.
|
protected abstract Query<I,D> |
spQuery(HState<I,D,SP,TP> state) |
void |
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided model object.
|
DTLearnerState<I,D,SP,TP> |
suspend()
Expose the serializable learner state object.
|
protected abstract Query<I,D> |
tpQuery(HTransition<I,D,SP,TP> transition) |
protected void |
updateHypothesis() |
protected void |
updateTransition(HTransition<I,D,SP,TP> trans) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHypothesisModel
protected net.automatalib.words.Alphabet<I> alphabet
protected DTLearnerHypothesis<I,D,SP,TP> hypothesis
protected AbstractDTLearner(net.automatalib.words.Alphabet<I> alphabet, MembershipOracle<I,D> oracle, LocalSuffixFinder<? super I,? super D> suffixFinder, boolean repeatedCounterexampleEvaluation, AbstractWordBasedDiscriminationTree<I,D,HState<I,D,SP,TP>> dtree)
public void startLearning()
LearningAlgorithm
startLearning
in interface LearningAlgorithm<M extends net.automatalib.automata.concepts.SuffixOutput<I,D>,I,D>
public boolean refineHypothesis(DefaultQuery<I,D> ceQuery)
LearningAlgorithm
LearningAlgorithm.startLearning()
should be illegal.refineHypothesis
in interface LearningAlgorithm<M extends net.automatalib.automata.concepts.SuffixOutput<I,D>,I,D>
ceQuery
- the query which exposes diverging behavior, as posed to the real SUL (i.e. with the SULs output).protected boolean refineHypothesisSingle(DefaultQuery<I,D> ceQuery)
protected void updateHypothesis()
protected void updateTransition(HTransition<I,D,SP,TP> trans)
public AbstractWordBasedDiscriminationTree<I,D,HState<I,D,SP,TP>> getDiscriminationTree()
public DTLearnerHypothesis<I,D,SP,TP> getHypothesisDS()
public void addAlphabetSymbol(I symbol)
addAlphabetSymbol
in interface SupportsGrowingAlphabet<I>
public DTLearnerState<I,D,SP,TP> suspend()
ResumableLearner
Does not stop a running learning process. Since most data structures that are used during learning are mutable, use this method inside of a learning loop with care.
suspend
in interface ResumableLearner<DTLearnerState<I,D,SP,TP>>
public void resume(DTLearnerState<I,D,SP,TP> state)
ResumableLearner
resume
in interface ResumableLearner<DTLearnerState<I,D,SP,TP>>
state
- The learner state.Copyright © 2018. All rights reserved.