mirror of
https://github.com/Z3Prover/z3
synced 2025-08-20 10:10:21 +00:00
re-organize proof and model converters to be associated with goals instead of external
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
00f5308a0e
commit
4bbece6616
118 changed files with 617 additions and 1070 deletions
|
@ -37,20 +37,16 @@ public:
|
|||
dealloc(m_bv2fp);
|
||||
}
|
||||
|
||||
virtual void operator()(model_ref & md, unsigned goal_idx) {
|
||||
SASSERT(goal_idx == 0);
|
||||
void operator()(model_ref & md) override {
|
||||
model * new_model = alloc(model, m);
|
||||
convert(md.get(), new_model);
|
||||
md = new_model;
|
||||
}
|
||||
|
||||
virtual void operator()(model_ref & md) {
|
||||
operator()(md, 0);
|
||||
}
|
||||
|
||||
void display(std::ostream & out);
|
||||
void display(std::ostream & out) override;
|
||||
|
||||
virtual model_converter * translate(ast_translation & translator);
|
||||
model_converter * translate(ast_translation & translator) override;
|
||||
|
||||
protected:
|
||||
fpa2bv_model_converter(ast_manager & m) :
|
||||
|
|
|
@ -48,14 +48,13 @@ class fpa2bv_tactic : public tactic {
|
|||
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
m_proofs_enabled = g->proofs_enabled();
|
||||
m_produce_models = g->models_enabled();
|
||||
m_produce_unsat_cores = g->unsat_core_enabled();
|
||||
|
||||
mc = 0; core = 0; result.reset();
|
||||
core = 0; result.reset();
|
||||
tactic_report report("fpa2bv", *g);
|
||||
m_rw.reset();
|
||||
|
||||
|
@ -99,7 +98,7 @@ class fpa2bv_tactic : public tactic {
|
|||
}
|
||||
|
||||
if (g->models_enabled())
|
||||
mc = mk_fpa2bv_model_converter(m, m_conv);
|
||||
g->add(mk_fpa2bv_model_converter(m, m_conv));
|
||||
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
@ -109,7 +108,7 @@ class fpa2bv_tactic : public tactic {
|
|||
|
||||
SASSERT(g->is_well_sorted());
|
||||
TRACE("fpa2bv", tout << "AFTER: " << std::endl; g->display(tout);
|
||||
if (mc) mc->display(tout); tout << std::endl; );
|
||||
if (g->mc()) g->mc()->display(tout); tout << std::endl; );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -140,10 +139,9 @@ public:
|
|||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
expr_dependency_ref & core) {
|
||||
try {
|
||||
(*m_imp)(in, result, mc, core);
|
||||
(*m_imp)(in, result, core);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue