|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ls5.jlearn.algorithms.packs.ObservationPack
public class ObservationPack
Constructor Summary | |
---|---|
ObservationPack()
|
|
ObservationPack(boolean fsa)
|
Method Summary | |
---|---|
boolean |
addCounterExample(Word example,
Word output)
Process a counterexample. |
int |
addLetter(Symbol letter)
will add a letter to the input alphabet and will extend the set of long prefixes (one-letter extensions) accordingly |
void |
addPrefix(Word w)
add a new prefix to the observations adding arbitrary words to the pack may break the algorithm: thus it will be checked that prefix of w is access sequence |
void |
addSuffix(Word suffix)
Add given Word to the internal set of suffixes of this
Learner . |
void |
addSuffixLocally(Word suffix,
Word as)
|
Class<? extends Plottable>[] |
getFormats()
returns an array of currently available plotable formats. |
Alphabet |
getInputs()
|
Automaton |
getResult()
Provides the current hypothesis as Automaton object |
SelectiveExploration |
getSelectiveExploration()
|
int |
getSigma()
Return the size of the internal Alphabet this Learner
uses to construct a hypothesis. |
boolean |
hasSelectiveExploration()
|
void |
learn()
Starts the learning algorithm, returns once a hypothesis has been constructed |
String |
plotAsDot()
returns a dot view on the plotable objejt |
de.ls5.layouter.api.model.Graph |
plotAsGraph()
Will plot this polatbale as Graph |
String |
plotAsString()
Will plot this polatbale as String |
void |
setAlphabet(Alphabet alphabet)
Specifies the Alphabet used for construction of the hypothesis |
void |
setCheckSemanticSuffixClosedness(boolean checkSemanticSuffixClosedness)
set wether consistency checks should be omitted |
void |
setdInit(Collection<Word> dInit)
|
void |
setFullTraces(boolean fullTraces)
|
void |
setHypothesisChangeListener(HypothesisChangeListener listener)
|
void |
setOracle(Oracle oracle)
Set the Oracle to be queried during the learning process |
void |
setSelectiveExploration(SelectiveExploration selector)
|
void |
setSplitterCreator(SplitterCreator splitterCreator)
Setter for the SplitterCreator , which encapsulates logic for
dealing with counterexamples (logic that, e.g., determines a suffix of
the counterexample that witnesses unequality of states, thus "splitting"
a state in the hypothesis). |
String |
toDot()
return current state of data structure as dot text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObservationPack()
public ObservationPack(boolean fsa)
Method Detail |
---|
public void addPrefix(Word w) throws LearningException
w
-
LearningException
public void learn() throws LearningException
Learner
learn
in interface Learner
LearningException
- if any learning-related exception occurs an instance of this exception will be thrownpublic boolean addCounterExample(Word example, Word output) throws ObservationConflictException
Learner
EquivalenceOracle
found proof (a counterexample) for
diverging behavior between the hypothesis and the System Under Test (SUT).
addCounterExample
in interface Learner
example
- counterexample provided by the equivalence oracleoutput
- output produced by the SUT when processing the counterexample
ObservationConflictException
- exception that is thrown if the counterexample and its output diverges from already observed behaviorpublic void addSuffix(Word suffix)
Learner
Word
to the internal set of suffixes of this
Learner
.
addSuffix
in interface Learner
suffix
- Word
to be additionally considered when constructing a hypothesispublic void addSuffixLocally(Word suffix, Word as)
public Alphabet getInputs()
public void setOracle(Oracle oracle)
Learner
Oracle
to be queried during the learning process
setOracle
in interface Learner
oracle
- Oracle
to be queriedpublic void setAlphabet(Alphabet alphabet)
Learner
Alphabet
used for construction of the hypothesis
setAlphabet
in interface Learner
alphabet
- Alphabet
to be used for constructionpublic void setSplitterCreator(SplitterCreator splitterCreator)
Learner
SplitterCreator
, which encapsulates logic for
dealing with counterexamples (logic that, e.g., determines a suffix of
the counterexample that witnesses unequality of states, thus "splitting"
a state in the hypothesis).
setSplitterCreator
in interface Learner
splitterCreator
- instance of SplitterCreator
to be used for processing counterexamplespublic Automaton getResult()
Learner
Automaton
object
getResult
in interface Learner
public int addLetter(Symbol letter)
addLetter
in interface Learner
letter
- to be added
public int getSigma()
Learner
Alphabet
this Learner
uses to construct a hypothesis.
getSigma
in interface Learner
public void setFullTraces(boolean fullTraces)
fullTraces
- the fullTraces to setpublic void setdInit(Collection<Word> dInit)
dInit
- the dInit to setpublic void setCheckSemanticSuffixClosedness(boolean checkSemanticSuffixClosedness)
public void setSelectiveExploration(SelectiveExploration selector)
public SelectiveExploration getSelectiveExploration()
public boolean hasSelectiveExploration()
public void setHypothesisChangeListener(HypothesisChangeListener listener)
public String toDot()
ObservableDataStructure
toDot
in interface ObservableDataStructure
public Class<? extends Plottable>[] getFormats()
Plottable
getFormats
in interface Plottable
public String plotAsDot()
DotPlottable
plotAsDot
in interface DotPlottable
public String plotAsString()
TextPlottable
plotAsString
in interface TextPlottable
public de.ls5.layouter.api.model.Graph plotAsGraph()
GraphPlottable
plotAsGraph
in interface GraphPlottable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |