mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +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
|
@ -31,7 +31,6 @@ Notes:
|
|||
#include "sat/tactic/goal2sat.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "tactic/filter_model_converter.h"
|
||||
#include "tactic/bv/bit_blaster_model_converter.h"
|
||||
#include "ast/ast_translation.h"
|
||||
#include "ast/ast_util.h"
|
||||
|
@ -241,13 +240,13 @@ public:
|
|||
virtual unsigned get_scope_level() const {
|
||||
return m_num_scopes;
|
||||
}
|
||||
virtual void assert_expr(expr * t, expr * a) {
|
||||
virtual void assert_expr_core(expr * t, expr * a) {
|
||||
if (a) {
|
||||
m_asmsf.push_back(a);
|
||||
assert_expr(m.mk_implies(a, t));
|
||||
assert_expr_core(m.mk_implies(a, t));
|
||||
}
|
||||
else {
|
||||
assert_expr(t);
|
||||
assert_expr_core(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,7 +260,7 @@ public:
|
|||
}
|
||||
|
||||
virtual ast_manager& get_manager() const { return m; }
|
||||
virtual void assert_expr(expr * t) {
|
||||
virtual void assert_expr_core(expr * t) {
|
||||
m_internalized = false;
|
||||
TRACE("goal2sat", tout << mk_pp(t, m) << "\n";);
|
||||
m_fmls.push_back(t);
|
||||
|
|
|
@ -38,7 +38,7 @@ Notes:
|
|||
#include "model/model_evaluator.h"
|
||||
#include "model/model_v2_pp.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/filter_model_converter.h"
|
||||
#include "tactic/generic_model_converter.h"
|
||||
#include<sstream>
|
||||
|
||||
struct goal2sat::imp {
|
||||
|
@ -883,7 +883,7 @@ struct sat2goal::imp {
|
|||
class sat_model_converter : public model_converter {
|
||||
sat::model_converter m_mc;
|
||||
expr_ref_vector m_var2expr;
|
||||
filter_model_converter_ref m_fmc; // filter for eliminating fresh variables introduced in the assertion-set --> sat conversion
|
||||
generic_model_converter_ref m_fmc; // filter for eliminating fresh variables introduced in the assertion-set --> sat conversion
|
||||
|
||||
sat_model_converter(ast_manager & m):
|
||||
m_var2expr(m) {
|
||||
|
@ -892,7 +892,7 @@ struct sat2goal::imp {
|
|||
public:
|
||||
sat_model_converter(ast_manager & m, sat::solver const & s):m_var2expr(m) {
|
||||
m_mc.copy(s.get_model_converter());
|
||||
m_fmc = alloc(filter_model_converter, m);
|
||||
m_fmc = alloc(generic_model_converter, m);
|
||||
}
|
||||
|
||||
ast_manager & m() { return m_var2expr.get_manager(); }
|
||||
|
@ -907,7 +907,7 @@ struct sat2goal::imp {
|
|||
if (aux) {
|
||||
SASSERT(is_uninterp_const(atom));
|
||||
SASSERT(m().is_bool(atom));
|
||||
m_fmc->insert(to_app(atom)->get_decl());
|
||||
m_fmc->hide(to_app(atom)->get_decl());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -976,7 +976,7 @@ struct sat2goal::imp {
|
|||
|
||||
virtual model_converter * translate(ast_translation & translator) {
|
||||
sat_model_converter * res = alloc(sat_model_converter, translator.to());
|
||||
res->m_fmc = static_cast<filter_model_converter*>(m_fmc->translate(translator));
|
||||
res->m_fmc = static_cast<generic_model_converter*>(m_fmc->translate(translator));
|
||||
for (expr* e : m_var2expr)
|
||||
res->m_var2expr.push_back(e ? translator(e) : nullptr);
|
||||
return res;
|
||||
|
|
|
@ -18,7 +18,6 @@ Notes:
|
|||
--*/
|
||||
#include "ast/ast_pp.h"
|
||||
#include "tactic/tactical.h"
|
||||
#include "tactic/filter_model_converter.h"
|
||||
#include "sat/tactic/goal2sat.h"
|
||||
#include "sat/sat_solver.h"
|
||||
#include "model/model_v2_pp.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue