bool sls_engine::full_eval(model & mdl) { model::scoped_model_completion _scm(mdl, true); for (expr* a : m_assertions) { checkpoint(); if (!mdl.is_true(a)) { TRACE("sls", tout << "Evaluation: false\n";); return false; }
bool Z3_API Z3_model_eval(Z3_context c, Z3_model m, Z3_ast t, bool model_completion, Z3_ast * v) { Z3_TRY; LOG_Z3_model_eval(c, m, t, model_completion, v); if (v) *v = nullptr; RESET_ERROR_CODE(); CHECK_NON_NULL(m, false); CHECK_IS_EXPR(t, false); model * _m = to_model_ref(m); params_ref p; ast_manager& mgr = mk_c(c)->m(); _m->set_solver(alloc(api::seq_expr_solver, mgr, p)); expr_ref result(mgr); model::scoped_model_completion _scm(*_m, model_completion); result = (*_m)(to_expr(t)); mk_c(c)->save_ast_trail(result.get()); *v = of_ast(result.get()); RETURN_Z3_model_eval true; Z3_CATCH_RETURN(0); }