3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-04 06:15:46 +00:00

fix some bugs

This commit is contained in:
Jakob Rath 2022-03-18 16:05:51 +01:00
parent fd353bff17
commit d41d3fa6ea
2 changed files with 12 additions and 5 deletions

View file

@ -738,15 +738,17 @@ namespace polysat {
void viable_fallback::push_var(unsigned sz) {
auto& mk_solver = *m_usolver_factory;
m_usolver.push_back(mk_solver(sz));
m_constraints.push_back({});
}
void viable_fallback::pop_var() {
m_usolver.pop_back();
m_constraints.pop_back();
}
void viable_fallback::push_constraint(pvar v, signed_constraint const& c) {
// v is the only unassigned variable in c.
SASSERT(!s.is_assigned(v));
SASSERT(c->vars().size() == 1 || !s.is_assigned(v));
DEBUG_CODE(for (pvar w : c->vars()) { if (v != w) SASSERT(s.is_assigned(w)); });
auto& us = *m_usolver[v];
// TODO: would be enough to push the solver only for new decision levels