(this commit was certified error- and warning-free by the test-and-commit script.)
// doesn't match the SMT-LIBv2 standard...
if(formals.size() > 0) {
Type rangeType = FunctionType(funcType).getRangeType();
- if(formulaType != rangeType) {
+ if(! formulaType.isComparableTo(rangeType)) {
stringstream ss;
ss << "Type of defined function does not match its declaration\n"
<< "The function : " << func << "\n"
throw TypeCheckingException(func, ss.str());
}
} else {
- if(formulaType != funcType) {
+ if(! formulaType.isComparableTo(funcType)) {
stringstream ss;
ss << "Declared type of defined constant does not match its definition\n"
<< "The constant : " << func << "\n"
TNode::iterator argument_it_end = n.end();
TypeNode::iterator argument_type_it = fType.begin();
for(; argument_it != argument_it_end; ++argument_it, ++argument_type_it) {
- if((*argument_it).getType() != *argument_type_it) {
+ if(!(*argument_it).getType().isComparableTo(*argument_type_it)) {
std::stringstream ss;
ss << "argument types do not match the function type:\n"
<< "argument: " << *argument_it << "\n"
for(; argument_it != argument_it_end; ++argument_it, ++argument_type_it) {
TypeNode currentArgument = (*argument_it).getType();
TypeNode currentArgumentType = *argument_type_it;
- if(!currentArgument.isSubtypeOf(currentArgumentType)) {
+ if(!currentArgument.isComparableTo(currentArgumentType)) {
std::stringstream ss;
ss << "argument type is not a subtype of the function's argument type:\n"
<< "argument: " << *argument_it << "\n"