Package net.maswag.falcaun
Class BlackBoxVerifier<I>
java.lang.Object
net.maswag.falcaun.BlackBoxVerifier<I>
- Type Parameters:
I
- Type of the input at each step.
Verifier of a black-box system with respect to the given properties.
- Author:
- Masaki Waga <masakiwaga@gmail.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<TemporalLogic<I>> private final net.automatalib.alphabet.Alphabet
<String> private final net.automatalib.modelchecking.ModelChecker.MealyModelChecker
<String, String, String, net.automatalib.automaton.transducer.MealyMachine<?, String, ?, String>> private final AdaptiveSTLUpdater
<I> private Long
private final List
<TimeoutEQOracle<String, String>> -
Constructor Summary
ConstructorsConstructorDescriptionBlackBoxVerifier
(de.learnlib.oracle.MembershipOracle.MealyMembershipOracle<String, String> memOracle, de.learnlib.sul.SUL<String, String> verifiedSystem, AdaptiveSTLUpdater<I> properties, net.automatalib.alphabet.Alphabet<String> inputAlphabet) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBFOracle
(double multiplier) void
addCompleteExplorationEQOracle
(int minDepth, int maxDepth, int batchSize) addCornerCaseEQOracle
(int length, int minStep) Add a corner case equivalence oracle.void
addEqOracle
(de.learnlib.oracle.EquivalenceOracle.MealyEquivalenceOracle<String, String> eqOracle) void
addRandomWalkEQOracle
(double restartProbability, long maxSteps, Random random) void
addRandomWordEQOracle
(int minLength, int maxLength, int maxTests, Random random, int batchSize) void
addWpMethodEQOracle
(int maxDepth) private boolean
Set the counter example input/output.boolean
run()
void
setTimeout
(long timeout) Set timeout to the equivalence oracle added next time.void
visualizeCex
(int index) Visualize the found counter example.void
Visualize the learned Mealy machinevoid
writeDOTCex
(int index, Appendable a) Wirte the DOT of the found counter example.void
Wirte the DOT of the learned Mealy machine.void
Write the ETF of the learned Mealy machine.
-
Field Details
-
EDGE_PARSER
-
memOracle
-
verifiedSystem
-
learnedMealy
-
cexMealy
-
inputAlphabet
-
learner
-
eqOracle
-
properties
-
cexInput
-
cexProperty
-
cexOutput
-
modelChecker
-
timeoutOracles
-
timeout
-
-
Constructor Details
-
BlackBoxVerifier
public BlackBoxVerifier(de.learnlib.oracle.MembershipOracle.MealyMembershipOracle<String, String> memOracle, de.learnlib.sul.SUL<String, String> verifiedSystem, AdaptiveSTLUpdater<I> properties, net.automatalib.alphabet.Alphabet<String> inputAlphabet) - Parameters:
memOracle
- The membership oracleproperties
- The LTL properties to be verified. What we verify is the conjunction of the properties.inputAlphabet
- The input alphabet.
-
-
Method Details
-
addWpMethodEQOracle
public void addWpMethodEQOracle(int maxDepth) -
addBFOracle
public void addBFOracle(double multiplier) -
addRandomWordEQOracle
public void addRandomWordEQOracle(int minLength, int maxLength, int maxTests, Random random, int batchSize) -
addRandomWalkEQOracle
-
addCompleteExplorationEQOracle
public void addCompleteExplorationEQOracle(int minDepth, int maxDepth, int batchSize) -
addCornerCaseEQOracle
public EvaluationCountable.MealyEquivalenceOracle<String,String> addCornerCaseEQOracle(int length, int minStep) Add a corner case equivalence oracle.This oracle tries the corner case input, i.e., the inputs with the same values
- Parameters:
length
- The length of the input.minStep
- The minimum step of the corner case.
-
addEqOracle
-
setTimeout
public void setTimeout(long timeout) Set timeout to the equivalence oracle added next time.- Parameters:
timeout
- timeout in seconds.
-
run
public boolean run()- Returns:
- Returns
true
if and only if the given black-box system is verified i.e., no counter example is found.
-
writeDOTCex
Wirte the DOT of the found counter example.- Parameters:
a
- Write the DOT toa
- Throws:
IOException
- The exception by GraphDOT.write
-
writeDOTLearnedMealy
Wirte the DOT of the learned Mealy machine.- Parameters:
a
- Write the DOT toa
- Throws:
IOException
- The exception by GraphDOT.write
-
visualizeCex
public void visualizeCex(int index) Visualize the found counter example. -
visualizeLearnedMealy
public void visualizeLearnedMealy()Visualize the learned Mealy machine -
writeETFLearnedMealy
Write the ETF of the learned Mealy machine.- Parameters:
os
- Write the ETF toos
-
processMealy
private boolean processMealy()Set the counter example input/output.- Returns:
- Returns
true
if and only if the black-box system is verified i.e., no counter example is found for any system.
-