mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fix #6501
This commit is contained in:
parent
f961300036
commit
fe8034731d
5 changed files with 39 additions and 15 deletions
|
@ -32,9 +32,8 @@ void decl_collector::visit_sort(sort * n) {
|
|||
m_todo.push_back(cnstr);
|
||||
ptr_vector<func_decl> const & cnstr_acc = *m_dt_util.get_constructor_accessors(cnstr);
|
||||
unsigned num_cas = cnstr_acc.size();
|
||||
for (unsigned j = 0; j < num_cas; j++) {
|
||||
m_todo.push_back(cnstr_acc.get(j));
|
||||
}
|
||||
for (unsigned j = 0; j < num_cas; j++)
|
||||
m_todo.push_back(cnstr_acc.get(j));
|
||||
}
|
||||
}
|
||||
for (unsigned i = n->get_num_parameters(); i-- > 0; ) {
|
||||
|
@ -49,14 +48,19 @@ bool decl_collector::is_bool(sort * s) {
|
|||
|
||||
void decl_collector::visit_func(func_decl * n) {
|
||||
func_decl* g;
|
||||
|
||||
if (!m_visited.is_marked(n)) {
|
||||
family_id fid = n->get_family_id();
|
||||
if (fid == null_family_id)
|
||||
m_decls.push_back(n);
|
||||
else if (fid == m_rec_fid) {
|
||||
m_rec_decls.push_back(n);
|
||||
recfun::util u(m());
|
||||
m_todo.push_back(u.get_def(n).get_rhs());
|
||||
if (u.has_def(n)) {
|
||||
m_rec_decls.push_back(n);
|
||||
m_todo.push_back(u.get_def(n).get_rhs());
|
||||
}
|
||||
else
|
||||
m_decls.push_back(n);
|
||||
}
|
||||
else if (m_ar_util.is_as_array(n, g))
|
||||
m_todo.push_back(g);
|
||||
|
@ -97,13 +101,11 @@ void decl_collector::visit(ast* n) {
|
|||
case AST_QUANTIFIER: {
|
||||
quantifier * q = to_quantifier(n);
|
||||
unsigned num_decls = q->get_num_decls();
|
||||
for (unsigned i = 0; i < num_decls; ++i) {
|
||||
m_todo.push_back(q->get_decl_sort(i));
|
||||
}
|
||||
for (unsigned i = 0; i < num_decls; ++i)
|
||||
m_todo.push_back(q->get_decl_sort(i));
|
||||
m_todo.push_back(q->get_expr());
|
||||
for (unsigned i = 0; i < q->get_num_patterns(); ++i) {
|
||||
m_todo.push_back(q->get_pattern(i));
|
||||
}
|
||||
for (unsigned i = 0; i < q->get_num_patterns(); ++i)
|
||||
m_todo.push_back(q->get_pattern(i));
|
||||
break;
|
||||
}
|
||||
case AST_SORT:
|
||||
|
@ -111,9 +113,8 @@ void decl_collector::visit(ast* n) {
|
|||
break;
|
||||
case AST_FUNC_DECL: {
|
||||
func_decl * d = to_func_decl(n);
|
||||
for (sort* srt : *d) {
|
||||
m_todo.push_back(srt);
|
||||
}
|
||||
for (sort* srt : *d)
|
||||
m_todo.push_back(srt);
|
||||
m_todo.push_back(d->get_range());
|
||||
visit_func(d);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue