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>

public class BackwardsInfoflowCFG extends InfoflowCFG
Inverse interprocedural control-flow graph for the infoflow solver
Author:
Steven Arzt, Eric Bodden
  • Constructor Details

    • BackwardsInfoflowCFG

      public BackwardsInfoflowCFG(IInfoflowCFG baseCFG)
  • Method Details

    • getBaseCFG

      public IInfoflowCFG getBaseCFG()
    • isStaticFieldRead

      public boolean isStaticFieldRead(soot.SootMethod method, soot.SootField variable)
      Description copied from interface: IInfoflowCFG
      Checks whether the given static field is read inside the given method or one of its transitive callees.
      Specified by:
      isStaticFieldRead in interface IInfoflowCFG
      Overrides:
      isStaticFieldRead in class InfoflowCFG
      Parameters:
      method - The method to check
      variable - 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: IInfoflowCFG
      Checks whether the given static field is used (read or written) inside the given method or one of its transitive callees.
      Specified by:
      isStaticFieldUsed in interface IInfoflowCFG
      Overrides:
      isStaticFieldUsed in class InfoflowCFG
      Parameters:
      method - The method to check
      variable - 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: IInfoflowCFG
      Checks whether the given method or any of its transitive callees has side effects
      Specified by:
      hasSideEffects in interface IInfoflowCFG
      Overrides:
      hasSideEffects in class InfoflowCFG
      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: IInfoflowCFG
      Checks whether the given method reads the given value
      Specified by:
      methodReadsValue in interface IInfoflowCFG
      Overrides:
      methodReadsValue in class InfoflowCFG
      Parameters:
      m - The method to check
      v - 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: IInfoflowCFG
      Checks whether the given method writes the given value
      Specified by:
      methodWritesValue in interface IInfoflowCFG
      Overrides:
      methodWritesValue in class InfoflowCFG
      Parameters:
      m - The method to check
      v - The value to check
      Returns:
      True if the given method writes the given value, otherwise false
    • getPostdominatorOf

      public IInfoflowCFG.UnitContainer getPostdominatorOf(soot.Unit u)
      Description copied from interface: IInfoflowCFG
      Gets 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:
      getPostdominatorOf in interface IInfoflowCFG
      Overrides:
      getPostdominatorOf in class InfoflowCFG
      Parameters:
      u - The unit for which to get the postdominator.
      Returns:
      The postdominator of the given unit
    • getDominatorOf

      public IInfoflowCFG.UnitContainer getDominatorOf(soot.Unit u)
      Description copied from interface: IInfoflowCFG
      Gets 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:
      getDominatorOf in interface IInfoflowCFG
      Overrides:
      getDominatorOf in class InfoflowCFG
      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: IInfoflowCFG
      Gets whether the two given units are connected by an exceptional control flow edge
      Specified by:
      isExceptionalEdgeBetween in interface IInfoflowCFG
      Overrides:
      isExceptionalEdgeBetween in class InfoflowCFG
      Parameters:
      u1 - The first unit
      u2 - The second unit
      Returns:
      True if the two given units are directly connected by an exceptional control flow edge, otherwise false
    • getConditionalBranchIntraprocedural

      public List<soot.Unit> getConditionalBranchIntraprocedural(soot.Unit unit)
      Description copied from interface: IInfoflowCFG
      Reconstructs if the unit is inside a conditional. Needed for implicit backwards on an unbalanced return into a method.
      Specified by:
      getConditionalBranchIntraprocedural in interface IInfoflowCFG
      Overrides:
      getConditionalBranchIntraprocedural in class InfoflowCFG
      Parameters:
      unit - The unit to start the search at
      Returns:
      The same-level conditional
    • getConditionalBranchesInterprocedural

      public List<soot.Unit> getConditionalBranchesInterprocedural(soot.Unit unit)
      Description copied from interface: IInfoflowCFG
      Reconstructs the conditionals a taint could possibly reach. Needed for implicit backward flows to model sink calls inside a callee
      Specified by:
      getConditionalBranchesInterprocedural in interface IInfoflowCFG
      Overrides:
      getConditionalBranchesInterprocedural in class InfoflowCFG
      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: IInfoflowCFG
      Re-initializes the mapping between statements and owning methods after a method has changed.
      Specified by:
      notifyMethodChanged in interface IInfoflowCFG
      Overrides:
      notifyMethodChanged in class InfoflowCFG
      Parameters:
      m - The method for which to re-initialize the mapping
    • notifyNewBody

      public void notifyNewBody(soot.Body b)
      Description copied from interface: IInfoflowCFG
      Initializes the mapping between statements and owning body.
      Specified by:
      notifyNewBody in interface IInfoflowCFG
      Overrides:
      notifyNewBody in class InfoflowCFG
      Parameters:
      b - The body for which to initialize the mapping
    • purge

      public void purge()
      Description copied from interface: IInfoflowCFG
      Clears all caches and temporary data from memory. This method has no effect on the functional behavior of the class.
      Specified by:
      purge in interface IInfoflowCFG
      Overrides:
      purge in class InfoflowCFG