Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

TypeResolver Class Reference

List of all members.

Static Public Methods

void assignTypesToLocals (JimpleBody stmtBody)

Private Methods

 TypeResolver (JimpleBody stmtBody)
void addRelationsBetweenHardNodes ()
void collapseStronglyConnectedComponents ()
void computeArrayDepths ()
void debug ()
void debug_locals ()
TypeVariable getTypeVariable (ClassHierarchy.TypeNode typeNode)
TypeVariable getTypeVariable (Local local)
TypeVariable getTypeVariable (SootClass sClass)
TypeVariable getTypeVariable (Type type)
boolean mergeAll (TypeVariable var)
void mergeBaseTypeArrays ()
void propagateArrayConstraints ()
void propagateConstrains ()
void removeIndirectRelations ()
void removeRelationsBetweenNonEcrs ()
boolean resolveComplexRelations ()
boolean resolveSingleRelations ()

Static Private Methods

void error (String message)

Private Attributes

ClassHierarchy classHierarchy
SootMethod currentMethod
Vector typeVariableInstances = new Vector()
Hashtable typeVariableHashtable = new Hashtable()
Hashtable typeVariableStringHashtable = new Hashtable()
ConstraintCollector constraintCollector = new ConstraintCollector()
IntSet unresolvedTypeVariables = new IntSet()
boolean new_relation
JimpleBody stmtBody

Static Private Attributes

final boolean DEBUG = false
String lastClass

Detailed Description

This class resolves the type of local variables.

Definition at line 110 of file TypeResolver.java.


Constructor & Destructor Documentation

TypeResolver::TypeResolver JimpleBody   stmtBody [inline, private]
 

This constructor triggers the type resolution of local variables of the given statement list body. *

Definition at line 1658 of file TypeResolver.java.

Referenced by assignTypesToLocals().


Member Function Documentation

void TypeResolver::assignTypesToLocals JimpleBody   stmtBody [inline, static]
 

Assign types to local variables. *

Definition at line 1949 of file TypeResolver.java.

void TypeResolver::collapseStronglyConnectedComponents   [inline, private]
 

Merge together variables involved in a dependence cycle. Use the set of all type variables *

Definition at line 1955 of file TypeResolver.java.

Referenced by TypeResolver().

TypeVariable TypeResolver::getTypeVariable Type   type [inline, private]
 

Get type variable for the given type. *

Definition at line 2238 of file TypeResolver.java.

TypeVariable TypeResolver::getTypeVariable SootClass   sClass [inline, private]
 

Get type variable for the given SootClass. *

Definition at line 2233 of file TypeResolver.java.

TypeVariable TypeResolver::getTypeVariable Local   local [inline, private]
 

Get type variable for the given local. *

Definition at line 2220 of file TypeResolver.java.

TypeVariable TypeResolver::getTypeVariable ClassHierarchy.TypeNode   typeNode [inline, private]
 

Get type variable for the given type node. *

Definition at line 2208 of file TypeResolver.java.

Referenced by TypeResolver(), getTypeVariable(), removeIndirectRelations(), and resolveSingleRelations().

boolean TypeResolver::mergeAll TypeVariable   var [inline, private]
 

Merge the given type variable with all its ancestors and descentants. *

Definition at line 2243 of file TypeResolver.java.

Referenced by TypeResolver().

void TypeResolver::propagateArrayConstraints   [inline, private]
 

Propagate array constraints to base elements, so that the typing problem is simplified. *

Definition at line 2311 of file TypeResolver.java.

Referenced by TypeResolver().

void TypeResolver::removeIndirectRelations   [inline, private]
 

Remove a parent if it is an ancestor of another parent. *

Definition at line 2391 of file TypeResolver.java.

Referenced by TypeResolver().

boolean TypeResolver::resolveComplexRelations   [inline, private]
 

Do the exponential search of a solution. This is an NP-Complete problem. *

Definition at line 2431 of file TypeResolver.java.

Referenced by TypeResolver().

boolean TypeResolver::resolveSingleRelations   [inline, private]
 

Resolve single relations.

  • No Parent -> "java.lang.Object"
  • No Child -> "*null*"
  • One parent -> merge with parent
  • One child -> merge with child


Member Data Documentation

ClassHierarchy TypeResolver::classHierarchy [private]
 

Reference to the class hierarchy *

Definition at line 115 of file TypeResolver.java.

ConstraintCollector TypeResolver::constraintCollector = new ConstraintCollector() [private]
 

Used to collect type constraints *

Definition at line 131 of file TypeResolver.java.

SootMethod TypeResolver::currentMethod [private]
 

Reference to the current method *

Definition at line 118 of file TypeResolver.java.

boolean TypeResolver::new_relation [private]
 

Indicates that a new relation due to merging isArrayOf has be added *

Definition at line 137 of file TypeResolver.java.

Hashtable TypeResolver::typeVariableHashtable = new Hashtable() [private]
 

Hashtable: [TypeNode or Local] -> TypeVariable *

Definition at line 125 of file TypeResolver.java.

Vector TypeResolver::typeVariableInstances = new Vector() [private]
 

All type variable instances *

Definition at line 122 of file TypeResolver.java.

Hashtable TypeResolver::typeVariableStringHashtable = new Hashtable() [private]
 

Hashtable: TypeVariable -> String *

Definition at line 128 of file TypeResolver.java.

IntSet TypeResolver::unresolvedTypeVariables = new IntSet() [private]
 

Type variables left to resolve *

Definition at line 134 of file TypeResolver.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:22:42 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001