Package net.maswag.falcaun
Class AbstractAdaptiveSTLUpdater<I>
java.lang.Object
net.maswag.falcaun.AbstractAdaptiveSTLUpdater<I>
- Type Parameters:
I
- Type of the input at each step
- All Implemented Interfaces:
de.learnlib.oracle.BlackBoxOracle<net.automatalib.automaton.transducer.MealyMachine<?,
,String, ?, String>, String, net.automatalib.word.Word<String>> de.learnlib.oracle.BlackBoxOracle.MealyBlackBoxOracle<String,
,String> de.learnlib.oracle.EquivalenceOracle<net.automatalib.automaton.transducer.MealyMachine<?,
,String, ?, String>, String, net.automatalib.word.Word<String>> de.learnlib.oracle.EquivalenceOracle.MealyEquivalenceOracle<String,
,String> de.learnlib.oracle.InclusionOracle<net.automatalib.automaton.transducer.MealyMachine<?,
,String, ?, String>, String, net.automatalib.word.Word<String>> de.learnlib.oracle.InclusionOracle.MealyInclusionOracle<String,
,String> AdaptiveSTLUpdater<I>
- Direct Known Subclasses:
AdaptiveSTLList
,StaticSTLList
,StopDisprovedEQOracle.StaticLTLList
Abstract class for potentially adaptive set of STL formulas
- Author:
- Masaki Waga
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.learnlib.oracle.BlackBoxOracle
de.learnlib.oracle.BlackBoxOracle.DFABlackBoxOracle<I>, de.learnlib.oracle.BlackBoxOracle.MealyBlackBoxOracle<I,
O> Nested classes/interfaces inherited from interface de.learnlib.oracle.EquivalenceOracle
de.learnlib.oracle.EquivalenceOracle.DFAEquivalenceOracle<I>, de.learnlib.oracle.EquivalenceOracle.MealyEquivalenceOracle<I,
O>, de.learnlib.oracle.EquivalenceOracle.MooreEquivalenceOracle<I, O> Nested classes/interfaces inherited from interface de.learnlib.oracle.InclusionOracle
de.learnlib.oracle.InclusionOracle.DFAInclusionOracle<I>, de.learnlib.oracle.InclusionOracle.MealyInclusionOracle<I,
O> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
protected net.automatalib.alphabet.Alphabet
<String> protected net.automatalib.modelchecking.ModelChecker.MealyModelChecker
<String, String, String, net.automatalib.automaton.transducer.MealyMachine<?, String, ?, String>> private final List
<TemporalLogic<I>> private final List
<TemporalLogic<I>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSTLProperties
(Collection<? extends TemporalLogic<I>> stlCollection) protected void
addSTLProperty
(TemporalLogic<I> stl) private void
Initialize property oracles if they are not initialized yet.findCounterExample
(@NotNull net.automatalib.automaton.transducer.MealyMachine<?, String, ?, String> hypothesis, @NotNull Collection<? extends String> inputs) Try to disprove the current list of STL formulas against the given Mealy machine.List
<de.learnlib.oracle.PropertyOracle<String, ? super net.automatalib.automaton.transducer.MealyMachine<?, String, ?, String>, ?, net.automatalib.word.Word<String>>> final boolean
newlyFalsifiedFormula
(TemporalLogic<I> stlFormula) Returns if the formula is not yet falsifiedprotected void
notifyFalsifiedProperty
(List<Integer> falsifiedIndices) Notify that this.getLTLProperties.get(i) is falsified by the currently learned model.protected void
removeSTLProperties
(Collection<Integer> indices) protected void
removeSTLProperty
(int index) void
setMemOracle
(de.learnlib.oracle.MembershipOracle.MealyMembershipOracle<String, String> memOracle) Set new membership oracle.stream()
Returns the current list of LTL formulas in MealyPropertyOracle in streamtoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.maswag.falcaun.AdaptiveSTLUpdater
allDisproved, getLTLProperties, getSTLProperties, list, reset, setInputAlphabet, size
Methods inherited from interface de.learnlib.oracle.InclusionOracle
isCounterExample
-
Field Details
-
EDGE_PARSER
-
emptinessOracle
-
modelChecker
-
inclusionOracle
-
memOracle
-
inputAlphabet
-
STLProperties
-
propertyOracles
-
initialized
boolean initialized -
reportedFormulas
-
-
Constructor Details
-
AbstractAdaptiveSTLUpdater
public AbstractAdaptiveSTLUpdater()
-
-
Method Details
-
stream
Description copied from interface:AdaptiveSTLUpdater
Returns the current list of LTL formulas in MealyPropertyOracle in stream- Specified by:
stream
in interfaceAdaptiveSTLUpdater<I>
-
getPropertyOracles
-
setMemOracle
public void setMemOracle(@NotNull de.learnlib.oracle.MembershipOracle.MealyMembershipOracle<String, String> memOracle) Description copied from interface:AdaptiveSTLUpdater
Set new membership oracle. This is necessary to call list() and stream()- Specified by:
setMemOracle
in interfaceAdaptiveSTLUpdater<I>
-
addSTLProperty
-
addSTLProperties
-
removeSTLProperty
protected void removeSTLProperty(int index) -
removeSTLProperties
-
confirmInitialization
private void confirmInitialization()Initialize property oracles if they are not initialized yet.We do not initialize it in the constructor to delay the construction of the membership oracle.
-
newlyFalsifiedFormula
Description copied from interface:AdaptiveSTLUpdater
Returns if the formula is not yet falsified- Specified by:
newlyFalsifiedFormula
in interfaceAdaptiveSTLUpdater<I>
-
findCounterExample
@Nullable public @Nullable de.learnlib.query.DefaultQuery<String,net.automatalib.word.Word<String>> findCounterExample(@NotNull @NotNull net.automatalib.automaton.transducer.MealyMachine<?, String, ?, String> hypothesis, @NotNull @NotNull Collection<? extends String> inputs) Try to disprove the current list of STL formulas against the given Mealy machine.It returns
- a counterexample for the newly falsified STL formula, if exists
- a counterexample for the first falsified STL formula, if exists
- null, if no counterexample is found.
- Specified by:
findCounterExample
in interfacede.learnlib.oracle.EquivalenceOracle<net.automatalib.automaton.transducer.MealyMachine<?,
String, ?, String>, String, net.automatalib.word.Word<String>> - Parameters:
hypothesis
- The Mealy machine to be verified.inputs
- The alphabet of the Mealy machine.- Returns:
- A query of counterexample if a counterexample is found. Otherwise, it returns null.
- See Also:
-
notifyFalsifiedProperty
Notify that this.getLTLProperties.get(i) is falsified by the currently learned model.Typically, we can generate a new adaptive formula. Note: we should not remove the original formula by this.
- Parameters:
falsifiedIndices
- The set of indices of the falsified LTL formulas
-
toString
-