public abstract class AbstractJimpleBasedICFG extends java.lang.Object implements BiDiInterproceduralCFG<Unit,SootMethod>
Modifier and Type | Field and Description |
---|---|
protected <any> |
bodyToUnitGraph |
protected boolean |
enableExceptions |
protected <any> |
methodToCallsFromWithin |
protected <any> |
methodToParameterRefs |
protected java.util.Map<Unit,Body> |
unitToOwner |
Constructor and Description |
---|
AbstractJimpleBasedICFG() |
AbstractJimpleBasedICFG(boolean enableExceptions) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Unit> |
allNonCallEndNodes() |
java.util.Set<Unit> |
allNonCallStartNodes()
Returns the set of all nodes that are neither call nor start nodes.
|
java.util.Set<Unit> |
getCallsFromWithin(SootMethod m)
Returns all call sites within a given method.
|
java.util.Collection<Unit> |
getEndPointsOf(SootMethod m) |
SootMethod |
getMethodOf(Unit u)
Returns the method containing a node.
|
DirectedGraph<Unit> |
getOrCreateUnitGraph(Body body) |
DirectedGraph<Unit> |
getOrCreateUnitGraph(SootMethod m) |
java.util.List<Value> |
getParameterRefs(SootMethod m) |
java.util.List<Unit> |
getPredsOf(Unit u) |
java.util.List<Unit> |
getPredsOfCallAt(Unit u) |
java.util.Collection<Unit> |
getReturnSitesOfCallAt(Unit u)
Returns all statements to which a call could return.
|
java.util.Collection<Unit> |
getStartPointsOf(SootMethod m)
Returns all start points of a given method.
|
java.util.List<Unit> |
getSuccsOf(Unit u)
Returns the successor nodes.
|
boolean |
isBranchTarget(Unit u,
Unit succ)
Returns whether succ is a branch target of stmt.
|
boolean |
isCallStmt(Unit u)
Returns
true if the given statement is a call site. |
boolean |
isExitStmt(Unit u)
Returns
true if the given statement leads to a method return
(exceptional or not). |
boolean |
isFallThroughSuccessor(Unit u,
Unit succ)
Returns whether succ is the fall-through successor of stmt,
i.e., the unique successor that is be reached when stmt
does not branch.
|
boolean |
isReachable(Unit u)
Checks whether the given statement is rachable from the entry point
|
boolean |
isReturnSite(Unit n)
Gets whether the given statement is a return site of at least one call
|
boolean |
isStartPoint(Unit u)
Returns true is this is a method's start statement.
|
protected DirectedGraph<Unit> |
makeGraph(Body body) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCalleesOfCallAt, getCallersOf
protected final boolean enableExceptions
protected final <any> bodyToUnitGraph
protected final <any> methodToParameterRefs
protected final <any> methodToCallsFromWithin
public AbstractJimpleBasedICFG()
public AbstractJimpleBasedICFG(boolean enableExceptions)
public SootMethod getMethodOf(Unit u)
InterproceduralCFG
getMethodOf
in interface InterproceduralCFG<Unit,SootMethod>
u
- The node for which to get the parent methodpublic java.util.List<Unit> getSuccsOf(Unit u)
InterproceduralCFG
getSuccsOf
in interface InterproceduralCFG<Unit,SootMethod>
public DirectedGraph<Unit> getOrCreateUnitGraph(SootMethod m)
getOrCreateUnitGraph
in interface BiDiInterproceduralCFG<Unit,SootMethod>
public DirectedGraph<Unit> getOrCreateUnitGraph(Body body)
protected DirectedGraph<Unit> makeGraph(Body body)
public boolean isExitStmt(Unit u)
InterproceduralCFG
true
if the given statement leads to a method return
(exceptional or not). For backward analyses may also be start statements.isExitStmt
in interface InterproceduralCFG<Unit,SootMethod>
public boolean isStartPoint(Unit u)
InterproceduralCFG
isStartPoint
in interface InterproceduralCFG<Unit,SootMethod>
public boolean isFallThroughSuccessor(Unit u, Unit succ)
InterproceduralCFG
isFallThroughSuccessor
in interface InterproceduralCFG<Unit,SootMethod>
public boolean isBranchTarget(Unit u, Unit succ)
InterproceduralCFG
isBranchTarget
in interface InterproceduralCFG<Unit,SootMethod>
public java.util.List<Value> getParameterRefs(SootMethod m)
getParameterRefs
in interface BiDiInterproceduralCFG<Unit,SootMethod>
public java.util.Collection<Unit> getStartPointsOf(SootMethod m)
InterproceduralCFG
getStartPointsOf
in interface InterproceduralCFG<Unit,SootMethod>
public boolean isCallStmt(Unit u)
InterproceduralCFG
true
if the given statement is a call site.isCallStmt
in interface InterproceduralCFG<Unit,SootMethod>
public java.util.Set<Unit> allNonCallStartNodes()
InterproceduralCFG
allNonCallStartNodes
in interface InterproceduralCFG<Unit,SootMethod>
public java.util.Set<Unit> allNonCallEndNodes()
allNonCallEndNodes
in interface BiDiInterproceduralCFG<Unit,SootMethod>
public java.util.Collection<Unit> getReturnSitesOfCallAt(Unit u)
InterproceduralCFG
getReturnSitesOfCallAt
in interface InterproceduralCFG<Unit,SootMethod>
public java.util.Set<Unit> getCallsFromWithin(SootMethod m)
InterproceduralCFG
getCallsFromWithin
in interface InterproceduralCFG<Unit,SootMethod>
public java.util.List<Unit> getPredsOf(Unit u)
getPredsOf
in interface InterproceduralCFG<Unit,SootMethod>
getPredsOf
in interface BiDiInterproceduralCFG<Unit,SootMethod>
public java.util.Collection<Unit> getEndPointsOf(SootMethod m)
getEndPointsOf
in interface BiDiInterproceduralCFG<Unit,SootMethod>
public java.util.List<Unit> getPredsOfCallAt(Unit u)
getPredsOfCallAt
in interface BiDiInterproceduralCFG<Unit,SootMethod>
public boolean isReturnSite(Unit n)
BiDiInterproceduralCFG
isReturnSite
in interface BiDiInterproceduralCFG<Unit,SootMethod>
n
- The statement to checkpublic boolean isReachable(Unit u)
BiDiInterproceduralCFG
isReachable
in interface BiDiInterproceduralCFG<Unit,SootMethod>
u
- The statement to check