3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-05 17:14:07 +00:00

inherit weights

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-11-14 09:32:46 -08:00
parent 784e2721dd
commit 1a9dfc5e80
3 changed files with 3 additions and 3 deletions

View file

@ -401,7 +401,7 @@ quantifier::quantifier(unsigned num_decls, sort * const * decl_sorts, symbol con
m_expr(body),
m_sort(s),
m_depth(::get_depth(body) + 1),
m_weight(0),
m_weight(1),
m_has_unused_vars(true),
m_has_labels(::has_labels(body)),
m_qid(symbol()),

View file

@ -740,7 +740,7 @@ struct purify_arith_proc {
scoped_ptr<expr_replacer> replacer = mk_default_expr_replacer(m());
replacer->set_substitution(&subst);
(*replacer)(new_body, new_body);
new_body = m().mk_exists(num_vars, sorts.c_ptr(), names.c_ptr(), new_body);
new_body = m().mk_exists(num_vars, sorts.c_ptr(), names.c_ptr(), new_body, q->get_weight());
result = m().update_quantifier(q, new_body);
if (m_produce_proofs) {
proof_ref_vector & cnstr_prs = r.cfg().m_new_cnstr_prs;

View file

@ -469,7 +469,7 @@ private:
}
if (has_new_var) {
sub(new_body, result);
result = m.mk_quantifier(old_q->get_kind(), new_sorts.size(), new_sorts.c_ptr(), old_q->get_decl_names(), result);
result = m.mk_quantifier(old_q->get_kind(), new_sorts.size(), new_sorts.c_ptr(), old_q->get_decl_names(), result, old_q->get_weight());
result_pr = nullptr;
return true;
}