3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

Fix bug in weak abs

Must ensure that weak model makes all summaries true. Otherwise,
it is possible to get stuck discovering the same lemma forever.
This commit is contained in:
Arie Gurfinkel 2018-06-08 23:37:16 -07:00
parent df7ab0e496
commit 8445e2a7a2
2 changed files with 8 additions and 3 deletions

View file

@ -1166,6 +1166,10 @@ expr_ref pred_transformer::get_origin_summary (model_evaluator_util &mev,
summary[i] = v;
}
// bail out of if the model is insufficient
if (!mev.is_true(summary))
return expr_ref(m);
// -- pick an implicant
expr_ref_vector lits(m);
compute_implicant_literals (mev, summary, lits);
@ -3722,6 +3726,10 @@ bool context::create_children(pob& n, datalog::rule const& r,
expr_ref sum(m);
sum = pt.get_origin_summary (mev, prev_level(n.level()),
j, reach_pred_used[j], &aux);
if (!sum) {
dealloc(deriv);
return false;
}
deriv->add_premise (pt, j, sum, reach_pred_used[j], aux);
}

View file

@ -350,9 +350,6 @@ class pred_transformer {
};
typedef obj_map<datalog::rule const, expr*> rule2expr;
typedef obj_map<datalog::rule const, ptr_vector<app> > rule2apps;
typedef obj_map<expr, datalog::rule const*> expr2rule;
manager& pm; // spacer::manager
ast_manager& m; // ast_manager
context& ctx; // spacer::context