3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

force the new arithmetic solver for QF_LIA

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-07-09 16:33:48 -07:00
parent 567fbac27f
commit fc4627a24f
4 changed files with 14 additions and 14 deletions

View file

@ -166,7 +166,7 @@ namespace opt {
return true;
}
#define PASSERT(_e_) if (!(_e_)) { TRACE("opt", display(tout, r);); SASSERT(_e_); }
#define PASSERT(_e_) if (!(_e_)) { TRACE("opt1", display(tout, r); display(tout);); SASSERT(_e_); }
bool model_based_opt::invariant(unsigned index, row const& r) {
vector<var> const& vars = r.m_vars;
@ -539,7 +539,7 @@ namespace opt {
rational slack = (abs_src_c - rational::one()) * (abs_dst_c - rational::one());
rational dst_val = dst.m_value - x_val*dst_c;
rational src_val = src.m_value - x_val*src_c;
rational distance = src_c * dst_val + dst_c * src_val + slack;
rational distance = abs_src_c * dst_val + abs_dst_c * src_val + slack;
bool use_case1 = distance.is_nonpos() || abs_src_c.is_one() || abs_dst_c.is_one();
#if 0
@ -655,7 +655,10 @@ namespace opt {
void model_based_opt::normalize(unsigned row_id) {
row& r = m_rows[row_id];
if (r.m_vars.empty()) return;
if (r.m_vars.empty()) {
retire_row(row_id);
return;
}
if (r.m_type == t_mod) return;
rational g(abs(r.m_vars[0].m_coeff));
bool all_int = g.is_int();
@ -1092,6 +1095,7 @@ namespace opt {
for (unsigned idx : mod_rows) {
replace_var(idx, x, u);
SASSERT(invariant(idx, m_rows[idx]));
normalize(idx);
}
TRACE("opt1", display(tout << "tableau after replace x under mod\n"););
//
@ -1113,6 +1117,7 @@ namespace opt {
// x |-> D*y + u
replace_var(row_id, x, D, y, u);
visited.insert(row_id);
normalize(row_id);
}
}
TRACE("opt1", display(tout << "tableau after replace x by y := v" << y << "\n"););