Package net.maswag.falcaun
Class SAEQOracle
java.lang.Object
net.maswag.falcaun.AbstractSelectEQOracle
net.maswag.falcaun.HillClimbingEQOracle
net.maswag.falcaun.SAEQOracle
- All Implemented Interfaces:
EquivalenceOracle<net.automatalib.automaton.transducer.MealyMachine<?,,String, ?, String>, String, net.automatalib.word.Word<String>> EquivalenceOracle.MealyEquivalenceOracle<String,,String> EvaluationCountable,EvaluationCountable.MealyEquivalenceOracle<String,String>
Answer the Equivalence query by simulated annealing
- Author:
- Masaki Waga
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.learnlib.oracle.EquivalenceOracle
EquivalenceOracle.DFAEquivalenceOracle<I extends Object>, EquivalenceOracle.MealyEquivalenceOracle<I extends Object,O extends Object>, EquivalenceOracle.MooreEquivalenceOracle<I extends Object, O extends Object> Nested classes/interfaces inherited from interface net.maswag.falcaun.EvaluationCountable
EvaluationCountable.MealyEquivalenceOracle<I,O>, EvaluationCountable.Sum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate doubleprivate intFields inherited from class net.maswag.falcaun.AbstractSelectEQOracle
childrenSize, generationSize, memOracle, random, resetWord, symbolList -
Constructor Summary
ConstructorsConstructorDescriptionSAEQOracle(NumericMembershipOracleCost memOracle, int length, Random random, int maxTests, int generationSize, int childrenSize, boolean resetWord, double alpha) Constructor for SAEQOracle.SAEQOracle(NumericMembershipOracleCost memOracle, int length, Random random, int maxTests, int generationSize, int childrenSize, boolean resetWord, double alpha, PropertyOracle.MealyPropertyOracle<String, String, String> ltlOracle) -
Method Summary
Modifier and TypeMethodDescriptioncreateNextGeneration(List<net.automatalib.word.Word<String>> goodSamples) Generates the next set of test cases based on the provided list of successful (good) samples.private doubleprivate booleanshouldPick(double srcCost, double dstCost) Methods inherited from class net.maswag.falcaun.HillClimbingEQOracle
neighborhoodStreamMethods inherited from class net.maswag.falcaun.AbstractSelectEQOracle
findCounterExampleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.maswag.falcaun.EvaluationCountable
getEvaluateCount
-
Field Details
-
alpha
private double alpha -
maxIteration
private int maxIteration -
iteration
private double iteration
-
-
Constructor Details
-
SAEQOracle
public SAEQOracle(NumericMembershipOracleCost memOracle, int length, Random random, int maxTests, int generationSize, int childrenSize, boolean resetWord, double alpha) Constructor for SAEQOracle.
- Parameters:
memOracle- aNumericMembershipOracleCostobject.length- a int.random- aRandomobject.maxTests- a int.generationSize- a int.childrenSize- a int.resetWord- a boolean.alpha- a double.
-
SAEQOracle
SAEQOracle(NumericMembershipOracleCost memOracle, int length, Random random, int maxTests, int generationSize, int childrenSize, boolean resetWord, double alpha, PropertyOracle.MealyPropertyOracle<String, String, String> ltlOracle)
-
-
Method Details
-
createNextGeneration
protected List<net.automatalib.word.Word<String>> createNextGeneration(List<net.automatalib.word.Word<String>> goodSamples) Generates the next set of test cases based on the provided list of successful (good) samples. This method is responsible for creating new test cases that are derived from the current set of successful samples, ensuring a diverse and evolving set of test cases.- Overrides:
createNextGenerationin classHillClimbingEQOracle- Parameters:
goodSamples- A list of successful test cases used as the basis for generating the next generation of test cases.- Returns:
- A list of newly generated test cases for the next evaluation cycle.
-
shouldPick
private boolean shouldPick(double srcCost, double dstCost) - Parameters:
srcCost- the cost of srcdstCost- the cost of dst- Returns:
- if we should transit from src to dst. We followed the algorithm in https://ja.wikipedia.org/wiki/%E7%84%BC%E3%81%8D%E3%81%AA%E3%81%BE%E3%81%97%E6%B3%95 .
-
onlyEval
-