A
- automaton class.I
- input symbol class.O
- output class.public abstract class AbstractLStar<A,I,O> extends Object implements LearningAlgorithm<A,I,O>
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>
Modifier and Type | Field and Description |
---|---|
protected Alphabet<? extends I> |
alphabet |
protected MembershipOracle<I,O> |
oracle |
protected ObservationTable<I,O> |
table |
Constructor and Description |
---|
AbstractLStar(Alphabet<I> alphabet,
MembershipOracle<I,O> oracle)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Word<I> |
analyzeInconsistency(Inconsistency<I,O> incons)
Analyzes an inconsistency.
|
protected void |
completeConsistentTable(List<List<Row<I>>> unclosed,
boolean checkConsistency)
Iteratedly checks for unclosedness and inconsistencies in the table,
and fixes any occurrences thereof.
|
protected void |
doRefineHypothesis(DefaultQuery<I,O> ceQuery) |
protected List<List<Row<I>>> |
incorporateCounterExample(DefaultQuery<I,O> ce)
Incorporates the information provided by a counterexample into
the observation data structure.
|
protected abstract List<Word<I>> |
initialSuffixes()
Returns the list of initial suffixes which are used to initialize the table.
|
boolean |
refineHypothesis(DefaultQuery<I,O> ceQuery)
Triggers a refinement of the model by providing a counterexample.
|
protected List<Row<I>> |
selectClosingRows(List<List<Row<I>>> unclosed)
This method selects a set of rows to use for closing the table.
|
void |
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided
model object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHypothesisModel
protected final MembershipOracle<I,O> oracle
protected final ObservationTable<I,O> table
public AbstractLStar(Alphabet<I> alphabet, MembershipOracle<I,O> oracle)
alphabet
- the learning alphabet.oracle
- the membership oracle.outputMapping
- a mapping that translates between oracle outputs and data entries stored
in the observation table.public void startLearning()
LearningAlgorithm
startLearning
in interface LearningAlgorithm<A,I,O>
public final boolean refineHypothesis(DefaultQuery<I,O> ceQuery)
LearningAlgorithm
LearningAlgorithm.startLearning()
should be illegal.refineHypothesis
in interface LearningAlgorithm<A,I,O>
ceQuery
- the query which exposes diverging behavior, as posed to the real SUL
(i.e. with the SULs output).protected void doRefineHypothesis(DefaultQuery<I,O> ceQuery)
protected void completeConsistentTable(List<List<Row<I>>> unclosed, boolean checkConsistency)
unclosed
- the unclosed rows (equivalence classes) to start with.protected Word<I> analyzeInconsistency(Inconsistency<I,O> incons)
incons
- the inconsistency descriptionprotected List<List<Row<I>>> incorporateCounterExample(DefaultQuery<I,O> ce)
ce
- the query which contradicts the hypothesisprotected List<Row<I>> selectClosingRows(List<List<Row<I>>> unclosed)
unclosed
- a list of equivalence classes of unclosed rows.protected abstract List<Word<I>> initialSuffixes()
Copyright © 2014. All Rights Reserved.