[SMTChecker] Fix rational number short circuit

This commit is contained in:
Leonardo Alt
2020-09-01 17:21:13 +02:00
parent e582731aab
commit 49d3804de4
3 changed files with 32 additions and 2 deletions
+5 -2
View File
@@ -452,11 +452,14 @@ void SMTEncoder::endVisit(TupleExpression const& _tuple)
void SMTEncoder::endVisit(UnaryOperation const& _op)
{
if (TokenTraits::isBitOp(_op.getOperator()))
return bitwiseNotOperation(_op);
/// We need to shortcut here due to potentially unknown
/// rational number sizes.
if (_op.annotation().type->category() == Type::Category::RationalNumber)
return;
if (TokenTraits::isBitOp(_op.getOperator()))
return bitwiseNotOperation(_op);
createExpr(_op);
auto const* subExpr = innermostTuple(_op.subExpression());