mirror of
https://github.com/Z3Prover/z3
synced 2026-04-26 05:43:33 +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
|
|
@ -49,7 +49,7 @@ namespace datalog {
|
|||
return false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < pt_len; i++) {
|
||||
for (unsigned i = 0; i < pt_len; ++i) {
|
||||
func_decl * tail_pred = r->get_tail(i)->get_decl();
|
||||
if (!m_total_relations.contains(tail_pred)) {
|
||||
// this rule has a non-total predicate in the tail
|
||||
|
|
@ -58,7 +58,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
unsigned t_len = r->get_positive_tail_size();
|
||||
for(unsigned i = pt_len; i < t_len; i++) {
|
||||
for(unsigned i = pt_len; i < t_len; ++i) {
|
||||
SASSERT(!r->is_neg_tail(i)); //we assume interpreted tail not to be negated
|
||||
if (!m.is_true(r->get_tail(i))) {
|
||||
//this rule has an interpreted tail which is not constant true
|
||||
|
|
@ -69,7 +69,7 @@ namespace datalog {
|
|||
var_idx_set head_vars;
|
||||
app * head = r->get_head();
|
||||
unsigned arity = head->get_num_args();
|
||||
for(unsigned i=0; i<arity; i++) {
|
||||
for(unsigned i=0; i<arity; ++i) {
|
||||
expr * arg = head->get_arg(i);
|
||||
if(!is_var(arg)) { return false; }
|
||||
unsigned idx = to_var(arg)->get_idx();
|
||||
|
|
@ -127,7 +127,7 @@ namespace datalog {
|
|||
app_ref_vector tail(m);
|
||||
bool_vector tail_neg;
|
||||
|
||||
for(unsigned i=0; i<u_len; i++) {
|
||||
for(unsigned i=0; i<u_len; ++i) {
|
||||
app * tail_atom = r->get_tail(i);
|
||||
bool neg = r->is_neg_tail(i);
|
||||
if(m_total_relations.contains(tail_atom->get_decl())
|
||||
|
|
@ -158,7 +158,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
//we just copy the interpreted part of the tail
|
||||
for(unsigned i=u_len; i<len; i++) {
|
||||
for(unsigned i=u_len; i<len; ++i) {
|
||||
tail.push_back(r->get_tail(i));
|
||||
tail_neg.push_back(r->is_neg_tail(i));
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ namespace datalog {
|
|||
if (arity > 30) { continue; }
|
||||
|
||||
//for now we only check booleans domains
|
||||
for(unsigned i=0; i<arity; i++) {
|
||||
for(unsigned i=0; i<arity; ++i) {
|
||||
if(!m.is_bool(pred->get_domain(i))) {
|
||||
goto next_pred;
|
||||
}
|
||||
|
|
@ -316,7 +316,7 @@ namespace datalog {
|
|||
|
||||
app * head = r->get_head();
|
||||
unsigned arity = pred->get_arity();
|
||||
for(unsigned i=0; i<arity; i++) {
|
||||
for(unsigned i=0; i<arity; ++i) {
|
||||
expr * arg = head->get_arg(i);
|
||||
if(!is_app(arg)) {
|
||||
goto next_rule;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue