ptolemy.copernicus.java
Class TokenTypeAnalysis
java.lang.Object
soot.toolkits.scalar.AbstractFlowAnalysis
soot.toolkits.scalar.FlowAnalysis
ptolemy.copernicus.kernel.FastForwardFlowAnalysis
ptolemy.copernicus.java.TokenTypeAnalysis
public class TokenTypeAnalysis
- extends FastForwardFlowAnalysis
An analysis that maps each local variable that represents a token onto
the particular type of the token. This propagates the type
information from ports and parameter using standard dataflow
techniques through all of the java code for a particular method.
The result is used by transformers, such as TokenInstanceofEliminator.
- Since:
- Ptolemy II 2.0
- Version:
- $Id: TokenTypeAnalysis.java,v 1.66 2006/10/24 23:50:33 cxh Exp $
- Author:
- Stephen Neuendorffer
- Accepted Rating:
- Proposed Rating:
Fields inherited from class soot.toolkits.scalar.FlowAnalysis |
filterUnitToAfterFlow, unitToAfterFlow |
Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis |
filterUnitToBeforeFlow, graph, unitToBeforeFlow |
Constructor Summary |
TokenTypeAnalysis(soot.SootMethod method,
soot.toolkits.graph.CompleteUnitGraph g)
|
Method Summary |
protected void |
copy(java.lang.Object inValue,
java.lang.Object outValue)
|
protected java.lang.Object |
entryInitialFlow()
|
protected void |
flowThrough(java.lang.Object inValue,
java.lang.Object d,
java.lang.Object outValue)
|
Type |
getTypeOfAfter(soot.Local local,
soot.Unit unit)
Return the type fo the given local, at a point before
the given unit. |
Type |
getTypeOfBefore(soot.Local local,
soot.Unit unit)
Return the type fo the given local, at a point after
the given unit. |
void |
inlineTypeLatticeMethods(soot.SootMethod method,
soot.Unit unit,
soot.ValueBox box,
soot.jimple.StaticInvokeExpr expr,
soot.toolkits.scalar.LocalDefs localDefs,
soot.toolkits.scalar.LocalUses localUses)
Inline the given invocation point in the given box, unit, and method. |
protected void |
merge(java.lang.Object in1Value,
java.lang.Object in2Value,
java.lang.Object outValue)
|
protected java.lang.Object |
newInitialFlow()
|
Methods inherited from class soot.toolkits.scalar.FlowAnalysis |
getFlowAfter |
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis |
customizeInitialFlowGraph, getFlowBefore, merge, treatTrapHandlersAsEntries |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenTypeAnalysis
public TokenTypeAnalysis(soot.SootMethod method,
soot.toolkits.graph.CompleteUnitGraph g)
getTypeOfAfter
public Type getTypeOfAfter(soot.Local local,
soot.Unit unit)
- Return the type fo the given local, at a point before
the given unit. If no information is available about the local,
then return ptolemy.data.type.BaseType.UNKNOWN;
getTypeOfBefore
public Type getTypeOfBefore(soot.Local local,
soot.Unit unit)
- Return the type fo the given local, at a point after
the given unit. If no information is available about the local,
then return ptolemy.data.type.BaseType.UNKNOWN;
inlineTypeLatticeMethods
public void inlineTypeLatticeMethods(soot.SootMethod method,
soot.Unit unit,
soot.ValueBox box,
soot.jimple.StaticInvokeExpr expr,
soot.toolkits.scalar.LocalDefs localDefs,
soot.toolkits.scalar.LocalUses localUses)
- Inline the given invocation point in the given box, unit, and method.
Use the given type analysis and local definition information to
perform the inlining.
entryInitialFlow
protected java.lang.Object entryInitialFlow()
- Specified by:
entryInitialFlow
in class soot.toolkits.scalar.AbstractFlowAnalysis
newInitialFlow
protected java.lang.Object newInitialFlow()
- Specified by:
newInitialFlow
in class soot.toolkits.scalar.AbstractFlowAnalysis
flowThrough
protected void flowThrough(java.lang.Object inValue,
java.lang.Object d,
java.lang.Object outValue)
- Specified by:
flowThrough
in class soot.toolkits.scalar.FlowAnalysis
copy
protected void copy(java.lang.Object inValue,
java.lang.Object outValue)
- Specified by:
copy
in class soot.toolkits.scalar.AbstractFlowAnalysis
merge
protected void merge(java.lang.Object in1Value,
java.lang.Object in2Value,
java.lang.Object outValue)
- Specified by:
merge
in class soot.toolkits.scalar.AbstractFlowAnalysis