mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
check with cube and clause
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
af57db0413
commit
b73aa3642a
10 changed files with 202 additions and 108 deletions
|
@ -202,6 +202,27 @@ 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");
|
||||
}
|
||||
|
|
|
@ -146,6 +146,13 @@ public:
|
|||
|
||||
lbool check_sat(app_ref_vector const& asms) { return check_sat(asms.size(), (expr* const*)asms.c_ptr()); }
|
||||
|
||||
/**
|
||||
\brief Check satisfiability modulo a cube and a clause.
|
||||
|
||||
The cube corresponds to auxiliary assumptions. The clause as an auxiliary disjunction that is also
|
||||
assumed for the check.
|
||||
*/
|
||||
virtual lbool check_sat(expr_ref_vector const& cube, expr_ref_vector const& clause, model_ref* mdl = nullptr, expr_ref_vector* core = nullptr, proof_ref* pr = nullptr);
|
||||
|
||||
/**
|
||||
\brief Set a progress callback procedure that is invoked by this solver during check_sat.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue