From: Gereon Kremer Date: Wed, 5 Aug 2020 18:55:00 +0000 (+0200) Subject: Improve error message for unsupported exponents (#4852) X-Git-Tag: cvc5-1.0.0~3037 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47f003828a8ba0cd8edd362accaef8b2449b0c46;p=cvc5.git Improve error message for unsupported exponents (#4852) We have had a few issues where essentially users misinterpreted the error message about which types of exponents are supported for (^ base exp). Given that this is rewritten to a multiplication of length exp, we only support reasonably small natural numbers. This PR improves the error message. Fixes #4692 --- diff --git a/src/theory/arith/arith_rewriter.cpp b/src/theory/arith/arith_rewriter.cpp index 188ef47e6..f0e0487a0 100644 --- a/src/theory/arith/arith_rewriter.cpp +++ b/src/theory/arith/arith_rewriter.cpp @@ -229,8 +229,9 @@ RewriteResponse ArithRewriter::postRewriteTerm(TNode t){ if(exp.sgn() == 0){ return RewriteResponse(REWRITE_DONE, mkRationalNode(Rational(1))); }else if(exp.sgn() > 0 && exp.isIntegral()){ - CVC4::Rational r(INT_MAX); - if( exp