3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-18 09:12:16 +00:00

propagation from containing slice depends on concrete values

This commit is contained in:
Jakob Rath 2024-03-15 12:31:31 +01:00
parent 2102db2df8
commit dfb200a3c9

View file

@ -598,7 +598,6 @@ namespace polysat {
VERIFY_EQ(e->src.size(), 1); VERIFY_EQ(e->src.size(), 1);
VERIFY_EQ(c.get_constraint(index), e->src[0]); VERIFY_EQ(c.get_constraint(index), e->src[0]);
result.push_back(c.get_dependency(index)); result.push_back(c.get_dependency(index));
// result.append(c.explain_weak_eval(c.get_constraint(index)));
} }
}; };
@ -637,17 +636,18 @@ namespace polysat {
// there is just one entry // there is just one entry
SASSERT(m_explain.size() == 1); SASSERT(m_explain.size() == 1);
explain_entry(last.e); explain_entry(last.e);
auto exp = propagate_from_containing_slice(last.e, last.value, result);
if (!exp.is_null()) { // assignment conflict and propagation from containing slice depends on concrete values,
result.clear(); // so we also need the evaluations of linear terms
result.push_back(exp);
}
else {
// could not propagate to subslice
// conflict depends on evaluation
auto index = last.e->constraint_index; auto index = last.e->constraint_index;
if (!index.is_null()) if (!index.is_null())
result.append(c.explain_weak_eval(c.get_constraint(index))); result.append(c.explain_weak_eval(c.get_constraint(index)));
auto exp = propagate_from_containing_slice(last.e, last.value, result);
// verbose_stream() << "exp is " << exp << "\n";
if (!exp.is_null()) {
result.clear();
result.push_back(exp);
} }
} }
unmark(); unmark();