3 #include <carl-common/datastructures/Bitset.h>
4 #include <carl-covering/carl-covering.h>
18 template<
typename Solver>
24 std::size_t mAssignments = 0;
29 for (
const auto& f : fs) {
30 auto it = mFormulas.emplace(carl::fresh_boolean_variable(), f);
31 phis.emplace_back(
FormulaT(it.first->first));
33 SMTRAT_LOG_DEBUG(
"smtrat.unsatcore", it.first->first <<
" <-> " << f <<
" with id " <<
id);
40 const auto& m = mSolver.model();
43 for (
const auto& f: mFormulas) {
45 const auto& val = m.evaluated(f.first);
48 subs.emplace_back(
FormulaT(f.first));
49 mSetCover.set(f.second, mAssignments);
58 Answer a = mSolver.check();
67 assert(
false &&
"solver should not be in optimization mode");
75 std::pair<Answer, FormulasT>
run() {
80 auto covering = mSetCover.get_cover([](
auto& sc) {
82 res |= carl::covering::heuristic::remove_duplicates(sc);
83 res |= carl::covering::heuristic::select_essential(sc);
84 res |= carl::covering::heuristic::greedy(sc);
std::map< carl::Variable, FormulaT > mFormulas
UnsatCoreBackend(Solver &s, const FormulasT &fs)
carl::covering::TypedSetCover< FormulaT > mSetCover
std::pair< Answer, FormulasT > run()
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
Answer
An enum with the possible answers a Module can give.
carl::Formulas< Poly > FormulasT
#define SMTRAT_LOG_TRACE(channel, msg)
#define SMTRAT_LOG_INFO(channel, msg)
#define SMTRAT_LOG_ERROR(channel, msg)
#define SMTRAT_LOG_DEBUG(channel, msg)