Class FlowDroidMemoryManager

java.lang.Object
soot.jimple.infoflow.data.FlowDroidMemoryManager
All Implemented Interfaces:
IMemoryManager<Abstraction,soot.Unit>

public class FlowDroidMemoryManager extends Object implements IMemoryManager<Abstraction,soot.Unit>
Memory manager implementation for FlowDroid
Author:
Steven Arzt
  • Constructor Details

    • FlowDroidMemoryManager

      public FlowDroidMemoryManager()
      Constructs a new instance of the AccessPathManager class
    • FlowDroidMemoryManager

      public FlowDroidMemoryManager(boolean tracingEnabled, FlowDroidMemoryManager.PathDataErasureMode erasePathData)
      Constructs a new instance of the AccessPathManager class
      Parameters:
      tracingEnabled - True if performance tracing data shall be recorded
      erasePathData - Specifies whether data for tracking paths (current statement, corresponding call site) shall be erased.
  • Method Details

    • getReuseCount

      public int getReuseCount()
      Gets the number of access paths that have been re-used through caching
      Returns:
      The number of access paths that have been re-used through caching
    • handleMemoryObject

      public Abstraction handleMemoryObject(Abstraction obj)
      Description copied from interface: IMemoryManager
      Tells the memory manager to handle the given object. Implementations are free to replace the incoming object with a different reference.
      Specified by:
      handleMemoryObject in interface IMemoryManager<Abstraction,soot.Unit>
      Parameters:
      obj - The object to handle
      Returns:
      The new reference that shall be used instead of the old one
    • handleGeneratedMemoryObject

      public Abstraction handleGeneratedMemoryObject(Abstraction input, Abstraction output)
      Description copied from interface: IMemoryManager
      Tells the memory manager to optimize the given generated object. The output was computed from the input object using a flow function.
      Specified by:
      handleGeneratedMemoryObject in interface IMemoryManager<Abstraction,soot.Unit>
      Parameters:
      input - The original input to the flow function
      output - The output of the flow function
      Returns:
      The new refrence to use instead of the original output
    • erasePathData

      protected void erasePathData(Abstraction output)
      Erases the statements recorded in the given abstraction if the solver has been configured to do so
      Parameters:
      output - The abstraction to optimize
    • setUseAbstractionCache

      public void setUseAbstractionCache(boolean useAbstractionCache)
      Sets whether the memory manager shall use the abstraction cache
      Parameters:
      useAbstractionCache - True if the abstraction cache shall be used, otherwise false
    • isEssentialJoinPoint

      public boolean isEssentialJoinPoint(Abstraction abs, soot.Unit relatedCallSite)
      Description copied from interface: IMemoryManager
      Checks whether the given abstraction at the given call site is essential and must be kept. Non-essential taint abstractions will not be registered as neighbors for join points if the "single join point abstraction" option is enabled
      Specified by:
      isEssentialJoinPoint in interface IMemoryManager<Abstraction,soot.Unit>
      Parameters:
      abs - The abstraction
      relatedCallSite - The call site over which the abstraction is being propagated
      Returns:
      True if the abstraction is essential and must be kept, otherwise false