3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-08 20:21:23 +00:00

add laxer check for oeq_quant_intro

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-06-27 11:24:56 -07:00
parent ea4218a192
commit 20fc573d5b
8 changed files with 95 additions and 103 deletions

View file

@ -41,7 +41,7 @@ namespace qe {
bool m_check_purified; // check that variables are properly pure
void insert_mul(expr* x, rational const& v, obj_map<expr, rational>& ts) {
TRACE("qe", tout << "Adding variable " << mk_pp(x, m) << " " << v << "\n";);
// TRACE("qe", tout << "Adding variable " << mk_pp(x, m) << " " << v << "\n";);
rational w;
if (ts.find(x, w)) {
ts.insert(x, w + v);
@ -92,8 +92,8 @@ namespace qe {
rational r1, r2;
expr_ref val1 = eval(e1);
expr_ref val2 = eval(e2);
TRACE("qe", tout << mk_pp(e1, m) << " " << val1 << "\n";);
TRACE("qe", tout << mk_pp(e2, m) << " " << val2 << "\n";);
//TRACE("qe", tout << mk_pp(e1, m) << " " << val1 << "\n";);
//TRACE("qe", tout << mk_pp(e2, m) << " " << val2 << "\n";);
if (!a.is_numeral(val1, r1)) return false;
if (!a.is_numeral(val2, r2)) return false;
SASSERT(r1 != r2);
@ -306,14 +306,14 @@ namespace qe {
return vector<def>();
}
model_evaluator eval(model);
TRACE("qe", model_smt2_pp(tout, m, model, 0););
TRACE("qe", tout << model;);
// eval.set_model_completion(true);
opt::model_based_opt mbo;
obj_map<expr, unsigned> tids;
expr_ref_vector pinned(m);
unsigned j = 0;
TRACE("qe", tout << "fmls: " << fmls << "\n";);
TRACE("qe", tout << "vars: " << vars << "\nfmls: " << fmls << "\n";);
for (unsigned i = 0; i < fmls.size(); ++i) {
expr * fml = fmls.get(i);
if (!linearize(mbo, eval, fml, fmls, tids)) {
@ -325,7 +325,6 @@ namespace qe {
}
}
fmls.shrink(j);
TRACE("qe", tout << "linearized: " << fmls << "\n";);
// fmls holds residue,
// mbo holds linear inequalities that are in scope