join_planner(context & ctx, rule_set & rs_aux_copy) : m_context(ctx), m(ctx.get_manager()), rm(ctx.get_rule_manager()), m_var_subst(ctx.get_var_subst()), m_rs_aux_copy(rs_aux_copy), m_introduced_rules(ctx.get_rule_manager()), m_pinned(ctx.get_manager()) { }
mk_loop_counter::mk_loop_counter(context & ctx, unsigned priority): plugin(priority), m(ctx.get_manager()), m_ctx(ctx), a(m), m_refs(m) { }
mk_filter_rules::mk_filter_rules(context & ctx): plugin(2000), m_context(ctx), m_manager(ctx.get_manager()), m_result(0), m_pinned(m_manager) { }
mk_unfold::mk_unfold(context& ctx): rule_transformer::plugin(100, false), m_ctx(ctx), m(ctx.get_manager()), rm(ctx.get_rule_manager()), m_unify(ctx) {}
mk_unbound_compressor::mk_unbound_compressor(context & ctx) : plugin(500), m_context(ctx), m_manager(ctx.get_manager()), m_rules(ctx.get_rule_manager()), m_pinned(m_manager) { }
aig_exporter::aig_exporter(const rule_set& rules, context& ctx, const fact_vector *facts) : m_rules(rules), m_facts(facts), m(ctx.get_manager()), m_rm(ctx.get_rule_manager()), m_aigm(m), m_next_decl_id(1), m_next_aig_expr_id(2), m_num_and_gates(0), m_latch_vars(m), m_latch_varsp(m), m_ruleid_var_set(m), m_ruleid_varp_set(m) { std::set<func_decl*> predicates; for (rule_set::decl2rules::iterator I = m_rules.begin_grouped_rules(), E = m_rules.end_grouped_rules(); I != E; ++I) { predicates.insert(I->m_key); } for (fact_vector::const_iterator I = facts->begin(), E = facts->end(); I != E; ++I) { predicates.insert(I->first); } // reserve pred id = 0 for initalization purposes unsigned num_preds = (unsigned)predicates.size() + 1; // poor's man round-up log2 unsigned preds_bitsize = log2(num_preds); if ((1U << preds_bitsize) < num_preds) ++preds_bitsize; SASSERT((1U << preds_bitsize) >= num_preds); for (unsigned i = 0; i < preds_bitsize; ++i) { m_ruleid_var_set.push_back(m.mk_fresh_const("rule_id", m.mk_bool_sort())); m_ruleid_varp_set.push_back(m.mk_fresh_const("rule_id_p", m.mk_bool_sort())); } }
mk_magic_sets::mk_magic_sets(context & ctx, func_decl* goal) : plugin(10000, true), m_context(ctx), m(ctx.get_manager()), rm(ctx.get_rule_manager()), m_pinned(m), m_goal(goal, m) { }
mk_coalesce::mk_coalesce(context& ctx): rule_transformer::plugin(50, false), m_ctx(ctx), m(ctx.get_manager()), rm(ctx.get_rule_manager()), m_sub1(m), m_sub2(m), m_idx(0) {}
rule_manager::rule_manager(context& ctx) : m(ctx.get_manager()), m_ctx(ctx), m_body(m), m_head(m), m_args(m), m_hnf(m), m_qe(m), m_cfg(m), m_rwr(m, false, m_cfg) {}
mk_array_instantiation::mk_array_instantiation( context & ctx, unsigned priority): plugin(priority), m(ctx.get_manager()), m_ctx(ctx), m_a(m), eq_classes(m), ownership(m) { }
rule_manager::rule_manager(context& ctx) : m(ctx.get_manager()), m_ctx(ctx), m_body(m), m_head(m), m_args(m), m_hnf(m), m_qe(m), m_rwr(m), m_ufproc(m) {}
rule_manager::rule_manager(context& ctx) : m(ctx.get_manager()), m_ctx(ctx), m_body(m), m_head(m), m_args(m), m_hnf(m), m_qe(m, params_ref(), false), m_rwr(m), m_ufproc(m), m_fd_proc(m) {}
void dl_query_ask_for_last_arg(context & ctx, func_decl * pred, relation_fact & f, bool should_be_successful) { ast_manager & m = ctx.get_manager(); expr_ref_vector query_args(m); push_into_vector(query_args, f); query_args.pop_back(); query_args.push_back(m.mk_var(0, pred->get_domain(query_args.size()))); app * query = ctx.get_manager().mk_app(pred, query_args.c_ptr()); lbool is_sat = ctx.query(query); std::cerr << "@@ last arg query should succeed: " << should_be_successful << "\n"; SASSERT(is_sat != l_undef); relation_fact res_fact(m); res_fact.push_back(f.back()); if(ctx.result_contains_fact(res_fact)!=should_be_successful) { std::cerr<<"wrong arg query answer!\n"; UNREACHABLE(); } }
void dl_query_ask_ground_query(context & ctx, func_decl * pred, relation_fact & f, bool should_be_successful) { expr * const * q_args = reinterpret_cast<expr * const *>(f.c_ptr()); app * query = ctx.get_manager().mk_app(pred, q_args); lbool is_sat = ctx.query(query); std::cerr << "@@ query should succeed: " << should_be_successful << "\n"; SASSERT(is_sat != l_undef); if((is_sat != l_true) == should_be_successful) { std::cerr<<"wrong ground query answer!\n"; UNREACHABLE(); } }
mk_interp_tail_simplifier::mk_interp_tail_simplifier(context & ctx, unsigned priority) : plugin(priority), m(ctx.get_manager()), m_context(ctx), m_simp(ctx.get_rewriter()), a(m), m_rule_subst(ctx), m_tail(m), m_itail_members(m), m_conj(m) { m_cfg = alloc(normalizer_cfg, m); m_rw = alloc(normalizer_rw, m, *m_cfg); }
void output_predicate(context & ctx, app * f, std::ostream & out) { func_decl * pred_decl = f->get_decl(); unsigned arity = f->get_num_args(); out << pred_decl->get_name() << '('; for (unsigned i = 0; i < arity; i++) { expr * arg = f->get_arg(i); if (i != 0) { out << ','; } if (is_var(arg)) { out << "#" << to_var(arg)->get_idx(); } else { out << mk_pp(arg, ctx.get_manager()); } } out << ")"; }
setup::setup(context & c, front_end_params & params): m_context(c), m_manager(c.get_manager()), m_params(params), m_already_configured(false) { }
relation_fact::relation_fact(context & ctx) : app_ref_vector(ctx.get_manager()) {}
quick_checker::collector::collector(context & c): m_context(c), m_manager(c.get_manager()), m_conservative(true) { }
checker::checker(context & c): m_context(c), m_manager(c.get_manager()), m_num_bindings(0), m_bindings(0) { }
rule_manager::rule_manager(context& ctx) : m(ctx.get_manager()), m_ctx(ctx), m_refs(ctx.get_manager()) {}