mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
add unit extraction
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
75ba65a18a
commit
718e5a9b6c
27 changed files with 207 additions and 76 deletions
|
@ -387,6 +387,9 @@ namespace datalog {
|
|||
void operator()(model_ref&) override {}
|
||||
|
||||
void display(std::ostream & out) override { }
|
||||
|
||||
void get_units(obj_map<expr, bool>& units) override {}
|
||||
|
||||
};
|
||||
|
||||
model_converter* mk_skip_model_converter() { return alloc(skip_model_converter); }
|
||||
|
|
|
@ -63,6 +63,8 @@ namespace datalog {
|
|||
return alloc(bit_blast_model_converter, m);
|
||||
}
|
||||
|
||||
virtual void get_units(obj_map<expr, bool>& units) {}
|
||||
|
||||
virtual void display(std::ostream& out) { out << "(bit-blast-model-converter)\n"; }
|
||||
|
||||
virtual void operator()(model_ref & model) {
|
||||
|
|
|
@ -120,6 +120,8 @@ namespace datalog {
|
|||
}
|
||||
}
|
||||
|
||||
virtual void get_units(obj_map<expr, bool>& units) {}
|
||||
|
||||
virtual void operator()(model_ref & mr) {
|
||||
for (unsigned i = 0; i < m_funcs.size(); ++i) {
|
||||
func_decl* p = m_funcs[i].get();
|
||||
|
|
|
@ -55,6 +55,8 @@ namespace datalog {
|
|||
|
||||
virtual void display(std::ostream& out) { display_add(out, m); }
|
||||
|
||||
virtual void get_units(obj_map<expr, bool>& units) { units.reset(); }
|
||||
|
||||
void insert(func_decl* old_p, func_decl* new_p, expr_ref_vector& sub, sort_ref_vector& sorts, svector<bool> const& bound) {
|
||||
m_old_funcs.push_back(old_p);
|
||||
m_new_funcs.push_back(new_p);
|
||||
|
|
|
@ -38,13 +38,13 @@ namespace datalog {
|
|||
m_new2old.insert(new_f, old_f);
|
||||
}
|
||||
|
||||
virtual void get_units(obj_map<expr, bool>& units) { units.reset(); }
|
||||
|
||||
virtual void operator()(model_ref& md) {
|
||||
model_ref old_model = alloc(model, m);
|
||||
obj_map<func_decl, func_decl*>::iterator it = m_new2old.begin();
|
||||
obj_map<func_decl, func_decl*>::iterator end = m_new2old.end();
|
||||
for (; it != end; ++it) {
|
||||
func_decl* old_p = it->m_value;
|
||||
func_decl* new_p = it->m_key;
|
||||
for (auto const& kv : m_new2old) {
|
||||
func_decl* old_p = kv.m_value;
|
||||
func_decl* new_p = kv.m_key;
|
||||
func_interp* old_fi = alloc(func_interp, m, old_p->get_arity());
|
||||
|
||||
if (new_p->get_arity() == 0) {
|
||||
|
|
|
@ -308,6 +308,8 @@ namespace datalog {
|
|||
m_sliceable.insert(f, bv);
|
||||
}
|
||||
|
||||
void get_units(obj_map<expr, bool>& units) override {}
|
||||
|
||||
void operator()(model_ref & md) override {
|
||||
if (m_slice2old.empty()) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue