Пример #1
0
dl_interface::dl_interface(datalog::context& ctx) :
    engine_base(ctx.get_manager(), "pdr"),
    m_ctx(ctx),
    m_pdr_rules(ctx),
    m_old_rules(ctx),
    m_context(0),
    m_refs(ctx.get_manager()) {
    m_context = alloc(pdr::context, ctx.get_fparams(), ctx.get_params(), ctx.get_manager());
}
Пример #2
0
dl_interface::dl_interface(datalog::context& ctx) : 
    m_ctx(ctx), 
    m_pdr_rules(ctx), 
    m_old_rules(ctx),
    m_context(0) {
    m_context = alloc(pdr::context, ctx.get_fparams(), ctx.get_params(), ctx.get_manager());
}
Пример #3
0
 void set_state(void* state) {
     SASSERT(!m_state);
     m_state = state;
     symbol name("datalog_relation");
     ast_manager& m = m_context.get_manager();
     if (!m.has_plugin(name)) {
         m.register_plugin(name, alloc(datalog::dl_decl_plugin));
     }
     datalog::rel_context_base* rel = m_context.get_rel_context();
     if (rel) {
         datalog::relation_manager& r = rel->get_rmanager();
         r.register_plugin(alloc(datalog::external_relation_plugin, *this, r));
     }
 }
Пример #4
0
 virtual void reduce(func_decl* f, unsigned num_args, expr * const* args, expr_ref& result) {
     expr* r = 0;
     if (m_reduce_app) {
         m_reduce_app(m_state, f, num_args, args, &r);
         result = r;
         m_trail.push_back(f);
         for (unsigned i = 0; i < num_args; ++i) {
             m_trail.push_back(args[i]);
         }
         m_trail.push_back(r);
     }
     // allow fallthrough.
     if (r == 0) {
         ast_manager& m = m_context.get_manager();
         result = m.mk_app(f, num_args, args);
     }
 }