u2i_cfg(ast_manager & m, sort * u): m_autil(m), m_asts(m), m_usort(u) { m_asts.push_back(u); m_int_sort = m_autil.mk_int(); m_asts.push_back(m_int_sort); }
virtual void reduce_assign(func_decl* f, unsigned num_args, expr * const* args, unsigned num_out, expr* const* outs) { if (m_reduce_assign) { m_trail.push_back(f); for (unsigned i = 0; i < num_args; ++i) { m_trail.push_back(args[i]); } m_reduce_assign(m_state, f, num_args, args, num_out, outs); } }
func_decl * remap(func_decl * f) { ptr_buffer<sort> new_domain; sort * new_range = remap(f->get_range()); for (unsigned i = 0; i < f->get_arity(); i++) new_domain.push_back(remap(f->get_domain(i))); func_decl * new_f = m().mk_func_decl(f->get_name(), new_domain.size(), new_domain.c_ptr(), new_range); m_asts.push_back(new_f); m_asts.push_back(f); m_f2f.insert(f, new_f); return new_f; }
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); } }
ast_manager & m() const { return m_asts.get_manager(); }