Module de.learnlib.algorithm.ttt
Package de.learnlib.algorithm.ttt.mealy
Class TTTLearnerMealy<I,O>
- java.lang.Object
-
- de.learnlib.algorithm.ttt.base.AbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
- de.learnlib.algorithm.ttt.mealy.TTTLearnerMealy<I,O>
-
- Type Parameters:
I
- input symbol typeO
- output symbols type
- All Implemented Interfaces:
LearningAlgorithm<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
,LearningAlgorithm.MealyLearner<I,O>
,Resumable<TTTLearnerState<I,net.automatalib.word.Word<O>>>
,net.automatalib.alphabet.SupportsGrowingAlphabet<I>
- Direct Known Subclasses:
TTTAdapterMealy
public class TTTLearnerMealy<I,O> extends AbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>> implements LearningAlgorithm.MealyLearner<I,O>
AMealyMachine
-based specialization ofAbstractTTTLearner
.
-
-
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 TTTLearnerMealy(net.automatalib.alphabet.Alphabet<I> alphabet, MembershipOracle<I,net.automatalib.word.Word<O>> oracle, AcexAnalyzer analyzer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected net.automatalib.word.Word<O>
computeHypothesisOutput(TTTState<I,net.automatalib.word.Word<O>> state, net.automatalib.word.Word<I> suffix)
protected AbstractBaseDTNode<I,net.automatalib.word.Word<O>>
createNewNode(AbstractBaseDTNode<I,net.automatalib.word.Word<O>> parent, net.automatalib.word.Word<O> parentOutput)
protected TTTTransition<I,net.automatalib.word.Word<O>>
createTransition(TTTState<I,net.automatalib.word.Word<O>> state, I sym)
protected OutInconsPrefixTransformAcex<I,net.automatalib.word.Word<O>>
deriveAcex(OutputInconsistency<I,net.automatalib.word.Word<O>> outIncons)
protected OutputInconsistency<I,net.automatalib.word.Word<O>>
findOutputInconsistency()
net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>
getHypothesisModel()
Returns the current hypothesis model.protected void
initTransitions(TTTTransition<I,net.automatalib.word.Word<O>> head, int num)
A post-processing hook for transitions created byAbstractTTTLearner.createTransition(TTTState, Object)
, e.g., afterAbstractTTTLearner.initializeState(TTTState)
orAbstractTTTLearner.addAlphabetSymbol(Object)
.protected net.automatalib.word.Word<O>
predictSuccOutcome(TTTTransition<I,net.automatalib.word.Word<O>> trans, AbstractBaseDTNode<I,net.automatalib.word.Word<O>> succSeparator)
protected boolean
refineHypothesisSingle(DefaultQuery<I,net.automatalib.word.Word<O>> ceQuery)
Performs a single refinement of the hypothesis, i.e., without repeated counterexample evaluation.protected net.automatalib.word.Word<O>
succEffect(net.automatalib.word.Word<O> effect)
-
Methods inherited from class de.learnlib.algorithm.ttt.base.AbstractTTTLearner
addAlphabetSymbol, allNodesFinal, closeTransitions, createMap, declareFinal, finalizeAny, getAnySuccessor, getAnySuccessor, getAnyTarget, getDeterministicState, getDiscriminationTree, getHypothesisDS, getNondetSuccessors, initializeState, link, makeTree, refineHypothesis, resume, 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
-
TTTLearnerMealy
public TTTLearnerMealy(net.automatalib.alphabet.Alphabet<I> alphabet, MembershipOracle<I,net.automatalib.word.Word<O>> oracle, AcexAnalyzer analyzer)
-
-
Method Detail
-
getHypothesisModel
public net.automatalib.automaton.transducer.MealyMachine<?,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 should not be modified by external code (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<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
- Returns:
- the current hypothesis model.
-
createTransition
protected TTTTransition<I,net.automatalib.word.Word<O>> createTransition(TTTState<I,net.automatalib.word.Word<O>> state, I sym)
- Overrides:
createTransition
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
initTransitions
protected void initTransitions(TTTTransition<I,net.automatalib.word.Word<O>> head, int num)
Description copied from class:AbstractTTTLearner
A post-processing hook for transitions created byAbstractTTTLearner.createTransition(TTTState, Object)
, e.g., afterAbstractTTTLearner.initializeState(TTTState)
orAbstractTTTLearner.addAlphabetSymbol(Object)
. This is mainly useful for transition output hypotheses that want to initialize the transition outputs in a bulk operation.- Overrides:
initTransitions
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
- Parameters:
head
- the head of (the list of) the created transitionsnum
- the number of created transitions
-
refineHypothesisSingle
protected boolean refineHypothesisSingle(DefaultQuery<I,net.automatalib.word.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<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.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,net.automatalib.word.Word<O>> deriveAcex(OutputInconsistency<I,net.automatalib.word.Word<O>> outIncons)
- Overrides:
deriveAcex
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
succEffect
protected net.automatalib.word.Word<O> succEffect(net.automatalib.word.Word<O> effect)
- Specified by:
succEffect
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
findOutputInconsistency
protected OutputInconsistency<I,net.automatalib.word.Word<O>> findOutputInconsistency()
- Overrides:
findOutputInconsistency
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
predictSuccOutcome
protected net.automatalib.word.Word<O> predictSuccOutcome(TTTTransition<I,net.automatalib.word.Word<O>> trans, AbstractBaseDTNode<I,net.automatalib.word.Word<O>> succSeparator)
- Specified by:
predictSuccOutcome
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
computeHypothesisOutput
protected net.automatalib.word.Word<O> computeHypothesisOutput(TTTState<I,net.automatalib.word.Word<O>> state, net.automatalib.word.Word<I> suffix)
- Specified by:
computeHypothesisOutput
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
createNewNode
protected AbstractBaseDTNode<I,net.automatalib.word.Word<O>> createNewNode(AbstractBaseDTNode<I,net.automatalib.word.Word<O>> parent, net.automatalib.word.Word<O> parentOutput)
- Specified by:
createNewNode
in classAbstractTTTLearner<net.automatalib.automaton.transducer.MealyMachine<?,I,?,O>,I,net.automatalib.word.Word<O>>
-
-