mirror of
https://github.com/Z3Prover/z3
synced 2026-02-23 00:37:36 +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
1bf463d77a
commit
2436943794
475 changed files with 3237 additions and 3237 deletions
|
|
@ -196,7 +196,7 @@ class psort_app : public psort {
|
|||
m.inc_ref(d);
|
||||
m.inc_ref(num_args, args);
|
||||
SASSERT(num_args == m_decl->get_num_params() || m_decl->has_var_params());
|
||||
DEBUG_CODE(if (num_args == num_params) { for (unsigned i = 0; i < num_params; i++) args[i]->check_num_params(this); });
|
||||
DEBUG_CODE(if (num_args == num_params) { for (unsigned i = 0; i < num_params; ++i) args[i]->check_num_params(this); });
|
||||
}
|
||||
|
||||
void finalize(pdecl_manager & m) override {
|
||||
|
|
@ -247,7 +247,7 @@ public:
|
|||
return false;
|
||||
SASSERT(m_args.size() == _other->m_args.size());
|
||||
unsigned sz = m_args.size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
if (m_args[i] != _other->m_args[i])
|
||||
return false;
|
||||
}
|
||||
|
|
@ -260,7 +260,7 @@ public:
|
|||
else {
|
||||
out << "(" << m_decl->get_name();
|
||||
unsigned sz = m_args.size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
out << " ";
|
||||
m_args[i]->display(out);
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ sort * psort_user_decl::instantiate(pdecl_manager & m, unsigned n, sort * const
|
|||
return r;
|
||||
if (m_def == nullptr) {
|
||||
buffer<parameter> ps;
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
ps.push_back(parameter(s[i]));
|
||||
r = m.m().mk_uninterpreted_sort(m_name, ps.size(), ps.data());
|
||||
}
|
||||
|
|
@ -334,7 +334,7 @@ sort * psort_user_decl::instantiate(pdecl_manager & m, unsigned n, sort * const
|
|||
void display_sort_args(std::ostream & out, unsigned num_params) {
|
||||
if (num_params > 0)
|
||||
out << " (";
|
||||
for (unsigned i = 0; i < num_params; i++) {
|
||||
for (unsigned i = 0; i < num_params; ++i) {
|
||||
if (i > 0) out << " ";
|
||||
out << "s_" << i;
|
||||
}
|
||||
|
|
@ -406,7 +406,7 @@ sort * psort_builtin_decl::instantiate(pdecl_manager & m, unsigned n, sort * con
|
|||
}
|
||||
else {
|
||||
buffer<parameter> params;
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
params.push_back(parameter(s[i]));
|
||||
sort * r = m.m().mk_sort(m_fid, m_kind, n, params.data());
|
||||
m.save_info(r, this, n, s);
|
||||
|
|
@ -422,7 +422,7 @@ sort * psort_builtin_decl::instantiate(pdecl_manager & m, unsigned n, unsigned c
|
|||
}
|
||||
else {
|
||||
buffer<parameter> params;
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
params.push_back(parameter(s[i]));
|
||||
sort * r = m.m().mk_sort(m_fid, m_kind, n, params.data());
|
||||
m.save_info(r, this, n, s);
|
||||
|
|
@ -720,7 +720,7 @@ sort* pdecl_manager::instantiate_datatype(psort_decl* p, symbol const& name, uns
|
|||
}
|
||||
buffer<parameter> ps;
|
||||
ps.push_back(parameter(name));
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
ps.push_back(parameter(s[i]));
|
||||
datatype_util util(m.m());
|
||||
r = m.m().mk_sort(util.get_family_id(), DATATYPE_SORT, ps.size(), ps.data());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue