lbool tactic2solver::check_sat_core(unsigned num_assumptions, expr * const * assumptions) { if (m_tactic.get() == 0) return l_false; ast_manager & m = m_assertions.m(); m_result = alloc(simple_check_sat_result, m); m_tactic->cleanup(); m_tactic->updt_params(m_params); m_tactic->set_logic(m_logic); goal_ref g = alloc(goal, m, m_produce_proofs, m_produce_models, m_produce_unsat_cores); unsigned sz = m_assertions.size(); for (unsigned i = 0; i < sz; i++) { g->assert_expr(m_assertions.get(i)); } for (unsigned i = 0; i < num_assumptions; i++) { g->assert_expr(assumptions[i], m.mk_asserted(assumptions[i]), m.mk_leaf(assumptions[i])); } model_ref md; proof_ref pr(m); expr_dependency_ref core(m); std::string reason_unknown = "unknown"; try { switch (::check_sat(*m_tactic, g, md, pr, core, reason_unknown)) { case l_true: m_result->set_status(l_true); break; case l_false: m_result->set_status(l_false); break; default: m_result->set_status(l_undef); if (reason_unknown != "") m_result->m_unknown = reason_unknown; break; } } catch (z3_error & ex) { throw ex; } catch (z3_exception & ex) { TRACE("tactic2solver", tout << "exception: " << ex.msg() << "\n";); m_result->set_status(l_undef); m_result->m_unknown = ex.msg(); }
is_atom_proc(expr_ref_vector& atoms, obj_hashtable<expr>& atom_set): m(atoms.m()), m_atoms(atoms), m_atom_set(atom_set) {}