Package soot.jimple.infoflow.solver.cfg
Class BackwardsInfoflowCFG
java.lang.Object
soot.jimple.infoflow.solver.cfg.InfoflowCFG
soot.jimple.infoflow.solver.cfg.BackwardsInfoflowCFG
- All Implemented Interfaces:
heros.InterproceduralCFG<soot.Unit,,soot.SootMethod> IInfoflowCFG,soot.jimple.toolkits.ide.icfg.BiDiInterproceduralCFG<soot.Unit,soot.SootMethod>
Inverse interprocedural control-flow graph for the infoflow solver
- Author:
- Steven Arzt, Eric Bodden
-
Nested Class Summary
Nested classes/interfaces inherited from class soot.jimple.infoflow.solver.cfg.InfoflowCFG
InfoflowCFG.StaticFieldUseNested classes/interfaces inherited from interface soot.jimple.infoflow.solver.cfg.IInfoflowCFG
IInfoflowCFG.UnitContainer -
Field Summary
Fields inherited from class soot.jimple.infoflow.solver.cfg.InfoflowCFG
delegate, MAX_SIDE_EFFECT_ANALYSIS_DEPTH, MAX_STATIC_USE_ANALYSIS_DEPTH, methodSideEffects, methodToUsedLocals, methodToWrittenLocals, staticFieldUses, unitsToDominator, unitsToDominatorFinder, unitToPostdominator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<soot.Unit>getConditionalBranchesInterprocedural(soot.Unit unit) Reconstructs the conditionals a taint could possibly reach.List<soot.Unit>getConditionalBranchIntraprocedural(soot.Unit unit) Reconstructs if the unit is inside a conditional.getDominatorOf(soot.Unit u) Gets the dominator of the given unit.getPostdominatorOf(soot.Unit u) Gets the postdominator of the given unit.booleanhasSideEffects(soot.SootMethod method) Checks whether the given method or any of its transitive callees has side effectsbooleanisExceptionalEdgeBetween(soot.Unit u1, soot.Unit u2) Gets whether the two given units are connected by an exceptional control flow edgebooleanisStaticFieldRead(soot.SootMethod method, soot.SootField variable) Checks whether the given static field is read inside the given method or one of its transitive callees.booleanisStaticFieldUsed(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.booleanmethodReadsValue(soot.SootMethod m, soot.Value v) Checks whether the given method reads the given valuebooleanmethodWritesValue(soot.SootMethod m, soot.Value v) Checks whether the given method writes the given valuevoidnotifyMethodChanged(soot.SootMethod m) Re-initializes the mapping between statements and owning methods after a method has changed.voidnotifyNewBody(soot.Body b) Initializes the mapping between statements and owning body.voidpurge()Clears all caches and temporary data from memory.Methods inherited from class soot.jimple.infoflow.solver.cfg.InfoflowCFG
allNonCallEndNodes, allNonCallStartNodes, checkStaticFieldUsed, getAllDominators, getCalleesOfCallAt, getCallersOf, getCallsFromWithin, getEndPointsOf, getMethodOf, getOrCreateUnitGraph, getOrdinaryCalleesOfCallAt, getParameterRefs, getPredsOf, getPredsOfCallAt, getReturnSitesOfCallAt, getStartPointsOf, getSuccsOf, hasSideEffects, isBranchTarget, isCallStmt, isExecutorExecute, isExitStmt, isFallThroughSuccessor, isReachable, isReflectiveCallSite, isReflectiveCallSite, isReturnSite, isStartPoint, registerStaticVariableUse
-
Constructor Details
-
BackwardsInfoflowCFG
-
-
Method Details
-
getBaseCFG
-
isStaticFieldRead
public boolean isStaticFieldRead(soot.SootMethod method, soot.SootField variable) Description copied from interface:IInfoflowCFGChecks whether the given static field is read inside the given method or one of its transitive callees.- Specified by:
isStaticFieldReadin interfaceIInfoflowCFG- Overrides:
isStaticFieldReadin classInfoflowCFG- Parameters:
method- The method to checkvariable- The static field to check- Returns:
- True if the given static field is read inside the given method, otherwise false
-
isStaticFieldUsed
public boolean isStaticFieldUsed(soot.SootMethod method, soot.SootField variable) Description copied from interface:IInfoflowCFGChecks whether the given static field is used (read or written) inside the given method or one of its transitive callees.- Specified by:
isStaticFieldUsedin interfaceIInfoflowCFG- Overrides:
isStaticFieldUsedin classInfoflowCFG- Parameters:
method- The method to checkvariable- The static field to check- Returns:
- True if the given static field is used inside the given method, otherwise false
-
hasSideEffects
public boolean hasSideEffects(soot.SootMethod method) Description copied from interface:IInfoflowCFGChecks whether the given method or any of its transitive callees has side effects- Specified by:
hasSideEffectsin interfaceIInfoflowCFG- Overrides:
hasSideEffectsin classInfoflowCFG- Parameters:
method- The method to check- Returns:
- True if the given method or one of its transitive callees has side effects, otherwise false
-
methodReadsValue
public boolean methodReadsValue(soot.SootMethod m, soot.Value v) Description copied from interface:IInfoflowCFGChecks whether the given method reads the given value- Specified by:
methodReadsValuein interfaceIInfoflowCFG- Overrides:
methodReadsValuein classInfoflowCFG- Parameters:
m- The method to checkv- The value to check- Returns:
- True if the given method reads the given value, otherwise false
-
methodWritesValue
public boolean methodWritesValue(soot.SootMethod m, soot.Value v) Description copied from interface:IInfoflowCFGChecks whether the given method writes the given value- Specified by:
methodWritesValuein interfaceIInfoflowCFG- Overrides:
methodWritesValuein classInfoflowCFG- Parameters:
m- The method to checkv- The value to check- Returns:
- True if the given method writes the given value, otherwise false
-
getPostdominatorOf
Description copied from interface:IInfoflowCFGGets the postdominator of the given unit. If this unit is a conditional, the postdominator is the join point behind both branches of the conditional.- Specified by:
getPostdominatorOfin interfaceIInfoflowCFG- Overrides:
getPostdominatorOfin classInfoflowCFG- Parameters:
u- The unit for which to get the postdominator.- Returns:
- The postdominator of the given unit
-
getDominatorOf
Description copied from interface:IInfoflowCFGGets the dominator of the given unit. If this unit is a conditional, the dominator is the join point above both branches of the conditional.- Specified by:
getDominatorOfin interfaceIInfoflowCFG- Overrides:
getDominatorOfin classInfoflowCFG- Parameters:
u- The unit for which to get the postdominator.- Returns:
- The postdominator of the given unit
-
isExceptionalEdgeBetween
public boolean isExceptionalEdgeBetween(soot.Unit u1, soot.Unit u2) Description copied from interface:IInfoflowCFGGets whether the two given units are connected by an exceptional control flow edge- Specified by:
isExceptionalEdgeBetweenin interfaceIInfoflowCFG- Overrides:
isExceptionalEdgeBetweenin classInfoflowCFG- Parameters:
u1- The first unitu2- The second unit- Returns:
- True if the two given units are directly connected by an exceptional control flow edge, otherwise false
-
getConditionalBranchIntraprocedural
Description copied from interface:IInfoflowCFGReconstructs if the unit is inside a conditional. Needed for implicit backwards on an unbalanced return into a method.- Specified by:
getConditionalBranchIntraproceduralin interfaceIInfoflowCFG- Overrides:
getConditionalBranchIntraproceduralin classInfoflowCFG- Parameters:
unit- The unit to start the search at- Returns:
- The same-level conditional
-
getConditionalBranchesInterprocedural
Description copied from interface:IInfoflowCFGReconstructs the conditionals a taint could possibly reach. Needed for implicit backward flows to model sink calls inside a callee- Specified by:
getConditionalBranchesInterproceduralin interfaceIInfoflowCFG- Overrides:
getConditionalBranchesInterproceduralin classInfoflowCFG- Parameters:
unit- start unit, possibly a sink- Returns:
- List of units with the context appended
-
notifyMethodChanged
public void notifyMethodChanged(soot.SootMethod m) Description copied from interface:IInfoflowCFGRe-initializes the mapping between statements and owning methods after a method has changed.- Specified by:
notifyMethodChangedin interfaceIInfoflowCFG- Overrides:
notifyMethodChangedin classInfoflowCFG- Parameters:
m- The method for which to re-initialize the mapping
-
notifyNewBody
public void notifyNewBody(soot.Body b) Description copied from interface:IInfoflowCFGInitializes the mapping between statements and owning body.- Specified by:
notifyNewBodyin interfaceIInfoflowCFG- Overrides:
notifyNewBodyin classInfoflowCFG- Parameters:
b- The body for which to initialize the mapping
-
purge
public void purge()Description copied from interface:IInfoflowCFGClears all caches and temporary data from memory. This method has no effect on the functional behavior of the class.- Specified by:
purgein interfaceIInfoflowCFG- Overrides:
purgein classInfoflowCFG
-