Class TypeInference
java.lang.Object
EDU.purdue.cs.bloat.tbaa.TypeInference
Typed-based alias analysis requires that we know the types of all entities in
a method. However, local variables and stack variables do not have declared
types. Thus, we have to infer them.
TypeInference uses a simpilified version of everyone's favorite type inference algorithm from Object-Oriented Type Systems by Palsberg and Schwartzbach. It is simplified in that no interprocedural type information is calculated.
Here's how it works. Entities such as method arguments, fields, and constants have a known type. This known type is expressed in a constraint that constraints the entity to its type. Operations involving assignment (also phi-statements and stack operations) propagate these constraints to the targets of the assignments.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidtransform(FlowGraph cfg, ClassHierarchy hier) Traverses the control flow graph and with the help of a number of vistors performs type-based alias analysis.
-
Field Details
-
DEBUG
public static boolean DEBUG
-
-
Constructor Details
-
TypeInference
public TypeInference()
-
-
Method Details
-
transform
Traverses the control flow graph and with the help of a number of vistors performs type-based alias analysis.- Parameters:
cfg- The control flow graph on which to perform TBAA.hier- A class heirarchy used for getting information about Types (classes).- See Also:
-