3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

address divergence in the case of shared theory symbols. Codeplex issue 147, thanks to George Karpenkov

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-12-09 16:04:25 +01:00
commit 08cb8b8de8
74 changed files with 1280 additions and 896 deletions

View file

@ -131,7 +131,7 @@ public:
value const& get(key const& k, value const& default_value) const {
entry* e = find_core(k);
if (e) {
return e->m_value;
return e->get_data().m_value;
}
else {
return default_value;

View file

@ -1535,7 +1535,7 @@ bool mpz_manager<SYNCH>::is_power_of_two(mpz const & a, unsigned & shift) {
return false;
if (is_small(a)) {
if (::is_power_of_two(a.m_val)) {
shift = ::log2(a.m_val);
shift = ::log2((unsigned)a.m_val);
return true;
}
else {
@ -1838,7 +1838,7 @@ unsigned mpz_manager<SYNCH>::log2(mpz const & a) {
if (is_nonpos(a))
return 0;
if (is_small(a))
return ::log2(a.m_val);
return ::log2((unsigned)a.m_val);
#ifndef _MP_GMP
COMPILE_TIME_ASSERT(sizeof(digit_t) == 8 || sizeof(digit_t) == 4);
mpz_cell * c = a.m_ptr;
@ -1860,7 +1860,7 @@ unsigned mpz_manager<SYNCH>::mlog2(mpz const & a) {
if (is_nonneg(a))
return 0;
if (is_small(a))
return ::log2(-a.m_val);
return ::log2((unsigned)-a.m_val);
#ifndef _MP_GMP
COMPILE_TIME_ASSERT(sizeof(digit_t) == 8 || sizeof(digit_t) == 4);
mpz_cell * c = a.m_ptr;