3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-29 09:28:45 +00:00

cheap eqs

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-06-10 15:02:40 -07:00
parent 50b9915c57
commit 94263167ec
3 changed files with 17 additions and 34 deletions

View file

@ -253,6 +253,7 @@ namespace smt {
m_stats.m_fixed_eqs++;
propagate_eq_to_core(x, x2, ante);
}
//return;
}
if (k.is_zero() && y != null_theory_var && !is_equal(x, y) && is_int_src(x) == is_int_src(y)) {
@ -277,16 +278,10 @@ namespace smt {
numeral k2;
if (r2.get_base_var() != null_theory_var && is_offset_row(r2, x2, y2, k2)) {
bool new_eq = false;
#ifdef _TRACE
bool swapped = false;
#endif
if (y == y2 && k == k2) {
new_eq = true;
}
else if (y2 != null_theory_var) {
#ifdef _TRACE
swapped = true;
#endif
std::swap(x2, y2);
k2.neg();
if (y == y2 && k == k2) {
@ -301,7 +296,6 @@ namespace smt {
collect_fixed_var_justifications(r, ante);
collect_fixed_var_justifications(r2, ante);
TRACE("arith_eq", tout << "propagate eq two rows:\n";
tout << "swapped: " << swapped << "\n";
tout << "x : v" << x << "\n";
tout << "x2 : v" << x2 << "\n";
display_row_info(tout, r);
@ -312,9 +306,11 @@ namespace smt {
return;
}
}
// the original row was delete or it is not offset row anymore ===> remove it from table
m_var_offset2row_id.erase(key);
}
if (y == -1)
std::cout << "h";
// add new entry
m_var_offset2row_id.insert(key, rid);
}