|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver<T>
com.ibm.wala.fixedpoint.impl.DefaultFixedPointSolver<T>
com.ibm.wala.dataflow.ssa.SSAInference<TypeVariable>
com.ibm.wala.analysis.typeInference.TypeInference
public class TypeInference
This class performs intraprocedural type propagation on an SSA IR.
| Nested Class Summary | |
|---|---|
protected class |
TypeInference.DeclaredTypeOperator
An operator which initializes a type to a declared type. |
protected static class |
TypeInference.PrimitivePropagateOperator
|
protected class |
TypeInference.TypeOperatorFactory
|
class |
TypeInference.TypeVarFactory
|
| Nested classes/interfaces inherited from class com.ibm.wala.dataflow.ssa.SSAInference |
|---|
SSAInference.OperatorFactory<T extends IVariable>, SSAInference.VariableFactory |
| Field Summary | |
|---|---|
protected TypeAbstraction |
BOTTOM
A cone type for java.lang.Object |
protected IClassHierarchy |
cha
The governing class hierarchy |
protected boolean |
doPrimitives
should type inference track primitive types? |
protected IR |
ir
The governing SSA form |
| Fields inherited from class com.ibm.wala.fixedpoint.impl.AbstractFixedPointSolver |
|---|
DEFAULT_PERIODIC_MAINTENANCE_INTERVAL, DEFAULT_VERBOSE_INTERVAL, verbose, workList |
| Fields inherited from interface com.ibm.wala.fixpoint.FixedPointConstants |
|---|
CHANGED, CHANGED_AND_FIXED, CHANGED_MASK, FIXED_MASK, NOT_CHANGED, NOT_CHANGED_AND_FIXED, SIDE_EFFECT_MASK |
| Constructor Summary | |
|---|---|
protected |
TypeInference(IR ir,
boolean doPrimitives)
|
| Method Summary | |
|---|---|
TypeAbstraction |
getConstantPrimitiveType(int valueNumber)
|
TypeAbstraction |
getConstantType(int valueNumber)
|
IR |
getIR()
|
TypeAbstraction |
getType(int valueNumber)
Return the type computed for a particular value number |
protected void |
initialize()
|
protected void |
initializeVariables()
Initialize all lattice vars in the system. |
protected void |
initializeWorkList()
Initialize the work list for iteration.j |
boolean |
isUndefined(int valueNumber)
|
static TypeInference |
make(IR ir,
boolean doPrimitives)
|
boolean |
solve()
Solve the set of dataflow graph. |
| Methods inherited from class com.ibm.wala.dataflow.ssa.SSAInference |
|---|
getVariable, init, toString |
| Methods inherited from class com.ibm.wala.fixedpoint.impl.DefaultFixedPointSolver |
|---|
getFixedPointSystem |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final IR ir
protected final IClassHierarchy cha
protected final TypeAbstraction BOTTOM
protected final boolean doPrimitives
| Constructor Detail |
|---|
protected TypeInference(IR ir,
boolean doPrimitives)
| Method Detail |
|---|
public static TypeInference make(IR ir,
boolean doPrimitives)
public boolean solve()
AbstractFixedPointSolverPRECONDITION: graph is set up
solve in interface IFixedPointSolver<TypeVariable>solve in class AbstractFixedPointSolver<TypeVariable>protected void initialize()
protected void initializeVariables()
AbstractFixedPointSolver
initializeVariables in class AbstractFixedPointSolver<TypeVariable>protected void initializeWorkList()
AbstractFixedPointSolver
initializeWorkList in class AbstractFixedPointSolver<TypeVariable>public IR getIR()
public TypeAbstraction getType(int valueNumber)
public TypeAbstraction getConstantType(int valueNumber)
public TypeAbstraction getConstantPrimitiveType(int valueNumber)
public boolean isUndefined(int valueNumber)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||