示例#1
0
 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_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) {
 }
示例#3
0
 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)
 {}
示例#4
0
    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()));
        }
    }
示例#5
0
 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) {
 }
示例#6
0
 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)
 {}
示例#7
0
 mk_simple_joins::mk_simple_joins(context & ctx):
     plugin(1000),
     m_context(ctx),
     rm(ctx.get_rule_manager()) {
 }