com.ibm.wala.ipa.callgraph.propagation.cfa
Class ContextInsensitiveSSAInterpreter

java.lang.Object
  extended by com.ibm.wala.ipa.callgraph.propagation.rta.ContextInsensitiveRTAInterpreter
      extended by com.ibm.wala.ipa.callgraph.propagation.cfa.ContextInsensitiveSSAInterpreter
All Implemented Interfaces:
RTAContextInterpreter, SSAContextInterpreter
Direct Known Subclasses:
AstContextInsensitiveSSAContextInterpreter

public class ContextInsensitiveSSAInterpreter
extends ContextInsensitiveRTAInterpreter
implements SSAContextInterpreter

Default implementation of SSAContextInterpreter for context-insensitive analysis


Field Summary
protected  AnalysisOptions options
           
 
Constructor Summary
ContextInsensitiveSSAInterpreter(AnalysisOptions options, AnalysisCache cache)
           
 
Method Summary
 ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG(CGNode N)
           
 DefUse getDU(CGNode node)
           
 IR getIR(CGNode node)
           
 int getNumberOfStatements(CGNode node)
           
 boolean recordFactoryType(CGNode node, IClass klass)
          record that the "factory" method of a node should be interpreted to allocate a particular class.
 
Methods inherited from class com.ibm.wala.ipa.callgraph.propagation.rta.ContextInsensitiveRTAInterpreter
getAnalysisCache, iterateCallSites, iterateFieldsRead, iterateFieldsWritten, iterateNewSites, understands
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter
iterateCallSites, iterateFieldsRead, iterateFieldsWritten, iterateNewSites, understands
 

Field Detail

options

protected final AnalysisOptions options
Constructor Detail

ContextInsensitiveSSAInterpreter

public ContextInsensitiveSSAInterpreter(AnalysisOptions options,
                                        AnalysisCache cache)
Method Detail

getIR

public IR getIR(CGNode node)
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)
Specified by:
getNumberOfStatements in interface SSAContextInterpreter
Returns:
the number of the statements in the IR, or -1 if it's an unmodelled native method.

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 class. TODO: this is a little ugly, is there a better place to move this?

Specified by:
recordFactoryType in interface RTAContextInterpreter
Overrides:
recordFactoryType in class ContextInsensitiveRTAInterpreter
Returns:
true iff a NEW type was recorded, false if the type was previously recorded.

getCFG

public ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG(CGNode N)
Specified by:
getCFG in interface SSAContextInterpreter

getDU

public DefUse getDU(CGNode node)
Specified by:
getDU in interface SSAContextInterpreter
Returns:
DefUse for the IR that models the method context, or null if it's an unmodelled native method