mirror of
https://github.com/Z3Prover/z3
synced 2025-08-10 05:00:51 +00:00
solver::check_sat_cc : check_sat assuming cube and clause
Extends check_sat with an ability to assume a single clause in addition to assuming a cube of assumptions
This commit is contained in:
parent
4477f7d326
commit
26339119e4
6 changed files with 50 additions and 70 deletions
|
@ -202,27 +202,6 @@ void solver::assert_expr(expr* f, expr* t) {
|
|||
assert_expr_core2(fml, a);
|
||||
}
|
||||
|
||||
lbool solver::check_sat(expr_ref_vector const& cube, expr_ref_vector const& clause, model_ref* mdl, expr_ref_vector* core, proof_ref* pr) {
|
||||
ast_manager& m = clause.get_manager();
|
||||
scoped_push _push(*this);
|
||||
expr_ref disj = mk_or(clause);
|
||||
assert_expr(disj);
|
||||
lbool r = check_sat(cube);
|
||||
switch (r) {
|
||||
case l_false:
|
||||
if (core) get_unsat_core(*core);
|
||||
if (pr) *pr = get_proof();
|
||||
break;
|
||||
case l_true:
|
||||
if (mdl) get_model(*mdl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
void solver::collect_param_descrs(param_descrs & r) {
|
||||
r.insert("solver.enforce_model_conversion", CPK_BOOL, "(default: false) enforce model conversion when asserting formulas");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue