3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-23 10:29:38 +00:00

We need to reset local conflicts

This commit is contained in:
CEisenhofer 2026-04-08 18:24:11 +02:00
parent 26ededa891
commit 86dc9d3268
4 changed files with 57 additions and 31 deletions

View file

@ -1315,6 +1315,11 @@ namespace seq {
SASSERT(depth <= cur_path.size());
m_stats.m_max_depth = std::max(m_stats.m_max_depth, depth);
if (node->is_general_conflict()) {
++m_stats.m_num_simplify_conflict;
return search_result::unsat;
}
// check for external cancellation (timeout, user interrupt)
if (!m.inc())
return search_result::unknown;
@ -1336,10 +1341,18 @@ namespace seq {
return search_result::unknown;
}
node->set_eval_idx(m_run_idx);
SASSERT(!node->is_general_conflict());
node->clear_local_conflict(); // clear local conflicts from previous runs
// we might need to tell the SAT solver about the new integer inequalities
// that might have been added by an extension step
assert_node_new_int_constraints(node);
if (node->is_currently_conflict()) {
++m_stats.m_num_simplify_conflict;
return search_result::unsat;
}
// simplify constraints (idempotent after first call)
const simplify_result sr = node->simplify_and_init(cur_path);

View file

@ -611,6 +611,13 @@ namespace seq {
(reason() != backtrack_reason::unevaluated && m_is_extended);
}
void clear_local_conflict() {
SASSERT(!is_general_conflict());
m_reason = backtrack_reason::unevaluated;
m_conflict_internal = nullptr;
m_conflict_external_literal = sat::null_literal;
}
backtrack_reason reason() const { return m_reason; }
void set_child_conflict() {

View file

@ -589,10 +589,10 @@ namespace seq {
out << ", color=green";
else if (n->is_general_conflict())
out << ", color=darkred";
else if (n->eval_idx() != m_run_idx) // inactive, not visited this run
out << ", color=blue";
else if (n->is_currently_conflict())
out << ", color=red";
else if (n->eval_idx() != m_run_idx) // inactive, not visited this run
out << ", color=blue";
out << "];\n";
}