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>, SupportsGrowingAlphabet<I>
This class implements basic management features (table, alphabet, oracle) and the main loop of alternating completeness and consistency checks. It does not take care of choosing how to initialize the table and hypothesis construction.
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 net.automatalib.words.Alphabet<I> |
alphabet |
protected MembershipOracle<I,D> |
oracle |
protected GenericObservationTable<I,D> |
table |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLStar(net.automatalib.words.Alphabet<I> alphabet,
MembershipOracle<I,D> oracle)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAlphabetSymbol(I symbol) |
boolean |
addGlobalSuffixes(Collection<? extends net.automatalib.words.Word<I>> newGlobalSuffixes) |
protected net.automatalib.words.Word<I> |
analyzeInconsistency(Inconsistency<I> 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<net.automatalib.words.Word<I>> |
getGlobalSuffixes() |
ObservationTable<I,D> |
getObservationTable() |
protected abstract net.automatalib.automata.concepts.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<net.automatalib.words.Word<I>> |
initialPrefixes() |
protected abstract List<net.automatalib.words.Word<I>> |
initialSuffixes()
Returns the list of initial suffixes which are used to initialize the table.
|
boolean |
refineHypothesis(DefaultQuery<I,D> ceQuery) |
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHypothesisModelprotected net.automatalib.words.Alphabet<I> alphabet
protected final MembershipOracle<I,D> oracle
protected GenericObservationTable<I,D> table
protected AbstractLStar(net.automatalib.words.Alphabet<I> alphabet, MembershipOracle<I,D> oracle)
alphabet - the learning alphabet.oracle - the membership oracle.public void startLearning()
startLearning in interface LearningAlgorithm<A,I,D>public final boolean refineHypothesis(DefaultQuery<I,D> ceQuery)
refineHypothesis in interface LearningAlgorithm<A,I,D>protected abstract net.automatalib.automata.concepts.SuffixOutput<I,D> hypothesisOutput()
protected void doRefineHypothesis(DefaultQuery<I,D> ceQuery)
protected List<List<Row<I>>> incorporateCounterExample(DefaultQuery<I,D> ce)
ce - the query which contradicts the hypothesisprotected abstract List<net.automatalib.words.Word<I>> initialSuffixes()
protected boolean completeConsistentTable(List<List<Row<I>>> unclosed, boolean checkConsistency)
unclosed - the unclosed rows (equivalence classes) to start with.protected List<Row<I>> selectClosingRows(List<List<Row<I>>> unclosed)
unclosed - a list of equivalence classes of unclosed rows.protected net.automatalib.words.Word<I> analyzeInconsistency(Inconsistency<I> incons)
incons - the inconsistency descriptionpublic Collection<net.automatalib.words.Word<I>> getGlobalSuffixes()
getGlobalSuffixes in interface GlobalSuffixFeature<I>public boolean addGlobalSuffixes(Collection<? extends net.automatalib.words.Word<I>> newGlobalSuffixes)
addGlobalSuffixes in interface GlobalSuffixFeature<I>public ObservationTable<I,D> getObservationTable()
getObservationTable in interface ObservationTableFeature<I,D>public void addAlphabetSymbol(I symbol)
addAlphabetSymbol in interface SupportsGrowingAlphabet<I>Copyright © 2018. All rights reserved.