mirror of
https://github.com/Z3Prover/z3
synced 2026-02-26 10:05:38 +00:00
align use_list with number of variables during flatten, push clause and bool_vars_of addition into clause and atom creation time.
This commit is contained in:
parent
7fc59b65ad
commit
a7010574c8
6 changed files with 72 additions and 38 deletions
|
|
@ -275,8 +275,8 @@ namespace sls {
|
|||
DEBUG_CODE(
|
||||
for (sat::bool_var bv = 0; bv < ctx.num_bool_vars(); ++bv) {
|
||||
if (a.get_ineq(bv) && a.get_ineq(bv)->is_true() != ctx.is_true(bv)) {
|
||||
TRACE("arith", tout << bv << " " << *a.get_ineq(bv) << "\n";
|
||||
tout << a.m_vars[v].m_bool_vars_of << "\n");
|
||||
TRACE("arith", tout << "bv:" << bv << " " << *a.get_ineq(bv) << ctx.is_true(bv) << "\n";
|
||||
tout << "bool vars: " << a.m_vars[v].m_bool_vars_of << "\n");
|
||||
}
|
||||
VERIFY(!a.get_ineq(bv) || a.get_ineq(bv)->is_true() == ctx.is_true(bv));
|
||||
});
|
||||
|
|
@ -349,7 +349,6 @@ namespace sls {
|
|||
vi.set_value(vi.m_hi->value);
|
||||
else
|
||||
vi.set_value(num_t(0));
|
||||
vi.m_bool_vars_of.reset();
|
||||
}
|
||||
initialize();
|
||||
}
|
||||
|
|
@ -365,6 +364,14 @@ namespace sls {
|
|||
m_no_improve = 0;
|
||||
m_no_improve_bool = 0;
|
||||
m_no_improve_arith = 0;
|
||||
for (; m_num_clauses < ctx.clauses().size(); ++m_num_clauses) {
|
||||
auto const& c = ctx.get_clause(m_num_clauses);
|
||||
for (auto lit : c) {
|
||||
auto bv = lit.var();
|
||||
if (a.get_ineq(bv))
|
||||
a.initialize_clauses_of(bv, m_num_clauses);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue