com.ibm.wala.ipa.callgraph.propagation.cfa
Class DefaultSSAInterpreter
java.lang.Object
com.ibm.wala.ipa.callgraph.propagation.rta.DefaultRTAInterpreter
com.ibm.wala.ipa.callgraph.propagation.cfa.DefaultSSAInterpreter
- All Implemented Interfaces:
- RTAContextInterpreter, SSAContextInterpreter, CFGProvider
public class DefaultSSAInterpreter
- extends DefaultRTAInterpreter
- implements SSAContextInterpreter
Basic analysis; context-insensitive except for newInstance and clone
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSSAInterpreter
public DefaultSSAInterpreter(AnalysisOptions options,
ClassHierarchy cha,
WarningSet warnings)
- Parameters:
options - cha - warnings -
getIR
public IR getIR(CGNode node,
WarningSet warnings)
- Specified by:
getIR in interface SSAContextInterpreter
- Returns:
- the IR that models the method context, or null if it's an unmodelled native method
getNumberOfStatements
public int getNumberOfStatements(CGNode node,
WarningSet warnings)
- Specified by:
getNumberOfStatements in interface SSAContextInterpreter
- Returns:
- the number of the statements in the IR, or -1 if it's an unmodelled native method.
understands
public boolean understands(IMethod method,
Context context)
iterateNewSites
public java.util.Iterator<NewSiteReference> iterateNewSites(CGNode node,
WarningSet warnings)
- Specified by:
iterateNewSites in interface RTAContextInterpreter- Overrides:
iterateNewSites in class DefaultRTAInterpreter
- Returns:
- an Iterator of the types that may be allocated by a given
method in a given context.
iterateCallSites
public java.util.Iterator<CallSiteReference> iterateCallSites(CGNode node,
WarningSet warnings)
- Specified by:
iterateCallSites in interface RTAContextInterpreter- Overrides:
iterateCallSites in class DefaultRTAInterpreter
- Returns:
- an Iterator of the call statements that may execute
in a given method for a given context
recordFactoryType
public boolean recordFactoryType(CGNode node,
IClass klass)
- Description copied from interface:
RTAContextInterpreter
- record that the "factory" method of a node should be interpreted to allocate a
particular klass.
TODO: this is a little ugly, is there a better place to move this?
- Specified by:
recordFactoryType in interface RTAContextInterpreter- Overrides:
recordFactoryType in class DefaultRTAInterpreter
- Returns:
- true iff a NEW type was recorded, false if the type was previously recorded.
getCFG
public ControlFlowGraph getCFG(CGNode N,
WarningSet warnings)
- Specified by:
getCFG in interface CFGProvider
- Parameters:
N - a call graph node
- Returns:
- a CFG that represents the node, or null if it's an unmodelled native method
getDU
public DefUse getDU(CGNode node,
WarningSet warnings)
- Specified by:
getDU in interface SSAContextInterpreter