A
- automaton class, must be a subclass of MutableDeterministic
I
- input symbol classO
- output classSP
- state property classTP
- transition property classpublic abstract class AbstractAutomatonLStar<A,I,O,S,T,SP,TP,AI extends MutableDeterministic<S,I,T,SP,TP>> extends AbstractLStar<A,I,O>
MutableDeterministic
automata.
This class provides the L*-style hypothesis construction. Implementing classes solely have
to specify how state and transition properties should be derived.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,O> oracle,
AI internalHyp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected S |
createState(boolean initial,
Row<I> row) |
protected abstract A |
exposeInternalHypothesis() |
A |
getHypothesisModel()
Returns the current hypothesis model.
|
protected void |
setTransition(S from,
I input,
S to,
Row<I> fromRow,
int inputIdx,
Row<I> toRow) |
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.
|
analyzeInconsistency, completeConsistentTable, doRefineHypothesis, incorporateCounterExample, initialSuffixes, refineHypothesis, selectClosingRows, startLearning
protected final AI extends MutableDeterministic<S,I,T,SP,TP> internalHyp
protected final ArrayList<de.learnlib.algorithms.lstargeneric.AbstractAutomatonLStar.StateInfo<S,I>> stateInfos
public AbstractAutomatonLStar(Alphabet<I> alphabet, MembershipOracle<I,O> oracle, AI internalHyp)
alphabet
- the learning alphabetoracle
- the learning oracleprotected abstract SP stateProperty(Row<I> stateRow)
stateRow
- the row for which the state is createdprotected abstract TP transitionProperty(Row<I> stateRow, int inputIdx)
stateRow.getSuccessor(inputIdx)
.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.model
- the model to outputprotected S createState(boolean initial, Row<I> row)
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()
.
Copyright © 2014. All Rights Reserved.