public class InfoflowCFG extends Object implements IInfoflowCFG
IInfoflowCFG.UnitContainer| Modifier and Type | Field and Description |
|---|---|
protected soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod> |
delegate |
protected Map<soot.SootMethod,Boolean> |
methodSideEffects |
protected com.google.common.cache.LoadingCache<soot.SootMethod,soot.Local[]> |
methodToUsedLocals |
protected com.google.common.cache.LoadingCache<soot.SootMethod,soot.Local[]> |
methodToWrittenLocals |
protected Map<soot.SootMethod,Map<soot.SootField,soot.jimple.infoflow.solver.cfg.InfoflowCFG.StaticFieldUse>> |
staticFieldUses |
protected com.google.common.cache.LoadingCache<soot.Unit,IInfoflowCFG.UnitContainer> |
unitToPostdominator |
| Constructor and Description |
|---|
InfoflowCFG() |
InfoflowCFG(soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod> delegate) |
| Modifier and Type | Method and Description |
|---|---|
Set<soot.Unit> |
allNonCallEndNodes() |
Set<soot.Unit> |
allNonCallStartNodes() |
protected soot.jimple.infoflow.solver.cfg.InfoflowCFG.StaticFieldUse |
checkStaticFieldUsed(soot.SootMethod smethod,
soot.SootField variable) |
Collection<soot.SootMethod> |
getCalleesOfCallAt(soot.Unit u) |
Collection<soot.Unit> |
getCallersOf(soot.SootMethod m) |
Set<soot.Unit> |
getCallsFromWithin(soot.SootMethod m) |
Collection<soot.Unit> |
getEndPointsOf(soot.SootMethod m) |
soot.SootMethod |
getMethodOf(soot.Unit u) |
soot.toolkits.graph.DirectedGraph<soot.Unit> |
getOrCreateUnitGraph(soot.SootMethod m) |
Collection<soot.SootMethod> |
getOrdinaryCalleesOfCallAt(soot.Unit u)
Gets all ordinary callees of the call at call site u, i.e., those that are
not \
|
List<soot.Value> |
getParameterRefs(soot.SootMethod m) |
IInfoflowCFG.UnitContainer |
getPostdominatorOf(soot.Unit u)
Gets the postdominator of the given unit.
|
List<soot.Unit> |
getPredsOf(soot.Unit u) |
List<soot.Unit> |
getPredsOfCallAt(soot.Unit u) |
Collection<soot.Unit> |
getReturnSitesOfCallAt(soot.Unit u) |
Collection<soot.Unit> |
getStartPointsOf(soot.SootMethod m) |
List<soot.Unit> |
getSuccsOf(soot.Unit u) |
boolean |
hasSideEffects(soot.SootMethod method)
Checks whether the given method or any of its transitive callees has side
effects
|
protected boolean |
hasSideEffects(soot.SootMethod method,
Set<soot.SootMethod> runList,
int depth) |
boolean |
isBranchTarget(soot.Unit u,
soot.Unit succ) |
boolean |
isCallStmt(soot.Unit u) |
boolean |
isExceptionalEdgeBetween(soot.Unit u1,
soot.Unit u2)
Gets whether the two given units are connected by an exceptional control flow
edge
|
boolean |
isExecutorExecute(soot.jimple.InvokeExpr ie,
soot.SootMethod dest)
Checks whether the given call is a call to Executor.execute() or
AccessController.doPrivileged() and whether the callee matches the expected
method signature
|
boolean |
isExitStmt(soot.Unit u) |
boolean |
isFallThroughSuccessor(soot.Unit u,
soot.Unit succ) |
boolean |
isReachable(soot.Unit u) |
boolean |
isReflectiveCallSite(soot.jimple.InvokeExpr iexpr)
Checks whether the given call site is a reflective method call
|
boolean |
isReflectiveCallSite(soot.Unit u)
Checks whether the given call site is a reflective method call
|
boolean |
isReturnSite(soot.Unit n) |
boolean |
isStartPoint(soot.Unit u) |
boolean |
isStaticFieldRead(soot.SootMethod method,
soot.SootField variable)
Checks whether the given static field is read inside the given method or one
of its transitive callees.
|
boolean |
isStaticFieldUsed(soot.SootMethod method,
soot.SootField variable)
Checks whether the given static field is used (read or written) inside the
given method or one of its transitive callees.
|
boolean |
methodReadsValue(soot.SootMethod m,
soot.Value v)
Checks whether the given method reads the given value
|
boolean |
methodWritesValue(soot.SootMethod m,
soot.Value v)
Checks whether the given method writes the given value
|
void |
notifyMethodChanged(soot.SootMethod m)
Re-initializes the mapping betwween statements and owning methods after a
method has changed.
|
void |
purge()
Clears all caches and temporary data from memory.
|
protected void |
registerStaticVariableUse(soot.SootMethod method,
soot.SootField variable,
soot.jimple.infoflow.solver.cfg.InfoflowCFG.StaticFieldUse fieldUse) |
protected final Map<soot.SootMethod,Map<soot.SootField,soot.jimple.infoflow.solver.cfg.InfoflowCFG.StaticFieldUse>> staticFieldUses
protected final soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod> delegate
protected final com.google.common.cache.LoadingCache<soot.Unit,IInfoflowCFG.UnitContainer> unitToPostdominator
protected final com.google.common.cache.LoadingCache<soot.SootMethod,soot.Local[]> methodToUsedLocals
protected final com.google.common.cache.LoadingCache<soot.SootMethod,soot.Local[]> methodToWrittenLocals
public InfoflowCFG()
public InfoflowCFG(soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod> delegate)
public IInfoflowCFG.UnitContainer getPostdominatorOf(soot.Unit u)
IInfoflowCFGgetPostdominatorOf in interface IInfoflowCFGu - The unit for which to get the postdominator.public soot.SootMethod getMethodOf(soot.Unit u)
getMethodOf in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public List<soot.Unit> getSuccsOf(soot.Unit u)
getSuccsOf in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isExitStmt(soot.Unit u)
isExitStmt in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isStartPoint(soot.Unit u)
isStartPoint in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isFallThroughSuccessor(soot.Unit u,
soot.Unit succ)
isFallThroughSuccessor in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isBranchTarget(soot.Unit u,
soot.Unit succ)
isBranchTarget in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public Collection<soot.Unit> getStartPointsOf(soot.SootMethod m)
getStartPointsOf in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isCallStmt(soot.Unit u)
isCallStmt in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public Set<soot.Unit> allNonCallStartNodes()
allNonCallStartNodes in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public Collection<soot.SootMethod> getCalleesOfCallAt(soot.Unit u)
getCalleesOfCallAt in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public Collection<soot.Unit> getCallersOf(soot.SootMethod m)
getCallersOf in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public Collection<soot.Unit> getReturnSitesOfCallAt(soot.Unit u)
getReturnSitesOfCallAt in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public Set<soot.Unit> getCallsFromWithin(soot.SootMethod m)
getCallsFromWithin in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>public List<soot.Unit> getPredsOf(soot.Unit u)
getPredsOf in interface heros.InterproceduralCFG<soot.Unit,soot.SootMethod>getPredsOf in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public Collection<soot.Unit> getEndPointsOf(soot.SootMethod m)
getEndPointsOf in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public List<soot.Unit> getPredsOfCallAt(soot.Unit u)
getPredsOfCallAt in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public Set<soot.Unit> allNonCallEndNodes()
allNonCallEndNodes in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public soot.toolkits.graph.DirectedGraph<soot.Unit> getOrCreateUnitGraph(soot.SootMethod m)
getOrCreateUnitGraph in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public List<soot.Value> getParameterRefs(soot.SootMethod m)
getParameterRefs in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isReturnSite(soot.Unit n)
isReturnSite in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isStaticFieldRead(soot.SootMethod method,
soot.SootField variable)
IInfoflowCFGisStaticFieldRead in interface IInfoflowCFGmethod - The method to checkvariable - The static field to checkpublic boolean isStaticFieldUsed(soot.SootMethod method,
soot.SootField variable)
IInfoflowCFGisStaticFieldUsed in interface IInfoflowCFGmethod - The method to checkvariable - The static field to checkprotected soot.jimple.infoflow.solver.cfg.InfoflowCFG.StaticFieldUse checkStaticFieldUsed(soot.SootMethod smethod,
soot.SootField variable)
protected void registerStaticVariableUse(soot.SootMethod method,
soot.SootField variable,
soot.jimple.infoflow.solver.cfg.InfoflowCFG.StaticFieldUse fieldUse)
public boolean hasSideEffects(soot.SootMethod method)
IInfoflowCFGhasSideEffects in interface IInfoflowCFGmethod - The method to checkprotected boolean hasSideEffects(soot.SootMethod method,
Set<soot.SootMethod> runList,
int depth)
public void notifyMethodChanged(soot.SootMethod m)
IInfoflowCFGnotifyMethodChanged in interface IInfoflowCFGm - The method for which to re-initialize the mappingpublic boolean methodReadsValue(soot.SootMethod m,
soot.Value v)
IInfoflowCFGmethodReadsValue in interface IInfoflowCFGm - The method to checkv - The value to checkpublic boolean methodWritesValue(soot.SootMethod m,
soot.Value v)
IInfoflowCFGmethodWritesValue in interface IInfoflowCFGm - The method to checkv - The value to checkpublic boolean isExceptionalEdgeBetween(soot.Unit u1,
soot.Unit u2)
IInfoflowCFGisExceptionalEdgeBetween in interface IInfoflowCFGu1 - The first unitu2 - The second unitpublic boolean isReachable(soot.Unit u)
isReachable in interface soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>public boolean isExecutorExecute(soot.jimple.InvokeExpr ie,
soot.SootMethod dest)
IInfoflowCFGisExecutorExecute in interface IInfoflowCFGie - The invocation expression to checkdest - The callee of the given invocation expressionpublic Collection<soot.SootMethod> getOrdinaryCalleesOfCallAt(soot.Unit u)
IInfoflowCFGgetOrdinaryCalleesOfCallAt in interface IInfoflowCFGu - The call sitepublic boolean isReflectiveCallSite(soot.Unit u)
IInfoflowCFGisReflectiveCallSite in interface IInfoflowCFGu - The call site to checkpublic boolean isReflectiveCallSite(soot.jimple.InvokeExpr iexpr)
IInfoflowCFGisReflectiveCallSite in interface IInfoflowCFGiexpr - The call site to checkpublic void purge()
IInfoflowCFGpurge in interface IInfoflowCFGCopyright © 2021 Fraunhofer SIT. All rights reserved.