mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
tweak control flow for empty clauses
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
48deb4d3e0
commit
6c8b8609ee
2 changed files with 7 additions and 4 deletions
|
@ -40,7 +40,6 @@ namespace sat {
|
||||||
conflict_analysis_core(m_conflict, m_conflict_clause);
|
conflict_analysis_core(m_conflict, m_conflict_clause);
|
||||||
m_trail.pop_back();
|
m_trail.pop_back();
|
||||||
|
|
||||||
|
|
||||||
for (unsigned i = m_trail.size(); i-- > 0; ) {
|
for (unsigned i = m_trail.size(); i-- > 0; ) {
|
||||||
auto const& [id, cl, clp, is_add, is_initial] = m_trail[i];
|
auto const& [id, cl, clp, is_add, is_initial] = m_trail[i];
|
||||||
if (!is_add) {
|
if (!is_add) {
|
||||||
|
@ -384,13 +383,17 @@ namespace sat {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (all_of(m_clause, [&](sat::literal lit) { return s.value(lit) == l_false; }))
|
||||||
|
return;
|
||||||
if (m_clause.size() == 2 && is_unit2())
|
if (m_clause.size() == 2 && is_unit2())
|
||||||
s.propagate_bin_clause(m_clause[0], m_clause[1]);
|
s.propagate_bin_clause(m_clause[0], m_clause[1]);
|
||||||
else if (m_clause.size() > 2 && is_unit())
|
else if (m_clause.size() > 2 && is_unit())
|
||||||
s.propagate_clause(*cl, true, 0, s.cls_allocator().get_offset(cl));
|
s.propagate_clause(*cl, true, 0, s.cls_allocator().get_offset(cl));
|
||||||
s.propagate(false);
|
s.propagate(false);
|
||||||
if (s.inconsistent() || all_of(m_clause, [&](sat::literal lit) { return s.value(lit) == l_false; }))
|
if (s.inconsistent() || all_of(m_clause, [&](sat::literal lit) { return s.value(lit) == l_false; })) {
|
||||||
set_conflict(m_clause, cl);
|
IF_VERBOSE(3, verbose_stream() << "conflict " << m_clause << "\n");
|
||||||
|
set_conflict(m_clause, cl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -272,7 +272,7 @@ namespace euf {
|
||||||
|
|
||||||
if (create_hint) {
|
if (create_hint) {
|
||||||
log_justifications(l, ez, is_euf);
|
log_justifications(l, ez, is_euf);
|
||||||
if (reduced || multiple_theories)
|
if (l != sat::null_literal && (reduced || multiple_theories))
|
||||||
log_rup(l, r);
|
log_rup(l, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue