mirror of
https://github.com/Z3Prover/z3
synced 2025-08-29 22:40:08 +00:00
refactor get_sort
This commit is contained in:
parent
4455f6caf8
commit
3ae4c6e9de
129 changed files with 362 additions and 362 deletions
|
@ -91,7 +91,7 @@ namespace datalog {
|
|||
r.get_vars(m, vars);
|
||||
m_next_var = vars.size() + 1;
|
||||
}
|
||||
v = m.mk_var(m_next_var, m.get_sort(e));
|
||||
v = m.mk_var(m_next_var, e->get_sort());
|
||||
m_defs.insert(e, v);
|
||||
++m_next_var;
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace datalog {
|
|||
}
|
||||
else {
|
||||
m_args.push_back(arg);
|
||||
m_f_vars.push_back(m.mk_var(idx++, m.get_sort(arg)));
|
||||
m_f_vars.push_back(m.mk_var(idx++, arg->get_sort()));
|
||||
m_g_vars.push_back(m_f_vars.back());
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ namespace datalog {
|
|||
|
||||
ptr_vector<sort> domain;
|
||||
for (expr* arg : m_args) {
|
||||
domain.push_back(m.get_sort(arg));
|
||||
domain.push_back(arg->get_sort());
|
||||
}
|
||||
g = m_context.mk_fresh_head_predicate(f->get_name(), symbol("bv"), m_args.size(), domain.c_ptr(), f);
|
||||
m_old_funcs.push_back(f);
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace datalog {
|
|||
bool_vector valid(sorts.size(), true);
|
||||
for (unsigned i = 0; i < sub.size(); ++i) {
|
||||
expr* e = sub[i];
|
||||
sort* s = m.get_sort(e);
|
||||
sort* s = e->get_sort();
|
||||
expr_ref w(m.mk_var(i, s), m);
|
||||
if (is_var(e)) {
|
||||
unsigned v = to_var(e)->get_idx();
|
||||
|
@ -87,7 +87,7 @@ namespace datalog {
|
|||
}
|
||||
else {
|
||||
SASSERT(m.is_value(e));
|
||||
SASSERT(m.get_sort(e) == m.get_sort(w));
|
||||
SASSERT(e->get_sort() == m.get_sort(w));
|
||||
conjs.push_back(m.mk_eq(e, w));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace datalog {
|
|||
for (unsigned j = 0; j < head->get_num_args(); ++j) {
|
||||
expr* arg = head->get_arg(j);
|
||||
if (!is_var(arg)) {
|
||||
conj.push_back(m.mk_eq(m.mk_var(j, m.get_sort(arg)), arg));
|
||||
conj.push_back(m.mk_eq(m.mk_var(j, arg->get_sort()), arg));
|
||||
}
|
||||
}
|
||||
fmls.push_back(mk_and(conj));
|
||||
|
|
|
@ -228,7 +228,7 @@ namespace datalog {
|
|||
unsigned sz = p->get_num_args();
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
arg = p->get_arg(i);
|
||||
sort* s = m.get_sort(arg);
|
||||
sort* s = arg->get_sort();
|
||||
while (a.is_array(s)) {
|
||||
unsigned arity = get_array_arity(s);
|
||||
for (unsigned j = 0; j < arity; ++j) {
|
||||
|
@ -268,7 +268,7 @@ namespace datalog {
|
|||
unsigned sz = p->get_num_args();
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
arg = ps->get_arg(i);
|
||||
sort* s = m.get_sort(arg);
|
||||
sort* s = arg->get_sort();
|
||||
bool is_pattern = false;
|
||||
while (a.is_array(s)) {
|
||||
is_pattern = true;
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace datalog {
|
|||
expr* arg = p->get_arg(i);
|
||||
if (!m_vars.contains(arg)) {
|
||||
args.push_back(arg);
|
||||
sorts.push_back(m.get_sort(arg));
|
||||
sorts.push_back(arg->get_sort());
|
||||
}
|
||||
}
|
||||
fn = m.mk_fresh_func_decl(p->get_decl()->get_name(), symbol("N"), sorts.size(), sorts.c_ptr(), m.mk_bool_sort());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue