3
0
Fork 0
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:
Copilot 2026-01-14 19:55:31 -08:00 committed by GitHub
parent 1bf463d77a
commit 2436943794
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
475 changed files with 3237 additions and 3237 deletions

View file

@ -307,7 +307,7 @@ namespace nla {
continue;
bool gcd_fail = true;
dd::pdd kx = m.mk_var(x) * m.mk_val(k);
for (unsigned r = 0; gcd_fail && r < k; r++) {
for (unsigned r = 0; gcd_fail && r < k; ++r) {
dd::pdd kx_plus_r = kx + m.mk_val(r);
auto q = p.subst_pdd(x, kx_plus_r);
if (!fails_gcd_test(q))
@ -917,13 +917,13 @@ namespace nla {
void grobner::set_level2var() {
unsigned n = lra.column_count();
unsigned_vector sorted_vars(n), weighted_vars(n);
for (unsigned j = 0; j < n; j++) {
for (unsigned j = 0; j < n; ++j) {
sorted_vars[j] = j;
weighted_vars[j] = c().get_var_weight(j);
}
#if 1
// potential update to weights
for (unsigned j = 0; j < n; j++) {
for (unsigned j = 0; j < n; ++j) {
if (c().is_monic_var(j) && c().m_to_refine.contains(j)) {
for (lpvar k : c().m_emons[j].vars()) {
weighted_vars[k] += 6;
@ -938,7 +938,7 @@ namespace nla {
return wa < wb || (wa == wb && a < b); });
unsigned_vector l2v(n);
for (unsigned j = 0; j < n; j++)
for (unsigned j = 0; j < n; ++j)
l2v[j] = sorted_vars[j];
m_pdd_manager.reset(l2v);