|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorc.ast.oil.type.Type
public abstract class Type
Abstract superclass of syntactic types in the OIL AST. Within the OIL AST, bound type variables are represented by deBruijn indices, a serializable name-free representation. Syntactic types occur in all of the AST forms. The typechecker converts them to a different form (subclasses of orc.type.Type) for its own internal use. The promote method converts a syntactic OIL type to a form that the typechecker can use. Types from within the typechecker may be embedded within OIL using an InferredType; however, these are temporary placeholders only, and are erased by XML serialization. Syntactic types do not have methods like meet, join, and subtype; only their typechecker counterparts do. Thus, syntactic types permit only the simplest analyses; more complex analyses must wait until the syntactic type is converted within the typechecker. All syntactic types can be written explicitly in a program, whereas many of the typechecker's internal types are not representable in programs.
| Field Summary | |
|---|---|
static Type |
BOT
|
static Type |
TOP
|
| Constructor Summary | |
|---|---|
Type()
|
|
| Method Summary | |
|---|---|
abstract boolean |
equals(java.lang.Object obj)
|
abstract int |
hashCode()
|
static java.util.List<Type> |
inferredTypes(java.util.List<Type> argTypes)
|
abstract Type |
marshal()
Convert this type into an XML-isomorphic format for serialization. |
static Type[] |
marshalAll(java.util.List<Type> ts)
Convenience method, to marshal a list of types. |
abstract Type |
transform(TypingContext ctx)
Convert this syntactic type into an actual type, given an appropriate type context |
static java.util.List<Type> |
transformAll(java.util.List<Type> ts,
TypingContext ctx)
Convenience method, to transform a list of types. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Type TOP
public static final Type BOT
| Constructor Detail |
|---|
public Type()
| Method Detail |
|---|
public abstract int hashCode()
hashCode in class java.lang.Objectpublic abstract boolean equals(java.lang.Object obj)
equals in class java.lang.Object
public abstract Type transform(TypingContext ctx)
throws TypeException
ctx - TODO
TypeException - TODOpublic abstract Type marshal()
public static Type[] marshalAll(java.util.List<Type> ts)
public static java.util.List<Type> transformAll(java.util.List<Type> ts,
TypingContext ctx)
throws TypeException
ts - A list of typesctx - TODO
TypeExceptionpublic static java.util.List<Type> inferredTypes(java.util.List<Type> argTypes)
argTypes -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||