3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-08-03 13:53:38 -07:00
parent 06e48c89f2
commit 91ee52e549
2 changed files with 5 additions and 2 deletions

View file

@ -81,8 +81,9 @@ app * arith_decl_plugin::mk_numeral(algebraic_numbers::anum const & val, bool is
return mk_numeral(rval, is_int);
}
else {
if (is_int)
if (is_int) {
m_manager->raise_exception("invalid irrational value passed as an integer");
}
unsigned idx = aw().mk_id(val);
parameter p(idx, true);
SASSERT(p.is_external());

View file

@ -1224,7 +1224,9 @@ namespace smt {
app * rhs = to_app(n->get_arg(1));
expr * rhs2;
if (m_util.is_to_real(rhs, rhs2) && is_app(rhs2)) { rhs = to_app(rhs2); }
SASSERT(m_util.is_numeral(rhs));
if (!m_util.is_numeral(rhs)) {
throw default_exception("malformed atomic constraint");
}
theory_var v = internalize_term_core(lhs);
if (v == null_theory_var) {
TRACE("arith_internalize", tout << "failed to internalize: #" << n->get_id() << "\n";);