mirror of
https://github.com/Z3Prover/z3
synced 2026-02-19 23:14:40 +00:00
Standardize for-loop increments to prefix form (++i) (#8199)
* Initial plan * Convert postfix to prefix increment in for loops Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix member variable increment conversion bug Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Update API generator to produce prefix increments 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
851b8ea31c
commit
317dd92105
475 changed files with 3237 additions and 3237 deletions
|
|
@ -148,7 +148,7 @@ namespace smt {
|
|||
|
||||
void context::display_watch_lists(std::ostream & out) const {
|
||||
unsigned s = m_watches.size();
|
||||
for (unsigned l_idx = 0; l_idx < s; l_idx++) {
|
||||
for (unsigned l_idx = 0; l_idx < s; ++l_idx) {
|
||||
literal l = to_literal(l_idx);
|
||||
display_watch_list(out, l);
|
||||
out << "\n";
|
||||
|
|
@ -164,7 +164,7 @@ namespace smt {
|
|||
|
||||
void context::display_bool_var_defs(std::ostream & out) const {
|
||||
unsigned num = get_num_bool_vars();
|
||||
for (unsigned v = 0; v < num; v++) {
|
||||
for (unsigned v = 0; v < num; ++v) {
|
||||
expr * n = m_bool_var2expr[v];
|
||||
ast_def_ll_pp(out << v << " ", m, n, get_pp_visited(), true, false);
|
||||
}
|
||||
|
|
@ -292,7 +292,7 @@ namespace smt {
|
|||
if (!m_e_internalized_stack.empty()) {
|
||||
out << "expression -> enode:\n";
|
||||
unsigned sz = m_e_internalized_stack.size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
expr * n = m_e_internalized_stack.get(i);
|
||||
out << "(#" << n->get_id() << " -> e!" << i << ") ";
|
||||
}
|
||||
|
|
@ -304,7 +304,7 @@ namespace smt {
|
|||
if (!m_b_internalized_stack.empty()) {
|
||||
out << "expression -> bool_var:\n";
|
||||
unsigned sz = m_b_internalized_stack.size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
expr * n = m_b_internalized_stack.get(i);
|
||||
bool_var v = get_bool_var_of_id(n->get_id());
|
||||
out << "(#" << n->get_id() << " -> " << literal(v, false) << ") ";
|
||||
|
|
@ -316,7 +316,7 @@ namespace smt {
|
|||
void context::display_hot_bool_vars(std::ostream & out) const {
|
||||
out << "hot bool vars:\n";
|
||||
unsigned num = get_num_bool_vars();
|
||||
for (bool_var v = 0; v < num; v++) {
|
||||
for (bool_var v = 0; v < num; ++v) {
|
||||
double val = get_activity(v)/m_bvar_inc;
|
||||
if (val > 10.00) {
|
||||
expr * n = m_b_internalized_stack.get(v);
|
||||
|
|
@ -447,7 +447,7 @@ namespace smt {
|
|||
expr_ref_vector fmls(m);
|
||||
visitor.collect(fmls);
|
||||
expr_ref n(m);
|
||||
for (unsigned i = 0; i < num_antecedents; i++) {
|
||||
for (unsigned i = 0; i < num_antecedents; ++i) {
|
||||
literal l = antecedents[i];
|
||||
literal2expr(l, n);
|
||||
fmls.push_back(std::move(n));
|
||||
|
|
@ -481,12 +481,12 @@ namespace smt {
|
|||
expr_ref_vector fmls(m);
|
||||
visitor.collect(fmls);
|
||||
expr_ref n(m);
|
||||
for (unsigned i = 0; i < num_antecedents; i++) {
|
||||
for (unsigned i = 0; i < num_antecedents; ++i) {
|
||||
literal l = antecedents[i];
|
||||
literal2expr(l, n);
|
||||
fmls.push_back(n);
|
||||
}
|
||||
for (unsigned i = 0; i < num_eq_antecedents; i++) {
|
||||
for (unsigned i = 0; i < num_eq_antecedents; ++i) {
|
||||
enode_pair const & p = eq_antecedents[i];
|
||||
n = m.mk_eq(p.first->get_expr(), p.second->get_expr());
|
||||
fmls.push_back(n);
|
||||
|
|
@ -550,7 +550,7 @@ namespace smt {
|
|||
out << n->get_decl()->get_name();
|
||||
if (!n->get_decl()->private_parameters())
|
||||
display_parameters(out, n->get_decl()->get_num_parameters(), n->get_decl()->get_parameters());
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
for (unsigned i = 0; i < num; ++i) {
|
||||
expr * arg = n->get_expr()->get_arg(i);
|
||||
if (e_internalized(arg)) {
|
||||
enode * n = get_enode(arg)->get_root();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue