static void validate_quant_solution(ast_manager& m, expr* fml, expr* guard, qe::def_vector const& defs) { // verify: // new_fml => fml[t/x] scoped_ptr<expr_replacer> rep = mk_expr_simp_replacer(m); app_ref_vector xs(m); expr_substitution sub(m); for (unsigned i = 0; i < defs.size(); ++i) { xs.push_back(m.mk_const(defs.var(i))); sub.insert(xs.back(), defs.def(i)); } rep->set_substitution(&sub); expr_ref fml1(fml, m); (*rep)(fml1); expr_ref tmp(m); tmp = m.mk_not(m.mk_implies(guard, fml1)); front_end_params fp; smt::kernel solver(m, fp); solver.assert_expr(tmp); lbool res = solver.check(); //SASSERT(res == l_false); if (res != l_false) { std::cout << "Validation failed: " << res << "\n"; std::cout << mk_pp(tmp, m) << "\n"; model_ref model; solver.get_model(model); model_smt2_pp(std::cout, m, *model, 0); fatal_error(0); } }
void itp_solver::elim_proxies (expr_ref_vector &v) { expr_ref f = mk_and (v); scoped_ptr<expr_replacer> rep = mk_expr_simp_replacer (m); rep->set_substitution (&m_elim_proxies_sub); (*rep) (f); v.reset (); flatten_and (f, v); }