A
- automaton type, must be a subclass of MutableDeterministic
I
- input symbol typeD
- output domain typeSP
- state property typeTP
- transition property typepublic abstract class AbstractAutomatonLStar<A,I,D,S,T,SP,TP,AI extends MutableDeterministic<S,I,T,SP,TP>> extends AbstractLStar<A,I,D>
MutableDeterministic
automata.
This class provides the L*-style hypothesis construction. Implementing classes solely have
to specify how state and transition properties should be derived.OTLearner.OTLearnerDFA<I>, OTLearner.OTLearnerMealy<I,O>
GlobalSuffixLearner.GlobalSuffixLearnerDFA<I>, GlobalSuffixLearner.GlobalSuffixLearnerMealy<I,O>
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>
Modifier and Type | Field and Description |
---|---|
protected AI |
internalHyp |
protected ArrayList<de.learnlib.algorithms.lstargeneric.AbstractAutomatonLStar.StateInfo<S,I>> |
stateInfos |
alphabet, oracle, table
Constructor and Description |
---|
AbstractAutomatonLStar(Alphabet<I> alphabet,
MembershipOracle<I,D> oracle,
AI internalHyp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected S |
createState(boolean initial,
Row<I> row) |
protected void |
doRefineHypothesis(DefaultQuery<I,D> ceQuery) |
protected abstract A |
exposeInternalHypothesis() |
A |
getHypothesisModel()
Returns the current hypothesis model.
|
protected void |
refineHypothesisInternal(DefaultQuery<I,D> ceQuery) |
protected void |
setTransition(S from,
I input,
S to,
Row<I> fromRow,
int inputIdx,
Row<I> toRow) |
void |
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided
model object.
|
protected abstract SP |
stateProperty(Row<I> stateRow)
Derives a state property from the corresponding row.
|
protected abstract TP |
transitionProperty(Row<I> stateRow,
int inputIdx)
Derives a transition property from the corresponding transition.
|
protected void |
updateInternalHypothesis()
Performs the L*-style hypothesis construction.
|
addGlobalSuffixes, analyzeInconsistency, completeConsistentTable, getGlobalSuffixes, getObservationTable, hypothesisOutput, incorporateCounterExample, initialPrefixes, initialSuffixes, refineHypothesis, selectClosingRows
protected abstract SP stateProperty(Row<I> stateRow)
stateRow
- the row for which the state is createdprotected abstract TP transitionProperty(Row<I> stateRow, int inputIdx)
N.B.: Not the transition row is passed to this method, but the
row for the outgoing state. The transition row can be retrieved
using Row.getSuccessor(int)
.
stateRow
- the row for the source stateinputIdx
- the index of the input symbol to considerprotected abstract A exposeInternalHypothesis()
protected void updateInternalHypothesis()
stateProperty(Row)
and
transitionProperty(Row, int)
methods are used to derive the
respective properties.protected void setTransition(S from, I input, S to, Row<I> fromRow, int inputIdx, Row<I> toRow)
public A getHypothesisModel()
LearningAlgorithm
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()
.
public final void startLearning()
LearningAlgorithm
startLearning
in interface LearningAlgorithm<A,I,D>
startLearning
in class AbstractLStar<A,I,D>
protected final void doRefineHypothesis(DefaultQuery<I,D> ceQuery)
doRefineHypothesis
in class AbstractLStar<A,I,D>
protected void refineHypothesisInternal(DefaultQuery<I,D> ceQuery)
Copyright © 2015. All rights reserved.