3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-29 22:40:08 +00:00

remove ast_manager get_sort method entirely

This commit is contained in:
Nikolaj Bjorner 2021-02-02 13:57:01 -08:00
parent 489df0760f
commit 8f577d3943
72 changed files with 209 additions and 208 deletions

View file

@ -48,10 +48,10 @@ namespace datalog {
for (unsigned i = 0; i < sz; ++i) {
expr* a = p1->get_arg(i);
expr* b = p2->get_arg(i);
SASSERT(m.get_sort(a) == m.get_sort(b));
SASSERT(a->get_sort() == b->get_sort());
m_sub1.push_back(a);
m_sub2.push_back(b);
args.push_back(m.mk_var(m_idx++, m.get_sort(a)));
args.push_back(m.mk_var(m_idx++, a->get_sort()));
}
pred = m.mk_app(p1->get_decl(), args.size(), args.c_ptr());
}
@ -80,14 +80,14 @@ namespace datalog {
}
else {
SASSERT(revsub[v].get());
SASSERT(m.get_sort(revsub[v].get()) == s);
SASSERT(revsub[v]->get_sort() == s);
conjs.push_back(m.mk_eq(revsub[v].get(), w));
}
}
}
else {
SASSERT(m.is_value(e));
SASSERT(e->get_sort() == m.get_sort(w));
SASSERT(e->get_sort() == w->get_sort());
conjs.push_back(m.mk_eq(e, w));
}
}

View file

@ -95,7 +95,7 @@ namespace datalog {
continue;
if (!m_ground.get(i))
m_ground[i] = m.mk_fresh_const("c", fv[i]);
SASSERT(m.get_sort(m_ground.get(i)) == fv[i]);
SASSERT(m_ground[i]->get_sort() == fv[i]);
}
var_subst vsub(m, false);
return vsub(e, m_ground);

View file

@ -95,7 +95,7 @@ namespace datalog {
// the original predicate.
expr_safe_replace rep(m);
for (unsigned i = 0; i < sub.size(); ++i) {
rep.insert(m.mk_var(i, m.get_sort(sub[i])), sub[i]);
rep.insert(m.mk_var(i, sub[i]->get_sort()), sub[i]);
}
rep(body);
rep.reset();
@ -130,7 +130,7 @@ namespace datalog {
// 4. replace remaining constants by variables.
unsigned j = 0;
for (expr* f : _free) {
rep.insert(f, m.mk_var(j++, m.get_sort(f)));
rep.insert(f, m.mk_var(j++, f->get_sort()));
}
rep(body);