Interface ArithmeticType

All Superinterfaces:
ObjectType, Type, UnqualifiedObjectType
All Known Subinterfaces:
EnumerationType, FloatingType, IntegerType, SignedIntegerType, SignedOrUnsignedIntegerType, StandardBasicType, StandardSignedIntegerType, StandardUnsignedIntegerType, UnsignedIntegerType

public interface ArithmeticType extends UnqualifiedObjectType
The arithmetic types are "char", the signed and unsigned integer types, enumeration types, and the floating types (which include the real and the complex floating types).

The arithmetic type hierarchy can best be described by the following outline, which defines a directed acyclic graph. Note that it is not a tree, as the IntegerType and StandardBasicType categories have in their intersection the type char and the SignedOrUnsignedIntegerTypes.

UnqualifiedObjectType
  • Nested Class Summary

    Nested classes/interfaces inherited from interface edu.udel.cis.vsl.abc.ast.type.IF.Type

    Type.TypeKind
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is this type in the complex domain? The arithmetic types are partitioned into the real and the complex domains.
    boolean
    Is this type in the real domain? The arithmetic types are partitioned into the real and the complex domains.
    boolean
    Is this an enumeration type? If true, this object can be safely cast to EnumerationType.
    boolean
    Is this a floating type? This includes the three real floating types and the three complex floating types.
    boolean
    Is this an integer type? Note that this includes "signed char" and "unsigned char".

    Methods inherited from interface edu.udel.cis.vsl.abc.ast.type.IF.ObjectType

    hasKnownConstantSize, isComplete, isConstantQualified

    Methods inherited from interface edu.udel.cis.vsl.abc.ast.type.IF.Type

    compatibleWith, equivalentTo, getId, isScalar, isVariablyModified, kind, print
  • Method Details

    • isInteger

      boolean isInteger()
      Is this an integer type? Note that this includes "signed char" and "unsigned char". This method is equivalent to isSigned() || isUnsigned, but is provided for convenience.
      Returns:
      true iff this is a signed or unsigned integer type
    • isFloating

      boolean isFloating()
      Is this a floating type? This includes the three real floating types and the three complex floating types. If true, this object can be safely cast to FloatingType. $real is also included.
      Returns:
      true iff this is a floating type
    • isEnumeration

      boolean isEnumeration()
      Is this an enumeration type? If true, this object can be safely cast to EnumerationType.
      Returns:
      true iff this is an enumeration type
    • inRealDomain

      boolean inRealDomain()
      Is this type in the real domain? The arithmetic types are partitioned into the real and the complex domains. The complex domain includes the three complex types. Everything else (enumerations, signed and unsigned integer types, char) falls under the real domain.
      Returns:
      true iff this type is in the real domain
    • inComplexDomain

      boolean inComplexDomain()
      Is this type in the complex domain? The arithmetic types are partitioned into the real and the complex domains. The complex domain includes the three complex types. Everything else (enumerations, signed and unsigned integer types, char) falls under the real domain.
      Returns:
      true iff this type is in the complex domain