A - automaton typeI - input symbol typeD - output domain typepublic abstract class AbstractLStar<A,I,D> extends Object implements OTLearner<A,I,D>, GlobalSuffixLearner<A,I,D>
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 Alphabet<? extends I> |
alphabet |
protected MembershipOracle<I,D> |
oracle |
protected ObservationTable<I,D> |
table |
| Constructor and Description |
|---|
AbstractLStar(Alphabet<I> alphabet,
MembershipOracle<I,D> oracle)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addGlobalSuffixes(Collection<? extends Word<I>> newGlobalSuffixes)
Add the provided suffixes to the collection of global suffixes.
|
protected Word<I> |
analyzeInconsistency(Inconsistency<I,D> incons)
Analyzes an inconsistency.
|
protected boolean |
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,D> ceQuery) |
Collection<? extends Word<I>> |
getGlobalSuffixes()
Retrieves the global suffixes of this learner.
|
ObservationTable<I,D> |
getObservationTable() |
protected abstract SuffixOutput<I,D> |
hypothesisOutput() |
protected List<List<Row<I>>> |
incorporateCounterExample(DefaultQuery<I,D> ce)
Incorporates the information provided by a counterexample into
the observation data structure.
|
protected List<Word<I>> |
initialPrefixes() |
protected abstract List<Word<I>> |
initialSuffixes()
Returns the list of initial suffixes which are used to initialize the table.
|
boolean |
refineHypothesis(DefaultQuery<I,D> 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, waitgetHypothesisModelprotected final MembershipOracle<I,D> oracle
protected final ObservationTable<I,D> table
public AbstractLStar(Alphabet<I> alphabet, MembershipOracle<I,D> oracle)
alphabet - the learning alphabet.oracle - the membership oracle.public void startLearning()
LearningAlgorithmstartLearning in interface LearningAlgorithm<A,I,D>public final boolean refineHypothesis(DefaultQuery<I,D> ceQuery)
LearningAlgorithmLearningAlgorithm.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 doRefineHypothesis(DefaultQuery<I,D> ceQuery)
protected boolean completeConsistentTable(List<List<Row<I>>> unclosed, boolean checkConsistency)
unclosed - the unclosed rows (equivalence classes) to start with.protected Word<I> analyzeInconsistency(Inconsistency<I,D> incons)
incons - the inconsistency descriptionprotected List<List<Row<I>>> incorporateCounterExample(DefaultQuery<I,D> 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()
public Collection<? extends Word<I>> getGlobalSuffixes()
GlobalSuffixFeatureLearningAlgorithm.startLearning()
should return an empty collection.
The return value should not be modified; attempting to do so may result in an
UnsupportedOperationException. It is the implementation's responsibility
to ensure attempted modifications do not corrupt the learner's internal state.
getGlobalSuffixes in interface GlobalSuffixFeature<I>public boolean addGlobalSuffixes(Collection<? extends Word<I>> newGlobalSuffixes)
GlobalSuffixFeatureLearningAlgorithm.startLearning() has been called.
The implementation may choose to (but is not required to) omit suffixes which are already present (that is, manage the global suffixes as a proper set).
addGlobalSuffixes in interface GlobalSuffixFeature<I>newGlobalSuffixes - the global suffixes to addtrue if a refinement was triggered by adding the global suffixes,
false otherwise.public ObservationTable<I,D> getObservationTable()
getObservationTable in interface ObservationTableFeature<I,D>protected abstract SuffixOutput<I,D> hypothesisOutput()
Copyright © 2015. All rights reserved.