Package de.learnlib.algorithm.ttt.moore
Class TTTLearnerMoore<I,O>
- java.lang.Object
-
- de.learnlib.algorithm.ttt.base.AbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
-
- de.learnlib.algorithm.ttt.moore.TTTLearnerMoore<I,O>
-
- Type Parameters:
I
- input symbol typeO
- output symbols type
- All Implemented Interfaces:
LearningAlgorithm<MooreMachine<?,I,?,O>,I,Word<O>>
,LearningAlgorithm.MooreLearner<I,O>
,Resumable<TTTLearnerState<I,Word<O>>>
,SupportsGrowingAlphabet<I>
public class TTTLearnerMoore<I,O> extends AbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>> implements LearningAlgorithm.MooreLearner<I,O>
AMooreMachine
-based specialization of the TTT learner.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.learnlib.algorithm.ttt.base.AbstractTTTLearner
AbstractTTTLearner.BuilderDefaults, AbstractTTTLearner.Splitter<I,D>
-
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 inherited from class de.learnlib.algorithm.ttt.base.AbstractTTTLearner
alphabet, analyzer, blockList, dtree, hypothesis, openTransitions, oracle
-
-
Constructor Summary
Constructors Constructor Description TTTLearnerMoore(Alphabet<I> alphabet, MembershipOracle<I,Word<O>> oracle, AcexAnalyzer analyzer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Word<O>
computeHypothesisOutput(TTTState<I,Word<O>> state, Word<I> suffix)
protected AbstractBaseDTNode<I,Word<O>>
createNewNode(AbstractBaseDTNode<I,Word<O>> parent, Word<O> parentOutput)
protected OutInconsPrefixTransformAcex<I,Word<O>>
deriveAcex(OutputInconsistency<I,Word<O>> outIncons)
TTTHypothesisMoore<I,O>
getHypothesisModel()
Returns the current hypothesis model.protected void
initializeState(TTTState<I,Word<O>> state)
Initializes a state.protected Word<O>
predictSuccOutcome(TTTTransition<I,Word<O>> trans, AbstractBaseDTNode<I,Word<O>> succSeparator)
protected boolean
refineHypothesisSingle(DefaultQuery<I,Word<O>> ceQuery)
Performs a single refinement of the hypothesis, i.e., without repeated counterexample evaluation.protected Word<O>
succEffect(Word<O> effect)
-
Methods inherited from class de.learnlib.algorithm.ttt.base.AbstractTTTLearner
addAlphabetSymbol, allNodesFinal, closeTransitions, createMap, createTransition, declareFinal, finalizeAny, findOutputInconsistency, getAnySuccessor, getAnySuccessor, getAnyTarget, getDeterministicState, getDiscriminationTree, getHypothesisDS, getNondetSuccessors, link, makeTree, query, query, refineHypothesis, resume, split, startLearning, suspend
-
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
refineHypothesis, startLearning
-
-
-
-
Constructor Detail
-
TTTLearnerMoore
public TTTLearnerMoore(Alphabet<I> alphabet, MembershipOracle<I,Word<O>> oracle, AcexAnalyzer analyzer)
-
-
Method Detail
-
succEffect
protected Word<O> succEffect(Word<O> effect)
- Specified by:
succEffect
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
-
predictSuccOutcome
protected Word<O> predictSuccOutcome(TTTTransition<I,Word<O>> trans, AbstractBaseDTNode<I,Word<O>> succSeparator)
- Specified by:
predictSuccOutcome
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
-
initializeState
protected void initializeState(TTTState<I,Word<O>> state)
Description copied from class:AbstractTTTLearner
Initializes a state. Creates its outgoing transition objects, and adds them to the "open" list.- Overrides:
initializeState
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
- Parameters:
state
- the state to initialize
-
refineHypothesisSingle
protected boolean refineHypothesisSingle(DefaultQuery<I,Word<O>> ceQuery)
Description copied from class:AbstractTTTLearner
Performs a single refinement of the hypothesis, i.e., without repeated counterexample evaluation. The parameter and return value have the same significance as inAbstractTTTLearner.refineHypothesis(DefaultQuery)
.- Overrides:
refineHypothesisSingle
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
- Parameters:
ceQuery
- the counterexample (query) to be used for refinement- Returns:
true
if the hypothesis was refined,false
otherwise
-
deriveAcex
protected OutInconsPrefixTransformAcex<I,Word<O>> deriveAcex(OutputInconsistency<I,Word<O>> outIncons)
- Overrides:
deriveAcex
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
-
computeHypothesisOutput
protected Word<O> computeHypothesisOutput(TTTState<I,Word<O>> state, Word<I> suffix)
- Specified by:
computeHypothesisOutput
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
-
createNewNode
protected AbstractBaseDTNode<I,Word<O>> createNewNode(AbstractBaseDTNode<I,Word<O>> parent, Word<O> parentOutput)
- Specified by:
createNewNode
in classAbstractTTTLearner<MooreMachine<?,I,?,O>,I,Word<O>>
-
getHypothesisModel
public TTTHypothesisMoore<I,O> getHypothesisModel()
Description copied from interface:LearningAlgorithm
Returns the current hypothesis model.N.B.: By the contract of this interface, the model returned by this method may not be modified (i.e., M generally should refer to an immutable interface), and its validity is retained only until the next invocation of
LearningAlgorithm.refineHypothesis(DefaultQuery)
. If older hypotheses have to be maintained, a copy of the returned model must be made.Please note that it should be illegal to invoke this method before an initial invocation of
LearningAlgorithm.startLearning()
.- Specified by:
getHypothesisModel
in interfaceLearningAlgorithm<MooreMachine<?,I,?,O>,I,Word<O>>
- Returns:
- the current hypothesis model.
-
-