3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

don't add viable premises on decisions

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-11-25 20:19:58 +01:00
parent a4e29ecd7e
commit fc6e127cca
4 changed files with 13 additions and 10 deletions

View file

@ -298,12 +298,16 @@ namespace polysat {
return false;
}
auto const& j = s.m_justification[v];
s.inc_activity(v);
m_vars.remove(v);
for (auto const& c : s.m_viable.get_constraints(v))
insert(c);
if (!j.is_decision()) {
for (auto const& c : s.m_viable.get_constraints(v))
insert(c);
}
for (auto* engine : ex_engines)
if (engine->try_explain(v, *this))
@ -318,7 +322,7 @@ namespace polysat {
break;
}
set_bailout();
if (s.is_assigned(v) && s.m_justification[v].is_decision())
if (s.is_assigned(v) && j.is_decision())
m_vars.insert(v);
return false;
}

View file

@ -50,7 +50,6 @@ namespace polysat {
m_branch_bool = m_params.get_bool("branch_bool", false);
m_max_conflicts = m_params.get_uint("max_conflicts", UINT_MAX);
m_max_decisions = m_params.get_uint("max_decisions", UINT_MAX);
std::cout << m_max_conflicts << "\n";
}
bool solver::should_search() {

View file

@ -278,7 +278,6 @@ namespace polysat {
}
bool viable::resolve(pvar v, conflict& core) {
std::cout << "resolve " << v << "\n";
if (has_viable(v))
return false;
auto* e = m_viable[v];