3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00

merge with master

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-03-25 14:57:01 -07:00
commit c513f3ca09
883 changed files with 13979 additions and 16480 deletions

View file

@ -888,6 +888,8 @@ br_status arith_rewriter::mk_mod_core(expr * arg1, expr * arg2, expr_ref & resul
continue;
if (m_util.is_numeral(arg, arg_v) && mod(arg_v, v2) == arg_v)
continue;
if (m().is_ite(arg))
continue;
// found target for rewriting
break;
}
@ -1099,7 +1101,7 @@ br_status arith_rewriter::mk_power_core(expr * arg1, expr * arg2, expr_ref & res
br_status arith_rewriter::mk_to_int_core(expr * arg, expr_ref & result) {
numeral a;
expr* x = 0;
expr* x = nullptr;
if (m_util.is_numeral(arg, a)) {
result = m_util.mk_numeral(floor(a), true);
return BR_DONE;
@ -1346,7 +1348,7 @@ expr * arith_rewriter::mk_sin_value(rational const & k) {
expr * result = m_util.mk_div(m_util.mk_add(mk_sqrt(rational(6)), mk_sqrt(rational(2))), m_util.mk_numeral(rational(4), false));
return neg ? m_util.mk_uminus(result) : result;
}
return 0;
return nullptr;
}
br_status arith_rewriter::mk_sin_core(expr * arg, expr_ref & result) {
@ -1370,7 +1372,7 @@ br_status arith_rewriter::mk_sin_core(expr * arg, expr_ref & result) {
if (is_pi_multiple(arg, k)) {
result = mk_sin_value(k);
if (result.get() != 0)
if (result.get() != nullptr)
return BR_REWRITE_FULL;
}
@ -1429,7 +1431,7 @@ br_status arith_rewriter::mk_cos_core(expr * arg, expr_ref & result) {
if (is_pi_multiple(arg, k)) {
k = k + rational(1, 2);
result = mk_sin_value(k);
if (result.get() != 0)
if (result.get() != nullptr)
return BR_REWRITE_FULL;
}
@ -1486,7 +1488,7 @@ br_status arith_rewriter::mk_tan_core(expr * arg, expr_ref & result) {
if (is_pi_multiple(arg, k)) {
expr_ref n(m()), d(m());
n = mk_sin_value(k);
if (n.get() == 0)
if (n.get() == nullptr)
goto end;
if (is_zero(n)) {
result = n;