mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 21:08:46 +00:00
implement get_lower, get_upper in theory_lra.cpp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
da44ad7e6f
commit
342feeff03
|
@ -2612,12 +2612,26 @@ public:
|
|||
}
|
||||
|
||||
bool get_lower(enode* n, expr_ref& r) {
|
||||
NOT_IMPLEMENTED_YET();
|
||||
theory_var v = n->get_th_var(get_id());
|
||||
lp::constraint_index ci;
|
||||
rational val;
|
||||
bool is_strict;
|
||||
if (m_solver->has_lower_bound(v, ci, val, is_strict)) {
|
||||
r = a.mk_numeral(val, is_int(n));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool get_upper(enode* n, expr_ref& r) {
|
||||
NOT_IMPLEMENTED_YET();
|
||||
theory_var v = n->get_th_var(get_id());
|
||||
lp::constraint_index ci;
|
||||
rational val;
|
||||
bool is_strict;
|
||||
if (m_solver->has_upper_bound(v, ci, val, is_strict)) {
|
||||
r = a.mk_numeral(val, is_int(n));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue