15 template<
class Settings>
18 #ifdef SMTRAT_DEVOPTION_Statistics
19 SMTAFStatistics& mStatistics = statistics_get<SMTAFStatistics>(
"mcsat-assignment-smt");
23 SMTRAT_LOG_DEBUG(
"smtrat.mcsat.smtaf",
"Looking for an assignment for " <<
var <<
" with assignAllVariables = " << Settings::assignAllVariables);
25 #ifdef SMTRAT_DEVOPTION_Statistics
34 std::vector<carl::Variable> varsToAssign;
35 if (Settings::assignAllVariables) {
36 carl::Variables unassignedVars(data.
variables());
38 unassignedVars.erase(v);
40 assert(unassignedVars.find(
var) != unassignedVars.end());
41 varsToAssign.insert(varsToAssign.begin(), unassignedVars.begin(), unassignedVars.end());
43 varsToAssign.push_back(
var);
46 assert(varPos != varsToAssign.end());
49 assert(varPos != varPosEnd);
55 if (indeterminate(res)) {
56 SMTRAT_LOG_TRACE(
"smtrat.mcsat.smtaf",
"Constraint " << c <<
" cannot be handled!");
59 SMTRAT_LOG_DEBUG(
"smtrat.mcsat.smtaf",
"No Assignment, built conflicting core " << c <<
" under model " << data.
model());
64 for (
const auto& c: data.
mvBounds()) {
67 if (indeterminate(res)) {
68 SMTRAT_LOG_TRACE(
"smtrat.mcsat.smtaf",
"MVBound " << c <<
" cannot be handled!");
71 SMTRAT_LOG_DEBUG(
"smtrat.mcsat.smtaf",
"No Assignment, built conflicting core " << c <<
" under model " << data.
model());
77 std::optional<AssignmentOrConflict>
result;
78 if (Settings::advance_level_by_level) {
83 #ifdef SMTRAT_DEVOPTION_Statistics
85 mStatistics.success();
Represent the trail, i.e.
const auto & assignedVariables() const
const auto & constraints() const
const auto & variables() const
const auto & model() const
const auto & mvBounds() const
boost::tribool addConstraint(const FormulaT &f)
std::optional< AssignmentOrConflict > findAssignment(const VariablePos excludeVar) const
boost::tribool addMVBound(const FormulaT &f)
static bool find(V &ts, const T &t)
std::vector< carl::Variable >::const_iterator VariablePos
std::variant< ModelValues, FormulasT > AssignmentOrConflict
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Formulas< Poly > FormulasT
#define SMTRAT_LOG_TRACE(channel, msg)
#define SMTRAT_LOG_DEBUG(channel, msg)
std::optional< AssignmentOrConflict > operator()(const mcsat::Bookkeeping &data, carl::Variable var) const
bool active(const mcsat::Bookkeeping &, const FormulaT &) const
static constexpr bool advance_level_by_level
If set to true, a conflict on the lowest possible level is returned.
static constexpr unsigned int assignAllVariables