mirror of
https://github.com/Z3Prover/z3
synced 2025-06-26 15:53:41 +00:00
Wired qe::mbp into spacer
use option fixedpoint.spacer.native_mbp=true to use it
This commit is contained in:
parent
7e9f7d2cfe
commit
a8438e081e
1 changed files with 55 additions and 32 deletions
|
@ -487,11 +487,25 @@ void to_mbp_benchmark(std::ostream &out, expr* fml, const app_ref_vector &vars)
|
||||||
<< "(pop)\n"
|
<< "(pop)\n"
|
||||||
<< "(exit)\n";
|
<< "(exit)\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qe_project_z3 (ast_manager& m, app_ref_vector& vars, expr_ref& fml,
|
||||||
|
const model_ref& M, bool reduce_all_selects, bool use_native_mbp,
|
||||||
|
bool dont_sub) {
|
||||||
|
params_ref p;
|
||||||
|
p.set_bool("reduce_all_selects", reduce_all_selects);
|
||||||
|
p.set_bool("dont_sub", dont_sub);
|
||||||
|
|
||||||
|
qe::mbp mbp(m, p);
|
||||||
|
// TODO: deal with const
|
||||||
|
model *mdl = const_cast<model*>(M.get());
|
||||||
|
mbp.spacer(vars, *mdl, fml);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* eliminate simple equalities using qe_lite
|
* eliminate simple equalities using qe_lite
|
||||||
* then, MBP for Booleans (substitute), reals (based on LW), ints (based on Cooper), and arrays
|
* then, MBP for Booleans (substitute), reals (based on LW), ints (based on Cooper), and arrays
|
||||||
*/
|
*/
|
||||||
void qe_project (ast_manager& m, app_ref_vector& vars, expr_ref& fml,
|
void qe_project_spacer (ast_manager& m, app_ref_vector& vars, expr_ref& fml,
|
||||||
const model_ref& M, bool reduce_all_selects, bool use_native_mbp,
|
const model_ref& M, bool reduce_all_selects, bool use_native_mbp,
|
||||||
bool dont_sub) {
|
bool dont_sub) {
|
||||||
th_rewriter rw (m);
|
th_rewriter rw (m);
|
||||||
|
@ -656,6 +670,15 @@ void to_mbp_benchmark(std::ostream &out, expr* fml, const app_ref_vector &vars)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qe_project (ast_manager& m, app_ref_vector& vars, expr_ref& fml,
|
||||||
|
const model_ref& M, bool reduce_all_selects, bool use_native_mbp,
|
||||||
|
bool dont_sub) {
|
||||||
|
if (use_native_mbp)
|
||||||
|
qe_project_z3(m, vars, fml, M, reduce_all_selects, use_native_mbp, dont_sub);
|
||||||
|
else
|
||||||
|
qe_project_spacer(m, vars, fml, M, reduce_all_selects, use_native_mbp, dont_sub);
|
||||||
|
}
|
||||||
|
|
||||||
void expand_literals(ast_manager &m, expr_ref_vector& conjs)
|
void expand_literals(ast_manager &m, expr_ref_vector& conjs)
|
||||||
{
|
{
|
||||||
if (conjs.empty()) { return; }
|
if (conjs.empty()) { return; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue