Interface IAliasingStrategy

All Known Implementing Classes:
AbstractAliasStrategy, AbstractBulkAliasStrategy, AbstractInteractiveAliasStrategy, BackwardsFlowSensitiveAliasStrategy, FlowSensitiveAliasStrategy, ImplicitFlowAliasStrategy, LazyAliasingStrategy, NullAliasStrategy, PtsBasedAliasStrategy

public interface IAliasingStrategy
Generic interface for the different taint aliasing strategies supported by FlowDroid
Author:
Steven Arzt
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Performs a clean up, i.e., removes all generated data from memory
    void
    computeAliasTaints(Abstraction d1, soot.jimple.Stmt src, soot.Value targetValue, Set<Abstraction> taintSet, soot.SootMethod method, Abstraction newAbs)
    Computes the taints for the aliases of a given tainted variable
    If this aliasing strategy uses an additional IFDS solver, it is returned by this method.
    boolean
    hasProcessedMethod(soot.SootMethod method)
    Checks whether this aliasing strategy has already computed aliases in the given method or not.
    void
    injectCallingContext(Abstraction abs, IInfoflowSolver fSolver, soot.SootMethod callee, soot.Unit callSite, Abstraction source, Abstraction d1)
    Notifies the aliasing strategy that a method has been called in the taint analysis.
    boolean
    Gets whether this aliasing strategy is flow sensitive
    boolean
    Gets whether this aliasing strategy is interactive, i.e. computes aliases on demand.
    boolean
    Gets whether this analysis is lazy, i.e., needs all taints to be propagated into all methods, even if the respective access path is not even visible inside the callee (but an alias may be visible).
    boolean
    Gets whether the two given access path may alias
    boolean
    Gets whether this algorithm requires the analysis to be triggered again when returning from a callee.
  • Method Details

    • computeAliasTaints

      void computeAliasTaints(Abstraction d1, soot.jimple.Stmt src, soot.Value targetValue, Set<Abstraction> taintSet, soot.SootMethod method, Abstraction newAbs)
      Computes the taints for the aliases of a given tainted variable
      Parameters:
      d1 - The context in which the variable has been tainted
      src - The statement that tainted the variable
      targetValue - The target value which has been tainted
      taintSet - The set to which all generated alias taints shall be added
      method - The method containing src
      newAbs - The newly generated abstraction for the variable taint
    • isInteractive

      boolean isInteractive()
      Gets whether this aliasing strategy is interactive, i.e. computes aliases on demand.
      Returns:
      True if this is an on-demand aliasing strategy, otherwise false
    • mayAlias

      boolean mayAlias(AccessPath ap1, AccessPath ap2)
      Gets whether the two given access path may alias
      Parameters:
      ap1 - The first access path
      ap2 - The second access path
      Returns:
      True if the two access paths can potentially point ot the same runtime object, otherwise false
    • injectCallingContext

      void injectCallingContext(Abstraction abs, IInfoflowSolver fSolver, soot.SootMethod callee, soot.Unit callSite, Abstraction source, Abstraction d1)
      Notifies the aliasing strategy that a method has been called in the taint analysis. This may be helpful for interprocedural alias analyses.
      Parameters:
      abs - The abstraction on the callee's start unit
      fSolver - The forward solver propagating the taints
      callee - The callee
      callSite - The call site
      source - The abstraction at the call site
      d1 - The abstraction at the caller method's entry point
    • isFlowSensitive

      boolean isFlowSensitive()
      Gets whether this aliasing strategy is flow sensitive
      Returns:
      True if the aliasing strategy is flow sensitive, otherwise false
    • requiresAnalysisOnReturn

      boolean requiresAnalysisOnReturn()
      Gets whether this algorithm requires the analysis to be triggered again when returning from a callee.
      Returns:
      True if the alias analysis must be triggered again when returning from a method, otherwise false
    • hasProcessedMethod

      boolean hasProcessedMethod(soot.SootMethod method)
      Checks whether this aliasing strategy has already computed aliases in the given method or not. Strategies that do not want to implement this method should always return true.
      Parameters:
      method - The method to check
      Returns:
      True if this aliasing strategy has already computed aliases in the given method, otherwise false.
    • isLazyAnalysis

      boolean isLazyAnalysis()
      Gets whether this analysis is lazy, i.e., needs all taints to be propagated into all methods, even if the respective access path is not even visible inside the callee (but an alias may be visible).
      Returns:
      True if the alias analysis requires all taints to be propagated into all methods
    • getSolver

      IInfoflowSolver getSolver()
      If this aliasing strategy uses an additional IFDS solver, it is returned by this method. If this IFDS problem does not have a an additional solver, null is returned.
      Returns:
      The additional IFDS solver used by this aliasing strategy if applicable, null otherwise
    • cleanup

      void cleanup()
      Performs a clean up, i.e., removes all generated data from memory