mirror of
https://github.com/Z3Prover/z3
synced 2025-06-05 21:53:23 +00:00
parent
1d77e3e19f
commit
dd07d21f6c
2 changed files with 7 additions and 2 deletions
|
@ -181,13 +181,16 @@ struct expr2polynomial::imp {
|
||||||
case OP_POWER: {
|
case OP_POWER: {
|
||||||
rational k;
|
rational k;
|
||||||
SASSERT(t->get_num_args() == 2);
|
SASSERT(t->get_num_args() == 2);
|
||||||
if (!m_autil.is_numeral(t->get_arg(1), k) || !k.is_int() || !k.is_unsigned()) {
|
if (!m_autil.is_numeral(t->get_arg(1), k) || !k.is_unsigned()) {
|
||||||
if (m_use_var_idxs)
|
if (m_use_var_idxs)
|
||||||
throw_not_polynomial();
|
throw_not_polynomial();
|
||||||
else
|
else
|
||||||
store_var_poly(t);
|
store_var_poly(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (k.is_zero()) {
|
||||||
|
throw_not_polynomial();
|
||||||
|
}
|
||||||
push_frame(t);
|
push_frame(t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ struct has_nlmul {
|
||||||
case OP_IDIV: case OP_DIV: case OP_REM: case OP_MOD:
|
case OP_IDIV: case OP_DIV: case OP_REM: case OP_MOD:
|
||||||
if (!a.is_numeral(n->get_arg(1)))
|
if (!a.is_numeral(n->get_arg(1)))
|
||||||
throw_found(n);
|
throw_found(n);
|
||||||
break;
|
break;
|
||||||
case OP_POWER:
|
case OP_POWER:
|
||||||
throw_found(n);
|
throw_found(n);
|
||||||
default:
|
default:
|
||||||
|
@ -500,6 +500,8 @@ struct is_non_nira_functor {
|
||||||
case OP_POWER:
|
case OP_POWER:
|
||||||
if (m_linear)
|
if (m_linear)
|
||||||
throw_found(n);
|
throw_found(n);
|
||||||
|
if (!u.is_numeral(n->get_arg(0), r) || !r.is_unsigned() || r.is_zero())
|
||||||
|
throw_found(n);
|
||||||
return;
|
return;
|
||||||
case OP_IRRATIONAL_ALGEBRAIC_NUM:
|
case OP_IRRATIONAL_ALGEBRAIC_NUM:
|
||||||
if (m_linear || !m_real)
|
if (m_linear || !m_real)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue