SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
ParallelExplanation.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../utils/Bookkeeping.h"
4 
5 #include <carl-common/util/tuple_util.h>
7 
8 namespace smtrat {
9 namespace mcsat {
10 
11 template<typename... Backends>
13 private:
14  using B = std::tuple<Backends...>;
16 
17 public:
18  std::optional<Explanation> operator()(const mcsat::Bookkeeping& data, carl::Variable var, const FormulasT& reason, bool force_use_core) const {
19  auto F = [&](const auto& expl) {
20  auto r = expl(data, var, reason, force_use_core);
21  SMTRAT_LOG_DEBUG("smtrat.mcsat.explanation", "Got explanation " << r);
22  return r;
23  };
24  auto res = carl::tuple_foreach(F, mBackends);
25  carl::tuple_foreach(
26  [&res](const auto& ref) {
27  assert(std::get<0>(res) == ref);
28  return true;
29  },
30  mBackends);
31  return std::get<0>(res);
32  }
33 };
34 
35 } // namespace mcsat
36 } // namespace smtrat
Represent the trail, i.e.
Definition: Bookkeeping.h:19
int var(Lit p)
Definition: SolverTypes.h:64
Class to create the formulas for axioms.
carl::Formulas< Poly > FormulasT
Definition: types.h:39
#define SMTRAT_LOG_DEBUG(channel, msg)
Definition: logging.h:35
std::optional< Explanation > operator()(const mcsat::Bookkeeping &data, carl::Variable var, const FormulasT &reason, bool force_use_core) const