mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
parent
ec0cd644f1
commit
6ca039c855
2 changed files with 22 additions and 24 deletions
|
@ -29,17 +29,10 @@ class fpa2bv_tactic : public tactic {
|
|||
fpa2bv_rewriter m_rw;
|
||||
unsigned m_num_steps;
|
||||
|
||||
bool m_proofs_enabled;
|
||||
bool m_produce_models;
|
||||
bool m_produce_unsat_cores;
|
||||
|
||||
imp(ast_manager & _m, params_ref const & p):
|
||||
m(_m),
|
||||
m_conv(m),
|
||||
m_rw(m, m_conv, p),
|
||||
m_proofs_enabled(false),
|
||||
m_produce_models(false),
|
||||
m_produce_unsat_cores(false) {
|
||||
m_rw(m, m_conv, p) {
|
||||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
|
@ -48,15 +41,12 @@ class fpa2bv_tactic : public tactic {
|
|||
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result) {
|
||||
m_proofs_enabled = g->proofs_enabled();
|
||||
m_produce_models = g->models_enabled();
|
||||
m_produce_unsat_cores = g->unsat_core_enabled();
|
||||
|
||||
bool proofs_enabled = g->proofs_enabled();
|
||||
result.reset();
|
||||
tactic_report report("fpa2bv", *g);
|
||||
m_rw.reset();
|
||||
|
||||
TRACE("fpa2bv", tout << "BEFORE: " << std::endl; g->display(tout););
|
||||
TRACE("fpa2bv", g->display(tout << "BEFORE: " << std::endl););
|
||||
|
||||
if (g->inconsistent()) {
|
||||
result.push_back(g.get());
|
||||
|
@ -73,7 +63,7 @@ class fpa2bv_tactic : public tactic {
|
|||
expr * curr = g->form(idx);
|
||||
m_rw(curr, new_curr, new_pr);
|
||||
m_num_steps += m_rw.get_num_steps();
|
||||
if (m_proofs_enabled) {
|
||||
if (proofs_enabled) {
|
||||
proof * pr = g->pr(idx);
|
||||
new_pr = m.mk_modus_ponens(pr, new_pr);
|
||||
}
|
||||
|
@ -101,11 +91,15 @@ class fpa2bv_tactic : public tactic {
|
|||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
||||
for (unsigned i = 0; i < m_conv.m_extra_assertions.size(); i++)
|
||||
result.back()->assert_expr(m_conv.m_extra_assertions[i].get());
|
||||
for (expr* e : m_conv.m_extra_assertions) {
|
||||
proof* pr = nullptr;
|
||||
if (proofs_enabled)
|
||||
pr = m.mk_asserted(e);
|
||||
result.back()->assert_expr(e, pr);
|
||||
}
|
||||
|
||||
TRACE("fpa2bv", tout << "AFTER: " << std::endl; g->display(tout);
|
||||
if (g->mc()) g->mc()->display(tout); tout << std::endl; );
|
||||
TRACE("fpa2bv", g->display(tout << "AFTER:\n");
|
||||
if (g->mc()) g->mc()->display(tout); tout << std::endl; );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue