I
- input symbol typepublic abstract class BaseTTTLearner<A,I,D> extends Object implements LearningAlgorithm<A,I,D>
DFA
.Modifier and Type | Class and Description |
---|---|
static class |
BaseTTTLearner.BuilderDefaults |
static class |
BaseTTTLearner.Splitter<I,D>
Data structure for representing a splitter.
|
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>
Modifier and Type | Field and Description |
---|---|
protected net.automatalib.words.Alphabet<I> |
alphabet |
protected AcexAnalyzer |
analyzer |
protected BlockList<I,D> |
blockList
The blocks during a split operation.
|
protected DiscriminationTree<I,D> |
dtree |
protected TTTHypothesis<I,D,?> |
hypothesis |
protected IncomingList<I,D> |
openTransitions
Open transitions, i.e., transitions that possibly point to a non-leaf
node in the discrimination tree.
|
protected MembershipOracle<I,D> |
oracle |
Modifier | Constructor and Description |
---|---|
protected |
BaseTTTLearner(net.automatalib.words.Alphabet<I> alphabet,
MembershipOracle<I,D> oracle,
TTTHypothesis<I,D,?> hypothesis,
AcexAnalyzer analyzer) |
protected |
BaseTTTLearner(net.automatalib.words.Alphabet<I> alphabet,
MembershipOracle<I,D> oracle,
TTTHypothesis<I,D,?> hypothesis,
AcexAnalyzer analyzer,
DTNode<I,D> root) |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(TTTEventListener<I,D> listener) |
protected boolean |
allNodesFinal() |
protected void |
closeTransitions() |
protected abstract D |
computeHypothesisOutput(TTTState<I,D> state,
net.automatalib.words.Word<I> suffix) |
protected <V> Map<D,V> |
createMap() |
protected TTTTransition<I,D> |
createTransition(TTTState<I,D> state,
I sym) |
protected void |
declareFinal(DTNode<I,D> blockRoot) |
protected OutInconsPrefixTransformAcex<I,D> |
deriveAcex(OutputInconsistency<I,D> outIncons) |
DiscriminationTree.GraphView |
dtGraphView() |
protected boolean |
finalizeAny()
Chooses a block root, and finalizes the corresponding discriminator.
|
protected OutputInconsistency<I,D> |
findOutputInconsistency() |
protected TTTState<I,D> |
getAnySuccessor(TTTState<I,D> state,
I sym) |
protected TTTState<I,D> |
getAnySuccessor(TTTState<I,D> state,
Iterable<? extends I> suffix) |
protected TTTState<I,D> |
getAnyTarget(TTTTransition<I,D> trans)
Retrieves the target state of a given transition.
|
protected TTTState<I,D> |
getDeterministicState(TTTState<I,D> start,
net.automatalib.words.Word<I> word) |
DiscriminationTree<I,D> |
getDiscriminationTree()
Returns the discrimination tree.
|
net.automatalib.graphs.dot.GraphDOTHelper<TTTState<I,D>,TTTHypothesis.TTTEdge<I,D>> |
getHypothesisDOTHelper() |
TTTHypothesis<I,D,?> |
getHypothesisDS() |
protected Set<TTTState<I,D>> |
getNondetSuccessors(Collection<? extends TTTState<I,D>> states,
I sym) |
protected Collection<? extends TTTState<I,D>> |
getNondetSuccessors(Collection<? extends TTTState<I,D>> states,
Iterable<? extends I> suffix) |
protected TTTTransition<I,D> |
getStateTransition(TTTState<I,D> state,
I sym) |
protected void |
initializeState(TTTState<I,D> state)
Initializes a state.
|
protected static <I,D> void |
link(DTNode<I,D> dtNode,
TTTState<I,D> state)
Establish the connection between a node in the discrimination tree
and a state of the hypothesis.
|
protected TTTState<I,D> |
makeTree(TTTTransition<I,D> trans) |
protected abstract D |
predictSuccOutcome(TTTTransition<I,D> trans,
DTNode<I,D> succSeparator) |
protected D |
query(AccessSequenceProvider<I> accessSeqProvider,
net.automatalib.words.Word<I> suffix)
Performs a membership query, using an access sequence as its prefix.
|
protected D |
query(net.automatalib.words.Word<I> prefix,
net.automatalib.words.Word<I> suffix)
Performs a membership query.
|
boolean |
refineHypothesis(DefaultQuery<I,D> ceQuery)
Triggers a refinement of the model by providing a counterexample.
|
protected boolean |
refineHypothesisSingle(DefaultQuery<I,D> ceQuery)
Performs a single refinement of the hypothesis, i.e., without
repeated counterexample evaluation.
|
void |
removeEventListener(TTTEventListener<I,D> listener) |
protected DTNode<I,D>[] |
split(DTNode<I,D> node,
net.automatalib.words.Word<I> discriminator,
D... outputs) |
void |
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided
model object.
|
protected abstract D |
succEffect(D effect) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHypothesisModel
protected final net.automatalib.words.Alphabet<I> alphabet
protected final TTTHypothesis<I,D,?> hypothesis
protected final MembershipOracle<I,D> oracle
protected final DiscriminationTree<I,D> dtree
protected final AcexAnalyzer analyzer
protected final IncomingList<I,D> openTransitions
protected BaseTTTLearner(net.automatalib.words.Alphabet<I> alphabet, MembershipOracle<I,D> oracle, TTTHypothesis<I,D,?> hypothesis, AcexAnalyzer analyzer)
protected BaseTTTLearner(net.automatalib.words.Alphabet<I> alphabet, MembershipOracle<I,D> oracle, TTTHypothesis<I,D,?> hypothesis, AcexAnalyzer analyzer, DTNode<I,D> root)
public void startLearning()
LearningAlgorithm
startLearning
in interface LearningAlgorithm<A,I,D>
public boolean refineHypothesis(DefaultQuery<I,D> ceQuery)
LearningAlgorithm
LearningAlgorithm.startLearning()
should be illegal.refineHypothesis
in interface LearningAlgorithm<A,I,D>
ceQuery
- the query which exposes diverging behavior, as posed to the real SUL
(i.e. with the SULs output).protected void initializeState(TTTState<I,D> state)
state
- the state to initializeprotected boolean refineHypothesisSingle(DefaultQuery<I,D> ceQuery)
refineHypothesis(DefaultQuery)
.ceQuery
- the counterexample (query) to be used for refinementtrue
if the hypothesis was refined, false
otherwiseprotected OutInconsPrefixTransformAcex<I,D> deriveAcex(OutputInconsistency<I,D> outIncons)
protected boolean finalizeAny()
true
if a splittable block root was found, false
otherwise.protected TTTState<I,D> getDeterministicState(TTTState<I,D> start, net.automatalib.words.Word<I> word)
protected Set<TTTState<I,D>> getNondetSuccessors(Collection<? extends TTTState<I,D>> states, I sym)
protected Collection<? extends TTTState<I,D>> getNondetSuccessors(Collection<? extends TTTState<I,D>> states, Iterable<? extends I> suffix)
protected TTTState<I,D> getAnySuccessor(TTTState<I,D> state, Iterable<? extends I> suffix)
protected TTTState<I,D> getAnyTarget(TTTTransition<I,D> trans)
trans
- the transitionprotected OutputInconsistency<I,D> findOutputInconsistency()
protected boolean allNodesFinal()
protected abstract D predictSuccOutcome(TTTTransition<I,D> trans, DTNode<I,D> succSeparator)
protected abstract D computeHypothesisOutput(TTTState<I,D> state, net.automatalib.words.Word<I> suffix)
protected static <I,D> void link(DTNode<I,D> dtNode, TTTState<I,D> state)
dtNode
- the node in the discrimination treestate
- the state in the hypothesispublic TTTHypothesis<I,D,?> getHypothesisDS()
public DiscriminationTree.GraphView dtGraphView()
public net.automatalib.graphs.dot.GraphDOTHelper<TTTState<I,D>,TTTHypothesis.TTTEdge<I,D>> getHypothesisDOTHelper()
protected void closeTransitions()
protected D query(net.automatalib.words.Word<I> prefix, net.automatalib.words.Word<I> suffix)
prefix
- the prefix part of the querysuffix
- the suffix part of the queryprotected D query(AccessSequenceProvider<I> accessSeqProvider, net.automatalib.words.Word<I> suffix)
accessSeqProvider
- the object from which to obtain the access sequencesuffix
- the suffix part of the querypublic DiscriminationTree<I,D> getDiscriminationTree()
@SafeVarargs protected final DTNode<I,D>[] split(DTNode<I,D> node, net.automatalib.words.Word<I> discriminator, D... outputs)
public void addEventListener(TTTEventListener<I,D> listener)
public void removeEventListener(TTTEventListener<I,D> listener)
Copyright © 2016. All rights reserved.