Package net.maswag.falcaun.oracle
Class RobustnessOracle
java.lang.Object
net.maswag.falcaun.oracle.RobustnessOracle
- All Implemented Interfaces:
EvaluationCountable
Answers membership queries together with the robustness value for a cost function.
The SUL is executed by the NumericMembershipOracle that created this oracle. This oracle owns only the
robustness cache for its cost function, which maps an abstract input word to the robustness values of its prefixes.
The cache is filled by the executions requested by this oracle or by the oracles registered before it.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.maswag.falcaun.oracle.EvaluationCountable
EvaluationCountable.MealyEquivalenceOracle<I,O>, EvaluationCountable.Sum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe number of the SUL executions triggered by this oracle.private final NumericMembershipOracle -
Constructor Summary
ConstructorsConstructorDescriptionRobustnessOracle(NumericMembershipOracle owner, Function<IOSignal<List<Double>>, Double> costFunc, net.automatalib.alphabet.Alphabet<String> abstractAlphabet) -
Method Summary
Modifier and TypeMethodDescription(package private) voidinsert(net.automatalib.word.Word<String> abstractInput, net.automatalib.word.Word<Double> robustness) Inserts the robustness values of the prefixes of an executed word.(package private) doubleprocessQueryWithCost(Query<String, net.automatalib.word.Word<String>> query) Answers the query and returns the robustness value of its input word.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.maswag.falcaun.oracle.EvaluationCountable
getEvaluateCount
-
Field Details
-
owner
-
costFunc
-
robustnessCache
-
evaluateCount
private int evaluateCountThe number of the SUL executions triggered by this oracle.
-
-
Constructor Details
-
RobustnessOracle
-
-
Method Details
-
processQueryWithCost
Answers the query and returns the robustness value of its input word.The SUL is executed if the abstract output or the robustness value is not cached, or if the cached robustness value is infinite.
- Parameters:
query- the query to answer- Returns:
- the robustness value of the input word of the query
-
insert
void insert(net.automatalib.word.Word<String> abstractInput, net.automatalib.word.Word<Double> robustness) Inserts the robustness values of the prefixes of an executed word. This is called by the owner.
-