Class RobustnessOracle

java.lang.Object
net.maswag.falcaun.oracle.RobustnessOracle
All Implemented Interfaces:
EvaluationCountable

public class RobustnessOracle extends Object implements 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:
  • Field Details

    • owner

      private final NumericMembershipOracle owner
    • costFunc

      private final Function<IOSignal<List<Double>>,Double> costFunc
    • robustnessCache

      private final net.automatalib.incremental.mealy.tree.IncrementalMealyTreeBuilder<String,Double> robustnessCache
    • evaluateCount

      private int evaluateCount
      The number of the SUL executions triggered by this oracle.
  • Constructor Details

  • Method Details

    • processQueryWithCost

      double processQueryWithCost(Query<String,net.automatalib.word.Word<String>> query)
      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.