void operator()(func_decl * f) { for (unsigned i = 0; i < f->get_arity(); i++) this->operator()(f->get_domain()[i]); this->operator()(f->get_range()); if (f->get_family_id() == null_family_id) { if (!m_seen_func_decls.contains(f)) { if (f->get_arity() == 0) m_stats["uninterpreted-constants"]++; else m_stats["uninterpreted-functions"]++; m_seen_func_decls.insert(f); } if (f->get_arity() > 0) m_stats["uninterpreted-function-occurrences"]++; } else { params_ref prms; prms.set_bool("pp.single_line", true); std::stringstream ss; ss << mk_ismt2_pp(f, m, prms); m_stats[ss.str()]++; std::stringstream ssfname; if (f->get_num_parameters() > 0) ssfname << "(declare-fun (_ " << f->get_name() << " *) *)"; else ssfname << "(declare-fun " << f->get_name() << " *)"; m_stats[ssfname.str()]++; } m_stats["function-applications"]++; }
void operator()(app * n) { m_funcs.insert(n->get_decl()); class sort* s = m.get_sort(n); if (s->get_family_id() == null_family_id) { m_sorts.insert(s); } }
void operator()(app* a) { if (is_arith_op(a) || a->get_family_id() == m.get_basic_family_id()) { return; } if (m_arith.is_int_real(a)) { m_avars.push_back(a); if (!m_seen.contains(a)) { m_proxies.push_back(a); m_seen.insert(a); } } for (expr* arg : *a) { if (is_app(arg) && !m_seen.contains(arg) && m_arith.is_int_real(arg)) { m_proxies.push_back(to_app(arg)); m_seen.insert(arg); } } }
void compute_marks(proof* pr) { proof *p; proof_post_order pit(pr, m); while (pit.hasNext()) { p = pit.next(); if (m.is_hypothesis(p)) { m_hypmark.mark(p, true); m_hyps.insert(m.get_fact(p)); } else { bool hyp_mark = compute_mark1(p); // collect units that are hyp-free and are used as hypotheses somewhere if (!hyp_mark && m.has_fact(p) && m_hyps.contains(m.get_fact(p))) { m_units.insert(m.get_fact(p), p); } } } }
void operator()(sort * s) { if (m.is_uninterp(s)) { if (!m_seen_sorts.contains(s)) { m_stats["uninterpreted-sorts"]++; m_seen_sorts.insert(s); } m_stats["uninterpreted-sort-occurrences"]++; } else { params_ref prms; prms.set_bool("pp.single_line", true); std::stringstream ss; ss << "(declare-sort " << mk_ismt2_pp(s, m, prms) << ")"; m_stats[ss.str()]++; if (s->get_info()->get_num_parameters() > 0) { std::stringstream ssname; ssname << "(declare-sort (_ " << s->get_name() << " *))"; m_stats[ssname.str()]++; } } }