mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 08:35:31 +00:00
update assign to check fixed bits afterwards
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
42aad423c9
commit
a68bbb53e4
1 changed files with 24 additions and 12 deletions
|
@ -90,20 +90,31 @@ namespace polysat {
|
|||
m_fixed_bits.init(v);
|
||||
m_explain.reset();
|
||||
init_overlaps(v);
|
||||
check_fixed_bits(v, value);
|
||||
check_disequal_lin(v, value);
|
||||
check_equal_lin(v, value);
|
||||
for (auto const& [w, offset] : m_overlaps) {
|
||||
for (auto& layer : m_units[w].get_layers()) {
|
||||
entry* e = find_overlap(w, layer, value);
|
||||
if (!e)
|
||||
continue;
|
||||
|
||||
m_explain.push_back({ e, value });
|
||||
m_explain_kind = explain_t::assignment;
|
||||
return false;
|
||||
bool first = true;
|
||||
while (true) {
|
||||
for (auto const& [w, offset] : m_overlaps) {
|
||||
for (auto& layer : m_units[w].get_layers()) {
|
||||
entry* e = find_overlap(w, layer, value);
|
||||
if (!e)
|
||||
continue;
|
||||
|
||||
m_explain.push_back({ e, value });
|
||||
m_explain_kind = explain_t::assignment;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!first)
|
||||
return true;
|
||||
first = false;
|
||||
if (!check_fixed_bits(v, value))
|
||||
continue;
|
||||
if (!check_disequal_lin(v, value))
|
||||
continue;
|
||||
if (!check_equal_lin(v, value))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -397,6 +408,7 @@ namespace polysat {
|
|||
if (!intersect(v, e)) {
|
||||
display(verbose_stream());
|
||||
display_explain(verbose_stream() << "explain\n");
|
||||
UNREACHABLE();
|
||||
SASSERT(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue