orc.ast.simple.type
Class Type

java.lang.Object
  extended by 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

Field Summary
static Type BLANK
           
static Type TOP
           
 
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
 

Field Detail

BLANK

public static final Type BLANK

TOP

public static final Type TOP
Constructor Detail

Type

public Type()
Method Detail

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