|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.alias.steensgaard.AliasType scale.alias.shapirohorowitz.FunctionTypeCat
public class FunctionTypeCat
A class which implements the non-standard type describing functions (or pointers to functions).
$Id: FunctionTypeCat.java,v 1.12 2005-02-07 21:27:10 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
In Steensgaard's paper, he refers to
this as lambda types. A function type contains a list
of parameters (represented as ValueType objects) and
a list of function return values (also represented as
ValueType
objects). Although Steensgaard's algorithm allows multiple return
values, we just use one.
Field Summary |
---|
Fields inherited from class scale.alias.steensgaard.AliasType |
---|
BOT |
Constructor Summary | |
---|---|
FunctionTypeCat(int numberCategories)
Create a function type with an empty list of arguments and a return type with the value BOTTOM (upside down T). |
Method Summary | |
---|---|
void |
addArgument(ValueTypeCat a)
Add an argument to the function type. |
void |
cleanup()
Remove any un-needed stuff after analysis has been performed. |
AliasType |
getArgument(int i)
Return the specified argument. |
ValueTypeCat |
getRetval()
Return the type representing the function return value. |
int |
numArguments()
Return the number of arguments. |
Vector<ECR> |
pointsTo()
Return the points-to relation for this type. |
void |
setRetval(ValueTypeCat r)
Set function's return value type. |
java.lang.String |
toStringSpecial()
Return a string representing of a function type. |
void |
unify(AliasType t)
Recursively join two function types. |
Methods inherited from class scale.alias.steensgaard.AliasType |
---|
getNodeID, pointsToSize, toString, toStringClass, toStringShort |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FunctionTypeCat(int numberCategories)
Method Detail |
---|
public int numArguments()
public AliasType getArgument(int i)
public final void addArgument(ValueTypeCat a)
a
- the argument to add to the function typepublic final ValueTypeCat getRetval()
public final void setRetval(ValueTypeCat r)
r
- the ECR representing the return value.public final void unify(AliasType t)
unify
in class AliasType
t
- a function type.public Vector<ECR> pointsTo()
pointsTo
in class AliasType
public java.lang.String toStringSpecial()
toStringSpecial
in class AliasType
public void cleanup()
cleanup
in class AliasType
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |