mirror of
https://github.com/Z3Prover/z3
synced 2025-09-04 09:07:40 +00:00
implementing model updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
92b5301b7f
commit
3de8c193ea
63 changed files with 482 additions and 294 deletions
|
@ -63,6 +63,8 @@ namespace datalog {
|
|||
return alloc(bit_blast_model_converter, m);
|
||||
}
|
||||
|
||||
virtual void display(std::ostream& out) { out << "(bit-blast-model-converter)\n"; }
|
||||
|
||||
virtual void operator()(model_ref & model) {
|
||||
for (unsigned i = 0; i < m_new_funcs.size(); ++i) {
|
||||
func_decl* p = m_new_funcs[i].get();
|
||||
|
|
|
@ -150,6 +150,8 @@ namespace datalog {
|
|||
return mc;
|
||||
}
|
||||
|
||||
virtual void display(std::ostream& out) { out << "(add-invariant-model-converter)\n"; }
|
||||
|
||||
private:
|
||||
void mk_body(matrix const& M, expr_ref& body) {
|
||||
expr_ref_vector conj(m);
|
||||
|
|
|
@ -53,6 +53,8 @@ namespace datalog {
|
|||
return alloc(qa_model_converter, m);
|
||||
}
|
||||
|
||||
virtual void display(std::ostream& out) { display_add(out, m); }
|
||||
|
||||
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);
|
||||
|
@ -81,7 +83,11 @@ namespace datalog {
|
|||
SASSERT(body);
|
||||
}
|
||||
else {
|
||||
body = m.mk_false();
|
||||
expr_ref_vector args(m);
|
||||
for (unsigned i = 0; i < p->get_arity(); ++i) {
|
||||
args.push_back(m.mk_var(i, p->get_domain(i)));
|
||||
}
|
||||
body = m.mk_app(p, args.size(), args.c_ptr());
|
||||
}
|
||||
// Create quantifier wrapper around body.
|
||||
|
||||
|
|
|
@ -99,6 +99,9 @@ namespace datalog {
|
|||
UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void display(std::ostream& out) { out << "(scale-model-converter)\n"; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -283,6 +283,8 @@ namespace datalog {
|
|||
// this would require implementing translation for the dl_context.
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void display(std::ostream& out) { out << "(slice-proof-converter)\n"; }
|
||||
};
|
||||
|
||||
class mk_slice::slice_model_converter : public model_converter {
|
||||
|
@ -396,6 +398,8 @@ namespace datalog {
|
|||
return 0;
|
||||
}
|
||||
|
||||
virtual void display(std::ostream& out) { out << "(slice-model-converter)\n"; }
|
||||
|
||||
};
|
||||
|
||||
mk_slice::mk_slice(context & ctx):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue