return StringType(Type(d_nodeManager, new TypeNode(d_nodeManager->stringType())));
}
+RegExpType ExprManager::regExpType() const {
+ NodeManagerScope nms(d_nodeManager);
+ return StringType(Type(d_nodeManager, new TypeNode(d_nodeManager->regExpType())));
+}
+
RealType ExprManager::realType() const {
NodeManagerScope nms(d_nodeManager);
return RealType(Type(d_nodeManager, new TypeNode(d_nodeManager->realType())));
/** Get the type for strings. */
StringType stringType() const;
+ /** Get the type for regular expressions. */
+ RegExpType regExpType() const;
+
/** Get the type for reals. */
RealType realType() const;
inline TypeNode stringType();
/** Get the (singleton) type for RegExp. */
- inline TypeNode regexpType();
+ inline TypeNode regExpType();
/** Get the (singleton) type for rounding modes. */
inline TypeNode roundingModeType();
}
/** Get the (singleton) type for regexps. */
-inline TypeNode NodeManager::regexpType() {
+inline TypeNode NodeManager::regExpType() {
return TypeNode(mkTypeConst<TypeConstant>(REGEXP_TYPE));
}
return d_typeNode->isString();
}
+/** Is this the regexp type? */
+bool Type::isRegExp() const {
+ NodeManagerScope nms(d_nodeManager);
+ return d_typeNode->isRegExp();
+}
+
/** Is this the rounding mode type? */
bool Type::isRoundingMode() const {
NodeManagerScope nms(d_nodeManager);
PrettyCheckArgument(isNull() || isString(), this);
}
+RegExpType::RegExpType(const Type& t) throw(IllegalArgumentException) :
+ Type(t) {
+ PrettyCheckArgument(isNull() || isRegExp(), this);
+}
+
RoundingModeType::RoundingModeType(const Type& t) throw(IllegalArgumentException) :
Type(t) {
PrettyCheckArgument(isNull() || isRoundingMode(), this);
class IntegerType;
class RealType;
class StringType;
+class RegExpType;
class RoundingModeType;
class BitVectorType;
class ArrayType;
*/
bool isString() const;
+ /**
+ * Is this the regexp type?
+ * @return true if the type is the regexp type
+ */
+ bool isRegExp() const;
+
/**
* Is this the rounding mode type?
* @return true if the type is the rounding mode type
StringType(const Type& type) throw(IllegalArgumentException);
};/* class StringType */
+/**
+ * Singleton class encapsulating the string type.
+ */
+class CVC4_PUBLIC RegExpType : public Type {
+
+public:
+
+ /** Construct from the base type */
+ RegExpType(const Type& type) throw(IllegalArgumentException);
+};/* class RegExpType */
+
+
/**
* Singleton class encapsulating the rounding mode type.
*/
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw TypeCheckingExceptionPrivate(n, "expecting at least 2 terms in regexp concat");
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
}
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
}
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw TypeCheckingExceptionPrivate(n, "expecting regexp terms");
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw TypeCheckingExceptionPrivate(n, "expecting regexp terms");
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw TypeCheckingExceptionPrivate(n, "expecting regexp terms");
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw TypeCheckingExceptionPrivate(n, "expecting standard ASCII characters in regexp range, or please set the option strings-std-ascii to be false");
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
//}
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
// throw TypeCheckingExceptionPrivate(n, "expecting constant string terms");
//}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw (TypeCheckingExceptionPrivate, AssertionException) {
Assert(n.getKind() == kind::REGEXP_EMPTY);
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw (TypeCheckingExceptionPrivate, AssertionException) {
Assert(n.getKind() == kind::REGEXP_SIGMA);
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};
throw TypeCheckingExceptionPrivate(n, "expecting an integer term in RV");
}
}
- return nodeManager->regexpType();
+ return nodeManager->regExpType();
}
};