|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vasco.soot.ContextSensitiveJimpleRepresentation
public class ContextSensitiveJimpleRepresentation
A program representation for Soot using the Jimple IR with a context-sensitive
call graph. This representation uses control-flow graphs of individual units including exceptional
control flow, and resolves virtual calls using the call graph returned by
Scene#getContextSensitiveCallGraph
.
Note: This class follows the Singleton pattern. The singleton
object is available through v()
.
Method Summary | |
---|---|
DirectedGraph<Unit> |
getControlFlowGraph(MethodOrMethodContext momc)
Returns an ExceptionalUnitGraph for a given method. |
List<MethodOrMethodContext> |
getEntryPoints()
Returns a singleton list containing the main method. |
boolean |
isCall(Unit node)
Returns true iff the Jimple statement contains an
invoke expression. |
List<MethodOrMethodContext> |
resolveTargets(MethodOrMethodContext momc,
Unit node)
Resolves virtual calls using the Soot's context-sensitive call graph and returns a list of method-contexts which are the targets of explicit edges. |
static ContextSensitiveJimpleRepresentation |
v()
Returns a reference to the singleton object of this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public List<MethodOrMethodContext> getEntryPoints()
main
method.
getEntryPoints
in interface ProgramRepresentation<MethodOrMethodContext,Unit>
Scene.getMainMethod()
public DirectedGraph<Unit> getControlFlowGraph(MethodOrMethodContext momc)
ExceptionalUnitGraph
for a given method.
getControlFlowGraph
in interface ProgramRepresentation<MethodOrMethodContext,Unit>
momc
- the method whose CFG to return
public boolean isCall(Unit node)
true
iff the Jimple statement contains an
invoke expression.
isCall
in interface ProgramRepresentation<MethodOrMethodContext,Unit>
node
- a node in the control-flow graph
public List<MethodOrMethodContext> resolveTargets(MethodOrMethodContext momc, Unit node)
resolveTargets
in interface ProgramRepresentation<MethodOrMethodContext,Unit>
momc
- the method in which the call statement originatesnode
- the node containing the call statement
null
in the case of native targetspublic static ContextSensitiveJimpleRepresentation v()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |