return getSubtypePredicate().getType().getArgTypes()[0];
}
+TypeNode TypeNode::getBaseType() const {
+ TypeNode realt = NodeManager::currentNM()->realType();
+ if (isSubtypeOf(realt)) {
+ return realt;
+ }
+ else if (isPredicateSubtype()) {
+ return getSubtypeBaseType();
+ }
+ return *this;
+}
+
std::vector<TypeNode> TypeNode::getArgTypes() const {
vector<TypeNode> args;
if(isTester()) {
/** Get the base type of this subtype */
TypeNode getSubtypeBaseType() const;
+ /** Get the most general base type of the type */
+ TypeNode getBaseType() const;
+
/** Is this a subrange */
bool isSubrange() const;