mirror of
https://github.com/Z3Prover/z3
synced 2025-06-03 12:51:22 +00:00
Improved decl_collector for uninterpreted sorts in :print_benchmark output
This commit is contained in:
parent
041520f727
commit
ef3d340c85
1 changed files with 21 additions and 7 deletions
|
@ -23,8 +23,21 @@ void decl_collector::visit_sort(sort * n) {
|
|||
family_id fid = n->get_family_id();
|
||||
if (m().is_uninterp(n))
|
||||
m_sorts.push_back(n);
|
||||
if (fid == m_dt_fid)
|
||||
if (fid == m_dt_fid) {
|
||||
m_sorts.push_back(n);
|
||||
|
||||
unsigned num_cnstr = m_dt_util.get_datatype_num_constructors(n);
|
||||
for (unsigned i = 0; i < num_cnstr; i++) {
|
||||
func_decl * cnstr = m_dt_util.get_datatype_constructors(n)->get(i);
|
||||
m_decls.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++) {
|
||||
func_decl * accsr = cnstr_acc.get(j);
|
||||
m_decls.push_back(accsr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool decl_collector::is_bool(sort * s) {
|
||||
|
@ -43,9 +56,10 @@ void decl_collector::visit_func(func_decl * n) {
|
|||
|
||||
decl_collector::decl_collector(ast_manager & m, bool preds):
|
||||
m_manager(m),
|
||||
m_sep_preds(preds) {
|
||||
m_sep_preds(preds),
|
||||
m_dt_util(m) {
|
||||
m_basic_fid = m_manager.get_basic_family_id();
|
||||
m_dt_fid = m_manager.mk_family_id("datatype");
|
||||
m_dt_fid = m_dt_util.get_family_id();
|
||||
}
|
||||
|
||||
void decl_collector::visit(ast* n) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue