LearnTA  0.0.1
equivalance_oracle_chain.hh
1 
6 #pragma once
7 
8 #include <vector>
9 
10 #include "equivalence_oracle.hh"
11 
12 namespace learnta {
17  std::vector<std::unique_ptr<EquivalenceOracle>> oracles;
18  public:
22  [[nodiscard]] std::optional<TimedWord> findCounterExample(const TimedAutomaton &hypothesis) override {
23  ++eqQueryCount;
24  for (const auto &oracle: this->oracles) {
25  auto result = oracle->findCounterExample(hypothesis);
26  if (result) {
27  return result;
28  }
29  }
30 
31  return std::nullopt;
32  }
33 
34  void push_back(std::unique_ptr<EquivalenceOracle> &&oracle) {
35  oracles.push_back(std::move(oracle));
36  }
37  };
38 }
A chain of the equivalence oracles.
Definition: equivalance_oracle_chain.hh:16
std::optional< TimedWord > findCounterExample(const TimedAutomaton &hypothesis) override
Make an equivalence query.
Definition: equivalance_oracle_chain.hh:22
Interface of the equivalence oracle.
Definition: equivalence_oracle.hh:17
Definition: experiment_runner.hh:23
A timed automaton.
Definition: timed_automaton.hh:213