vm_obj tactic_get_subsingleton_info(vm_obj const & fn, vm_obj const & n, vm_obj const & m, vm_obj const & s) { TRY; type_context ctx = mk_type_context_for(s, m); if (is_none(n)) { return mk_result(get_subsingleton_info(ctx, to_expr(fn)), s); } else { return mk_result(get_subsingleton_info(ctx, to_expr(fn), force_to_unsigned(get_some_value(n), 0)), s); } CATCH; }
/** \brief Apply equality resolution rule on the given clause. Store the produced clauses in new_clauses. */ void eq_resolution::operator()(clause * cls, ptr_vector<clause> & new_clauses) { m_subst.reserve_vars(cls->get_num_vars()); unsigned num = cls->get_num_literals(); for (unsigned i = 0; i < num; i++) { literal const & l = cls->get_literal(i); expr * atom = l.atom(); if (l.sign() && m_manager.is_eq(atom)) { expr * lhs = to_app(atom)->get_arg(0); expr * rhs = to_app(atom)->get_arg(1); m_subst.reset(); if (m_unifier(lhs, rhs, m_subst, false) && cls->is_eligible_for_resolution(m_order, l, 0, &m_subst)) { m_stats.m_num_eq_resolution++; new_clauses.push_back(mk_result(cls, i)); } } } }
vm_obj tactic_get_spec_subsingleton_info(vm_obj const & app, vm_obj const & m, vm_obj const & s) { TRY; type_context ctx = mk_type_context_for(s, m); return mk_result(get_specialized_subsingleton_info(ctx, to_expr(app)), s); CATCH; }