mirror of
https://github.com/Z3Prover/z3
synced 2025-08-21 02:30:23 +00:00
lia2card simplifications, move up before elim01 (which could be deprecated)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
43441d0fd5
commit
bee4716a85
7 changed files with 55 additions and 10 deletions
|
@ -160,6 +160,9 @@ public:
|
|||
expr_ref_vector xs(m);
|
||||
expr_ref last_v(m);
|
||||
if (!m_mc) m_mc = alloc(generic_model_converter, m, "lia2card");
|
||||
if (hi == 0) {
|
||||
return expr_ref(a.mk_int(0), m);
|
||||
}
|
||||
if (lo > 0) {
|
||||
xs.push_back(a.mk_int(lo));
|
||||
}
|
||||
|
@ -183,7 +186,7 @@ public:
|
|||
expr_ref_vector axioms(m);
|
||||
expr_safe_replace rep(m);
|
||||
|
||||
tactic_report report("cardinality-intro", *g);
|
||||
tactic_report report("lia2card", *g);
|
||||
|
||||
bound_manager bounds(m);
|
||||
bounds(*g);
|
||||
|
@ -205,7 +208,6 @@ public:
|
|||
expr_ref new_curr(m), tmp(m);
|
||||
proof_ref new_pr(m);
|
||||
rep(g->form(i), tmp);
|
||||
if (tmp == g->form(i)) continue;
|
||||
m_rw(tmp, new_curr, new_pr);
|
||||
if (m.proofs_enabled() && !new_pr) {
|
||||
new_pr = m.mk_rewrite(g->form(i), new_curr);
|
||||
|
|
|
@ -242,6 +242,7 @@ class parallel_tactic : public tactic {
|
|||
lbool simplify() {
|
||||
lbool r = l_undef;
|
||||
if (m_depth == 1) {
|
||||
IF_VERBOSE(2, verbose_stream() << "(parallel.tactic simplify-1)\n";);
|
||||
set_simplify_params(true, true); // retain PB, retain blocked
|
||||
r = get_solver().check_sat(0,0);
|
||||
if (r != l_undef) return r;
|
||||
|
@ -255,9 +256,11 @@ class parallel_tactic : public tactic {
|
|||
m_solver->set_model_converter(mc.get());
|
||||
m_solver->assert_expr(fmls);
|
||||
}
|
||||
IF_VERBOSE(2, verbose_stream() << "(parallel.tactic simplify-2)\n";);
|
||||
set_simplify_params(false, true); // remove PB, retain blocked
|
||||
r = get_solver().check_sat(0,0);
|
||||
if (r != l_undef) return r;
|
||||
IF_VERBOSE(2, verbose_stream() << "(parallel.tactic simplify-3)\n";);
|
||||
set_simplify_params(false, false); // remove any PB, remove blocked
|
||||
r = get_solver().check_sat(0,0);
|
||||
return r;
|
||||
|
@ -398,6 +401,7 @@ private:
|
|||
cube.reset();
|
||||
cube.append(s.split_cubes(1));
|
||||
SASSERT(cube.size() <= 1);
|
||||
IF_VERBOSE(2, verbose_stream() << "(sat.parallel :split-cube " << cube.size() << ")\n";);
|
||||
if (!s.cubes().empty()) m_queue.add_task(s.clone());
|
||||
if (!cube.empty()) s.assert_cube(cube.get(0));
|
||||
s.inc_depth(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue