10 #include "equivalence_oracle.hh"
11 #include "symbolic_membership_oracle.hh"
12 #include "observation_table.hh"
20 std::unique_ptr<EquivalenceOracle> eqOracle;
23 Learner(
const std::vector<Alphabet> &alphabet,
24 std::unique_ptr<SymbolicMembershipOracle> memOracle,
25 std::unique_ptr<EquivalenceOracle> eqOracle) : eqOracle(std::move(eqOracle)),
26 observationTable(alphabet, std::move(memOracle)) {}
32 notUpdated = observationTable.
close();
33 notUpdated = notUpdated && observationTable.
consistent();
35 notUpdated = notUpdated && observationTable.
timeSaturate();
37 }
while (!notUpdated);
38 BOOST_LOG_TRIVIAL(debug) <<
"Start DTA generation";
40 BOOST_LOG_TRIVIAL(debug) <<
"Hypothesis before simplification\n" << hypothesis;
42 BOOST_LOG_TRIVIAL(debug) <<
"Hypothesis before zone-based simplification\n" << hypothesis;
44 BOOST_LOG_TRIVIAL(info) <<
"The learner generated a hypothesis\n" << hypothesis;
45 assert(hypothesis.deterministic());
46 const auto counterExample = eqOracle->findCounterExample(hypothesis);
49 BOOST_LOG_TRIVIAL(info) <<
"Equivalence oracle returned a counter example: " << counterExample.value();
50 observationTable.
handleCEX(counterExample.value());
57 std::ostream &printStatistics(std::ostream &stream)
const {
58 this->observationTable.printStatistics(stream);
59 this->eqOracle->printStatistics(stream);
64 [[nodiscard]] std::size_t numEqQueries()
const {
65 return this->eqOracle->numEqQueries();
The deterministic timed automata learner.
Definition: learner.hh:18
Timed observation table.
Definition: observation_table.hh:43
bool exteriorConsistent()
Make the observation table exterior-consistent.
Definition: observation_table.hh:557
bool timeSaturate()
Make the observation table time-saturated.
Definition: observation_table.hh:594
TimedAutomaton generateHypothesis()
Construct a hypothesis DTA from the current timed observation table.
Definition: observation_table.hh:832
void handleCEX(const TimedWord &cex)
Refine the suffixes by the given counterexample.
Definition: observation_table.hh:717
bool close()
Close the observation table.
Definition: observation_table.hh:317
bool consistent()
Make the observation table consistent.
Definition: observation_table.hh:522
Definition: experiment_runner.hh:23
A timed automaton.
Definition: timed_automaton.hh:213
TimedAutomaton simplifyStrong()
Simplify the timed automaton.
Definition: timed_automaton.hh:613
TimedAutomaton simplifyWithZones()
Simplify the timed automaton.
Definition: timed_automaton.cc:51