mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
add stubs for converting assertions, consolidate filter_model_converter
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
53e36c9cf9
commit
0d15b6abb7
76 changed files with 244 additions and 356 deletions
|
@ -41,7 +41,7 @@ Revision History:
|
|||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "ast/rewriter/bool_rewriter.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "tactic/filter_model_converter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "ast/scoped_proof.h"
|
||||
#include "ast/datatype_decl_plugin.h"
|
||||
#include "ast/ast_util.h"
|
||||
|
@ -326,8 +326,8 @@ namespace datalog {
|
|||
rules.set_output_predicate(qpred);
|
||||
|
||||
if (m_ctx.get_model_converter()) {
|
||||
filter_model_converter* mc = alloc(filter_model_converter, m);
|
||||
mc->insert(qpred);
|
||||
generic_model_converter* mc = alloc(generic_model_converter, m);
|
||||
mc->hide(qpred);
|
||||
m_ctx.add_model_converter(mc);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "ast/rewriter/expr_replacer.h"
|
||||
#include "muz/base/dl_rule_transformer.h"
|
||||
#include "muz/transforms/dl_mk_slice.h"
|
||||
#include "tactic/filter_model_converter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "muz/transforms/dl_transforms.h"
|
||||
#include "muz/base/fixedpoint_params.hpp"
|
||||
#include "ast/ast_util.h"
|
||||
|
@ -229,8 +229,8 @@ class horn_tactic : public tactic {
|
|||
}
|
||||
queries.reset();
|
||||
queries.push_back(q);
|
||||
filter_model_converter* mc1 = alloc(filter_model_converter, m);
|
||||
mc1->insert(to_app(q)->get_decl());
|
||||
generic_model_converter* mc1 = alloc(generic_model_converter, m);
|
||||
mc1->hide(q);
|
||||
mc = mc1;
|
||||
}
|
||||
SASSERT(queries.size() == 1);
|
||||
|
|
|
@ -112,10 +112,10 @@ public:
|
|||
{m_solver.collect_param_descrs(r);}
|
||||
virtual void set_produce_models(bool f)
|
||||
{m_solver.set_produce_models(f);}
|
||||
virtual void assert_expr(expr *t)
|
||||
virtual void assert_expr_core(expr *t)
|
||||
{m_solver.assert_expr(t);}
|
||||
|
||||
virtual void assert_expr(expr *t, expr *a)
|
||||
virtual void assert_expr_core(expr *t, expr *a)
|
||||
{NOT_IMPLEMENTED_YET();}
|
||||
virtual void assert_lemma(expr* e) { NOT_IMPLEMENTED_YET(); }
|
||||
virtual expr_ref lookahead(const expr_ref_vector &,const expr_ref_vector &) { return expr_ref(m.mk_true(), m); }
|
||||
|
|
|
@ -50,7 +50,7 @@ virtual_solver::virtual_solver(virtual_solver_factory &factory,
|
|||
// -- change m_context, but will add m_pred to
|
||||
// -- the private field solver_na2as::m_assumptions
|
||||
if (m_virtual)
|
||||
{ solver_na2as::assert_expr(m.mk_true(), m_pred); }
|
||||
{ solver_na2as::assert_expr_core(m.mk_true(), m_pred); }
|
||||
}
|
||||
|
||||
virtual_solver::~virtual_solver()
|
||||
|
@ -210,7 +210,7 @@ void virtual_solver::get_unsat_core(ptr_vector<expr> &r)
|
|||
}
|
||||
}
|
||||
|
||||
void virtual_solver::assert_expr(expr *e)
|
||||
void virtual_solver::assert_expr_core(expr *e)
|
||||
{
|
||||
SASSERT(!m_pushed || get_scope_level() > 0);
|
||||
if (m.is_true(e)) { return; }
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
}
|
||||
|
||||
virtual void get_unsat_core(ptr_vector<expr> &r);
|
||||
virtual void assert_expr(expr *e);
|
||||
virtual void assert_expr_core(expr *e);
|
||||
virtual void collect_statistics(statistics &st) const {}
|
||||
virtual void get_model_core(model_ref &m) {m_context.get_model(m);}
|
||||
virtual proof* get_proof();
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/rewriter/expr_safe_replace.h"
|
||||
#include "tactic/filter_model_converter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include "muz/transforms/dl_mk_interp_tail_simplifier.h"
|
||||
#include "muz/base/fixedpoint_params.hpp"
|
||||
#include "ast/scoped_proof.h"
|
||||
|
@ -299,12 +299,12 @@ namespace datalog {
|
|||
}
|
||||
|
||||
if (m_context.get_model_converter()) {
|
||||
filter_model_converter* fmc = alloc(filter_model_converter, m);
|
||||
generic_model_converter* fmc = alloc(generic_model_converter, m);
|
||||
bit_blast_model_converter* bvmc = alloc(bit_blast_model_converter, m);
|
||||
func_decl_ref_vector const& old_funcs = m_rewriter.m_cfg.old_funcs();
|
||||
func_decl_ref_vector const& new_funcs = m_rewriter.m_cfg.new_funcs();
|
||||
for (unsigned i = 0; i < old_funcs.size(); ++i) {
|
||||
fmc->insert(new_funcs[i]);
|
||||
fmc->hide(new_funcs[i]);
|
||||
bvmc->insert(old_funcs[i], new_funcs[i]);
|
||||
}
|
||||
m_context.add_model_converter(concat(bvmc, fmc));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue