I
- input symbol typepublic abstract class BaseTTTLearner<A,I,D> extends Object implements LearningAlgorithm<A,I,D>, AccessSequenceTransformer<I>, SuffixOutput<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 Alphabet<I> |
alphabet |
protected BlockList<I,D> |
blockList
The blocks during a split operation.
|
protected DiscriminationTree<I,D> |
dtree |
protected TTTHypothesis<I,D,?> |
hypothesis |
Modifier | Constructor and Description |
---|---|
protected |
BaseTTTLearner(Alphabet<I> alphabet,
MembershipOracle<I,D> oracle,
TTTHypothesis<I,D,?> hypothesis,
LocalSuffixFinder<? super I,? super D> suffixFinder) |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(TTTEventListener<I,D> listener) |
protected DTNode<I,D> |
chooseInnerNode(DTNode<I,D> root) |
protected DTNode<I,D> |
chooseLeaf(DTNode<I,D> root) |
protected abstract D |
computeHypothesisOutput(TTTState<I,D> state,
Iterable<? extends I> suffix) |
D |
computeOutput(Iterable<? extends I> input) |
D |
computeSuffixOutput(Iterable<? extends I> prefix,
Iterable<? extends 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) |
DiscriminationTree.GraphView |
dtGraphView() |
protected boolean |
finalizeAny()
Chooses a block root, and finalizes the corresponding discriminator.
|
DiscriminationTree<I,D> |
getDiscriminationTree()
Returns the discrimination tree.
|
GraphDOTHelper<TTTState<I,D>,TTTHypothesis.TTTEdge<I,D>> |
getHypothesisDOTHelper() |
TTTHypothesis<I,D,?> |
getHypothesisDS() |
protected TTTState<I,D> |
getState(TTTState<I,D> start,
Iterable<? extends I> suffix)
Retrieves the successor for a given state and a suffix sequence.
|
protected TTTState<I,D> |
getTarget(TTTTransition<I,D> trans)
Retrieves the target state of a given transition.
|
protected void |
initializeState(TTTState<I,D> state)
Initializes a state.
|
boolean |
isAccessSequence(Word<I> word) |
protected D |
predictSuccOutcome(TTTTransition<I,D> trans,
DTNode<I,D> succSeparator) |
protected D |
query(AccessSequenceProvider<I> accessSeqProvider,
Word<I> suffix)
Performs a membership query, using an access sequence as its prefix.
|
protected D |
query(Word<I> prefix,
Word<I> suffix)
Performs a membership query.
|
boolean |
refineHypothesis(DefaultQuery<I,D> ceQuery)
Triggers a refinement of the model by providing a counterexample.
|
void |
removeEventListener(TTTEventListener<I,D> listener) |
protected DTNode<I,D>[] |
split(DTNode<I,D> node,
Word<I> discriminator,
D... outputs) |
void |
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided
model object.
|
Word<I> |
transformAccessSequence(Word<I> word) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHypothesisModel
protected final TTTHypothesis<I,D,?> hypothesis
protected final DiscriminationTree<I,D> dtree
protected BaseTTTLearner(Alphabet<I> alphabet, MembershipOracle<I,D> oracle, TTTHypothesis<I,D,?> hypothesis, LocalSuffixFinder<? super I,? super D> suffixFinder)
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 finalizeAny()
true
if a splittable block root was found, false
otherwise.protected TTTState<I,D> getTarget(TTTTransition<I,D> trans)
trans
- the transitionprotected TTTState<I,D> getState(TTTState<I,D> start, Iterable<? extends I> suffix)
start
- the originating statesuffix
- the sequence of input symbols to processsuffix
, starting from
start
protected D predictSuccOutcome(TTTTransition<I,D> trans, DTNode<I,D> succSeparator)
protected abstract D computeHypothesisOutput(TTTState<I,D> state, Iterable<? extends I> suffix)
public D computeOutput(Iterable<? extends I> input)
computeOutput
in interface Output<I,D>
computeOutput
in interface SuffixOutput<I,D>
public D computeSuffixOutput(Iterable<? extends I> prefix, Iterable<? extends I> suffix)
computeSuffixOutput
in interface SuffixOutput<I,D>
public Word<I> transformAccessSequence(Word<I> word)
transformAccessSequence
in interface AccessSequenceTransformer<I>
public boolean isAccessSequence(Word<I> word)
isAccessSequence
in interface AccessSequenceTransformer<I>
public TTTHypothesis<I,D,?> getHypothesisDS()
public DiscriminationTree.GraphView dtGraphView()
public GraphDOTHelper<TTTState<I,D>,TTTHypothesis.TTTEdge<I,D>> getHypothesisDOTHelper()
protected D query(Word<I> prefix, Word<I> suffix)
prefix
- the prefix part of the querysuffix
- the suffix part of the queryprotected D query(AccessSequenceProvider<I> accessSeqProvider, 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, Word<I> discriminator, D... outputs)
public void addEventListener(TTTEventListener<I,D> listener)
public void removeEventListener(TTTEventListener<I,D> listener)
Copyright © 2015. All rights reserved.