mirror of
https://github.com/Z3Prover/z3
synced 2026-01-24 19:14:00 +00:00
Refactor mk_and/mk_or call sites to use vector overloads (#8286)
* Initial plan * Refactor mk_and and mk_or call sites to use overloaded methods Changed 130 call sites across 64 files to use vector overloads directly instead of manually passing .size() and .data()/.c_ptr() Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Revert mk_or changes for ptr_buffer/ptr_vector (no overload exists in ast_util.h) * Fix compilation errors from mk_and/mk_or refactoring Fixed type mismatches by: - Removing m parameter for expr_ref_vector (ast_util.h has mk_and/mk_or(expr_ref_vector) overloads) - Reverting changes for ref_buffer types (no overload exists in ast_util.h, only in ast.h for m.mk_and) - Verified build succeeds and Z3 works correctly Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix test files to use correct mk_and/mk_or overloads Changed test/doc.cpp and test/udoc_relation.cpp to use mk_and(expr_ref_vector) and mk_or(expr_ref_vector) without m parameter Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
d2e0354ce4
commit
ebc0688470
61 changed files with 118 additions and 118 deletions
|
|
@ -170,7 +170,7 @@ bool proof_checker::check1_spc(proof* p, expr_ref_vector& side_conditions) {
|
|||
}
|
||||
}
|
||||
expr_ref rewrite_cond(m);
|
||||
rewrite_cond = m.mk_or(rewrite_eq.size(), rewrite_eq.c_ptr());
|
||||
rewrite_cond = m.mk_or(rewrite_eq);
|
||||
side_conditions.push_back(rewrite_cond.get());
|
||||
return true;
|
||||
}
|
||||
|
|
@ -431,7 +431,7 @@ bool proof_checker::check1_basic(proof* p, expr_ref_vector& side_conditions) {
|
|||
}
|
||||
}
|
||||
expr_ref rewrite_cond(m);
|
||||
rewrite_cond = m.mk_or(rewrite_eq.size(), rewrite_eq.data());
|
||||
rewrite_cond = m.mk_or(rewrite_eq);
|
||||
side_conditions.push_back(rewrite_cond.get());
|
||||
return true;
|
||||
}
|
||||
|
|
@ -819,7 +819,7 @@ bool proof_checker::check1_basic(proof* p, expr_ref_vector& side_conditions) {
|
|||
fmls[i] = premise1;
|
||||
}
|
||||
fmls[0] = premise0;
|
||||
premise0 = m.mk_or(fmls.size(), fmls.data());
|
||||
premise0 = m.mk_or(fmls);
|
||||
if (is_forall(conclusion)) {
|
||||
quantifier* q = to_quantifier(conclusion);
|
||||
premise0 = m.mk_iff(premise0, q->get_expr());
|
||||
|
|
@ -861,7 +861,7 @@ void proof_checker::set_false(expr_ref& e, unsigned position, expr_ref& lit) {
|
|||
args.append(a->get_num_args(), a->get_args());
|
||||
lit = args[position].get();
|
||||
args[position] = m.mk_false();
|
||||
e = m.mk_or(args.size(), args.data());
|
||||
e = m.mk_or(args);
|
||||
}
|
||||
else if (m.is_implies(e, body, head)) {
|
||||
expr* const* heads = &head;
|
||||
|
|
@ -880,14 +880,14 @@ void proof_checker::set_false(expr_ref& e, unsigned position, expr_ref& lit) {
|
|||
args.append(num_heads, heads);
|
||||
lit = args[position].get();
|
||||
args[position] = m.mk_false();
|
||||
e = m.mk_implies(body, m.mk_or(args.size(), args.data()));
|
||||
e = m.mk_implies(body, m.mk_or(args));
|
||||
}
|
||||
else {
|
||||
position -= num_heads;
|
||||
args.append(num_bodies, bodies);
|
||||
lit = m.mk_not(args[position].get());
|
||||
args[position] = m.mk_true();
|
||||
e = m.mk_implies(m.mk_and(args.size(), args.data()), head);
|
||||
e = m.mk_implies(m.mk_and(args), head);
|
||||
}
|
||||
}
|
||||
else if (position == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue