mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 22:23:22 +00:00
update to avoid difference in debug/release builds
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
480296ed96
commit
4132c44f8d
1 changed files with 9 additions and 3 deletions
|
@ -2842,11 +2842,13 @@ namespace sat {
|
||||||
|
|
||||||
bool ba_solver::validate_lemma() {
|
bool ba_solver::validate_lemma() {
|
||||||
int val = -m_bound;
|
int val = -m_bound;
|
||||||
normalize_active_coeffs();
|
while (!m_active_var_set.empty()) m_active_var_set.erase();
|
||||||
for (bool_var v : m_active_vars) {
|
for (bool_var v : m_active_vars) {
|
||||||
|
if (m_active_var_set.contains(v)) continue;
|
||||||
int coeff = get_coeff(v);
|
int coeff = get_coeff(v);
|
||||||
|
if (coeff == 0) continue;
|
||||||
|
m_active_var_set.insert(v);
|
||||||
literal lit(v, false);
|
literal lit(v, false);
|
||||||
SASSERT(coeff != 0);
|
|
||||||
if (coeff < 0 && value(lit) != l_true) {
|
if (coeff < 0 && value(lit) != l_true) {
|
||||||
val -= coeff;
|
val -= coeff;
|
||||||
}
|
}
|
||||||
|
@ -2859,9 +2861,13 @@ namespace sat {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ba_solver::active2pb(ineq& p) {
|
void ba_solver::active2pb(ineq& p) {
|
||||||
normalize_active_coeffs();
|
while (!m_active_var_set.empty()) m_active_var_set.erase();
|
||||||
p.reset(m_bound);
|
p.reset(m_bound);
|
||||||
for (bool_var v : m_active_vars) {
|
for (bool_var v : m_active_vars) {
|
||||||
|
if (m_active_var_set.contains(v)) continue;
|
||||||
|
int coeff = get_coeff(v);
|
||||||
|
if (coeff == 0) continue;
|
||||||
|
m_active_var_set.insert(v);
|
||||||
literal lit(v, get_coeff(v) < 0);
|
literal lit(v, get_coeff(v) < 0);
|
||||||
p.m_lits.push_back(lit);
|
p.m_lits.push_back(lit);
|
||||||
p.m_coeffs.push_back(get_abs_coeff(v));
|
p.m_coeffs.push_back(get_abs_coeff(v));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue