mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 09:20:22 +00:00
add accessors for implied values to API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
4628cb8e79
commit
59d8895d15
23 changed files with 347 additions and 2 deletions
|
@ -125,9 +125,37 @@ namespace smt {
|
|||
return false;
|
||||
}
|
||||
|
||||
expr_ref arith_value::get_lo(expr* e) const {
|
||||
rational lo;
|
||||
bool s = false;
|
||||
if (a.is_int_real(e) && get_lo(e, lo, s) && !s) {
|
||||
return expr_ref(a.mk_numeral(lo, m.get_sort(e)), m);
|
||||
}
|
||||
return expr_ref(e, m);
|
||||
}
|
||||
|
||||
expr_ref arith_value::get_up(expr* e) const {
|
||||
rational up;
|
||||
bool s = false;
|
||||
if (a.is_int_real(e) && get_up(e, up, s) && !s) {
|
||||
return expr_ref(a.mk_numeral(up, m.get_sort(e)), m);
|
||||
}
|
||||
return expr_ref(e, m);
|
||||
}
|
||||
|
||||
expr_ref arith_value::get_fixed(expr* e) const {
|
||||
rational lo, up;
|
||||
bool s = false;
|
||||
if (a.is_int_real(e) && get_lo(e, lo, s) && !s && get_up(e, up, s) && !s && lo == up) {
|
||||
return expr_ref(a.mk_numeral(lo, m.get_sort(e)), m);
|
||||
}
|
||||
return expr_ref(e, m);
|
||||
}
|
||||
|
||||
final_check_status arith_value::final_check() {
|
||||
family_id afid = a.get_family_id();
|
||||
theory * th = m_ctx->get_theory(afid);
|
||||
return th->final_check_eh();
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue