mirror of
https://github.com/Z3Prover/z3
synced 2025-08-10 21:20:52 +00:00
Enable model construction and evaluation for theory functions that may be uninterpreted. To fix issue #237
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7169fc469e
commit
feba64b739
5 changed files with 75 additions and 52 deletions
|
@ -400,7 +400,12 @@ namespace smt {
|
|||
\brief Return true if the interpretation of the function should be included in the model.
|
||||
*/
|
||||
bool model_generator::include_func_interp(func_decl * f) const {
|
||||
return f->get_family_id() == null_family_id;
|
||||
family_id fid = f->get_family_id();
|
||||
if (fid == null_family_id) return true;
|
||||
if (fid == m_manager.get_basic_family_id()) return false;
|
||||
theory * th = m_context->get_theory(fid);
|
||||
if (!th) return true;
|
||||
return th->include_func_interp(f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -412,6 +412,10 @@ namespace smt {
|
|||
return 0;
|
||||
}
|
||||
|
||||
virtual bool include_func_interp(func_decl* f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Model checker
|
||||
|
|
|
@ -1283,6 +1283,21 @@ namespace smt {
|
|||
theory::reset_eh();
|
||||
}
|
||||
|
||||
bool theory_bv::include_func_interp(func_decl* f) {
|
||||
SASSERT(f->get_family_id() == get_family_id());
|
||||
switch (f->get_decl_kind()) {
|
||||
case OP_BSDIV0:
|
||||
case OP_BUDIV0:
|
||||
case OP_BSREM0:
|
||||
case OP_BUREM0:
|
||||
case OP_BSMOD0:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
theory_bv::theory_bv(ast_manager & m, theory_bv_params const & params, bit_blaster_params const & bb_params):
|
||||
theory(m.mk_family_id("bv")),
|
||||
m_params(params),
|
||||
|
|
|
@ -236,6 +236,7 @@ namespace smt {
|
|||
virtual void pop_scope_eh(unsigned num_scopes);
|
||||
virtual final_check_status final_check_eh();
|
||||
virtual void reset_eh();
|
||||
virtual bool include_func_interp(func_decl* f);
|
||||
svector<theory_var> m_merge_aux[2]; //!< auxiliary vector used in merge_zero_one_bits
|
||||
bool merge_zero_one_bits(theory_var r1, theory_var r2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue