3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-01 22:57:51 +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

@ -89,7 +89,7 @@ namespace datalog {
void rule_dependencies::populate(unsigned n, rule * const * rules) {
SASSERT(m_data.empty());
for (unsigned i=0; i<n; i++) {
for (unsigned i=0; i<n; ++i) {
populate(rules[i]);
}
}
@ -393,11 +393,11 @@ namespace datalog {
bool rule_set::stratified_negation() {
ptr_vector<rule>::const_iterator it = m_rules.data();
ptr_vector<rule>::const_iterator end = m_rules.data() + m_rules.size();
for (; it != end; it++) {
for (; it != end; ++it) {
rule * r = *it;
func_decl * head_decl = r->get_decl();
unsigned n = r->get_uninterpreted_tail_size();
for (unsigned i = r->get_positive_tail_size(); i < n; i++) {
for (unsigned i = r->get_positive_tail_size(); i < n; ++i) {
SASSERT(r->is_neg_tail(i));
func_decl * tail_decl = r->get_decl(i);
unsigned neg_strat = get_predicate_strat(tail_decl);
@ -423,7 +423,7 @@ namespace datalog {
void rule_set::add_rules(const rule_set & src) {
SASSERT(!is_closed());
unsigned n = src.get_num_rules();
for (unsigned i = 0; i < n; i++) {
for (unsigned i = 0; i < n; ++i) {
add_rule(src.get_rule(i));
}
inherit_predicates(src);
@ -639,7 +639,7 @@ namespace datalog {
// We put components whose indegree is zero to m_strats and assign its
// m_components entry to zero.
unsigned comp_cnt = m_components.size();
for (unsigned i = 0; i < comp_cnt; i++) {
for (unsigned i = 0; i < comp_cnt; ++i) {
if (in_degrees[i] == 0) {
m_strats.push_back(m_components[i]);
m_components[i] = 0;
@ -681,7 +681,7 @@ namespace datalog {
SASSERT(m_pred_strat_nums.empty());
unsigned strat_cnt = m_strats.size();
for (unsigned strat_index=0; strat_index < strat_cnt; strat_index++) {
for (unsigned strat_index=0; strat_index < strat_cnt; ++strat_index) {
item_set * comp = m_strats[strat_index];
for (T * el : *comp) {
m_pred_strat_nums.insert(el, strat_index);