3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 19:05:51 +00:00

Add get_sort(expr * n) function that does not depend on ast_manager. Move power_of_two to rational class. Add arith_recognizers and bv_recognizers classes. The two new classes contain the 'read-only' methods from arith_util and bv_util.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-18 14:44:51 -08:00
parent 4f0d5a5756
commit cec328cfdc
17 changed files with 314 additions and 282 deletions

View file

@ -647,9 +647,9 @@ class elim_uncnstr_tactic : public tactic {
unsigned bv_sz = m_bv_util.get_bv_size(arg1);
rational MAX;
if (is_signed)
MAX = m_bv_util.power_of_two(bv_sz - 1) - rational(1);
MAX = rational::power_of_two(bv_sz - 1) - rational(1);
else
MAX = m_bv_util.power_of_two(bv_sz) - rational(1);
MAX = rational::power_of_two(bv_sz) - rational(1);
app * u;
bool is_new = mk_fresh_uncnstr_var_for(f, arg1, arg2, u);
app * r = m().mk_or(u, m().mk_eq(t, m_bv_util.mk_numeral(MAX, bv_sz)));
@ -666,7 +666,7 @@ class elim_uncnstr_tactic : public tactic {
unsigned bv_sz = m_bv_util.get_bv_size(arg1);
rational MIN;
if (is_signed)
MIN = -m_bv_util.power_of_two(bv_sz - 1);
MIN = -rational::power_of_two(bv_sz - 1);
else
MIN = rational(0);
app * u;