orc.ast.simple.type
Class Type
java.lang.Object
orc.ast.simple.type.Type
- Direct Known Subclasses:
- ArrowType, AssertedType, Blank, ClassType, Datatype, NamedType, PolymorphicTypeAlias, SiteType, Top, TupleType, TypeApplication
public abstract class Type
- extends java.lang.Object
Abstract superclass of all syntactic types.
Syntactic types occur in extended and simple ASTs. They must be converted
to actual types (orc.type.*) before use in the Orc typechecker, since they
use a named representation of type variables. This conversion occurs when
the simple AST is translated to OIL.
Syntactic types do not have methods like meet, join, and subtype; their
actual type counterparts do. Thus, syntactic types permit only the simplest
analyses; more complex analysis must wait until the syntactic type is
resolved to an actual type.
All syntactic types can be written explicitly in a program, whereas
some actual types are only generated during compiler translations or during
typechecking itself.
- Author:
- dkitchin
|
Constructor Summary |
Type()
|
|
Method Summary |
abstract Type |
convert(Env<java.lang.String> env)
Convert this syntactic type into an actual type, given an appropriate type context |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BLANK
public static final Type BLANK
TOP
public static final Type TOP
Type
public Type()
convert
public abstract Type convert(Env<java.lang.String> env)
throws TypeException
- Convert this syntactic type into an actual type, given an appropriate type context
- Parameters:
env - The type environment, used in content addressable mode to
find the appropriate deBruijn index of a type variable.
- Returns:
- A new node.
- Throws:
TypeException