summaryrefslogtreecommitdiff
path: root/src/theory/arith
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/arith')
-rw-r--r--src/theory/arith/theory_arith_type_rules.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/theory/arith/theory_arith_type_rules.h b/src/theory/arith/theory_arith_type_rules.h
index 69c98a255..af358b00d 100644
--- a/src/theory/arith/theory_arith_type_rules.h
+++ b/src/theory/arith/theory_arith_type_rules.h
@@ -59,7 +59,7 @@ public:
}
}
if( check ) {
- if(childType != integerType && childType != realType) {
+ if(!childType.isReal()) {
throw TypeCheckingExceptionPrivate(n, "expecting an arithmetic subterm");
}
}
@@ -73,14 +73,13 @@ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
if( check ) {
- TypeNode integerType = nodeManager->integerType();
- TypeNode realType = nodeManager->realType();
TypeNode lhsType = n[0].getType(check);
- if (lhsType != integerType && lhsType != realType) {
+ if (!lhsType.isReal()) {
+ std::cout << lhsType << " : " << n[0] << std::endl;
throw TypeCheckingExceptionPrivate(n, "expecting an arithmetic term on the left-hand-side");
}
TypeNode rhsType = n[1].getType(check);
- if (rhsType != integerType && rhsType != realType) {
+ if (!rhsType.isReal()) {
throw TypeCheckingExceptionPrivate(n, "expecting an arithmetic term on the right-hand-side");
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback