Class InfoflowConfiguration.PathConfiguration

java.lang.Object
soot.jimple.infoflow.InfoflowConfiguration.PathConfiguration
Enclosing class:
InfoflowConfiguration

public static class InfoflowConfiguration.PathConfiguration extends Object
The configuration that defines how FlowDroid shall handle between sources and sinks
Author:
Steven Arzt
  • Constructor Details

    • PathConfiguration

      public PathConfiguration()
  • Method Details

    • merge

      public void merge(InfoflowConfiguration.PathConfiguration pathConfig)
      Copies the settings of the given configuration into this configuration object
      Parameters:
      pathConfig - The other configuration object
    • getSequentialPathProcessing

      public boolean getSequentialPathProcessing()
      Gets whether FlowDroid shall perform sequential path reconstruction instead of running all reconstruction tasks concurrently. This can reduce the memory consumption, but will likely take longer when memory is not an issue.
      Returns:
      True if the path reconstruction tasks shall be run sequentially, false for running them in parallel
    • setSequentialPathProcessing

      public void setSequentialPathProcessing(boolean sequentialPathProcessing)
      Sets whether FlowDroid shall perform sequential path reconstruction instead of running all reconstruction tasks concurrently. This can reduce the memory consumption, but will likely take longer when memory is not an issue.
      Parameters:
      sequentialPathProcessing - True if the path reconstruction tasks shall be run sequentially, false for running them in parallel
    • getPathReconstructionMode

      public InfoflowConfiguration.PathReconstructionMode getPathReconstructionMode()
      Gets the mode that defines how the paths between sources and sinks shall be reconstructed
      Returns:
      The mode that defines how the paths between sources and sinks shall be reconstructed
    • setPathReconstructionMode

      public void setPathReconstructionMode(InfoflowConfiguration.PathReconstructionMode pathReconstructionMode)
      Sets the mode that defines how the paths between sources and sinks shall be reconstructed
      Parameters:
      pathReconstructionMode - The mode that defines how the paths between sources and sinks shall be reconstructed
    • getPathBuildingAlgorithm

      public InfoflowConfiguration.PathBuildingAlgorithm getPathBuildingAlgorithm()
      Gets the algorithm that shall be used for reconstructing the propagation paths between source and sink
      Returns:
      The algorithm that shall be used for reconstructing the propagation paths between source and sink
    • setPathBuildingAlgorithm

      public void setPathBuildingAlgorithm(InfoflowConfiguration.PathBuildingAlgorithm pathBuildingAlgorithm)
      Sets the algorithm that shall be used for reconstructing the propagation paths between source and sink
      Parameters:
      pathBuildingAlgorithm - The algorithm that shall be used for reconstructing the propagation paths between source and sink
    • setMaxCallStackSize

      public void setMaxCallStackSize(int maxCallStackSize)
      Sets the maximum call stack size. If the call stack grows longer than this amount of entries, the respective path will no longer be followed.
      Parameters:
      maxCallStackSize - The maximum call stack size
    • getMaxCallStackSize

      public int getMaxCallStackSize()
      Gets the maximum call stack size. If the call stack grows longer than this amount of entries, the respective path will no longer be followed.
      Returns:
      The maximum call stack size
    • getMaxPathLength

      public int getMaxPathLength()
      Gets the maximum size for taint propagation paths. If a path is growing longer than this limit, the path reconstruction is aborted and the respective path is skipped.
      Returns:
      The maximum length of a taint propagtation path3
    • setMaxPathLength

      public void setMaxPathLength(int maxPathLength)
      Sets the maximum size for taint propagation paths. If a path is growing longer than this limit, the path reconstruction is aborted and the respective path is skipped.
      Parameters:
      maxPathLength - The maximum length of a taint propagation path
    • getMaxPathsPerAbstraction

      public int getMaxPathsPerAbstraction()
      Gets the maximum number of paths that shall be recorded per abstraction. If this threshold is reached, all further paths will be discarded.
      Returns:
      The maximum number of paths that shall be recorded per abstraction.
    • setMaxPathsPerAbstraction

      public void setMaxPathsPerAbstraction(int maxPathsPerAbstraction)
      Sets the maximum number of paths that shall be recorded per abstraction. If this threshold is reached, all further paths will be discarded.
      Parameters:
      maxPathsPerAbstraction - The maximum number of paths that shall be recorded per abstraction.
    • getPathReconstructionTimeout

      public long getPathReconstructionTimeout()
      Gets the timeout in seconds after which path reconstruction shall be aborted. This timeout is applied after the data flow analysis has been completed. If incremental path reconstruction is used, it is applied for the remaining path reconstruction after the data flow analysis has been completed. If incremental path reconstruction is not used, the timeout is applied to the complete path reconstruction phase, because it does not overlap with the data flow analysis phase in this case.
      Returns:
      The timeout in seconds after which the path reconstruction shall be aborted
    • setPathReconstructionTimeout

      public void setPathReconstructionTimeout(long timeout)
      Sets the timeout in seconds after which path reconstruction shall be aborted. This timeout is applied after the data flow analysis has been completed. If incremental path reconstruction is used, it is applied for the remaining path reconstruction after the data flow analysis has been completed. If incremental path reconstruction is not used, the timeout is applied to the complete path reconstruction phase, because it does not overlap with the data flow analysis phase in this case.
      Parameters:
      timeout - The timeout in seconds after which the path reconstruction shall be aborted
    • getPathReconstructionBatchSize

      public int getPathReconstructionBatchSize()
      Gets the number of paths that shall be reconstructed in one batch. Reduce this value to lower memory pressure during path reconstruction.
      Returns:
      The number of paths that shall be reconstructed in one batch
    • setPathReconstructionBatchSize

      public void setPathReconstructionBatchSize(int pathReconstructionBatchSize)
      Sets the number of paths that shall be reconstructed in one batch. Reduce this value to lower memory pressure during path reconstruction.
      Parameters:
      pathReconstructionBatchSize - The number of paths that shall be reconstructed in one batch
    • getPathReconstructionTotalTime

      public long getPathReconstructionTotalTime()
      Gets the allowed time for the entire path reconstruction process in seconds. Another var `pathReconstructionTimeout` is the limited time for reconstructing each batch or path. If `pathReconstructionTotalTime` is set as a negative value or 0, it implies ignoring the time restriction.
      Returns:
      The total allowed time for the path reconstruction in seconds
    • setPathReconstructionTotalTime

      public void setPathReconstructionTotalTime(long pathReconstructionTotalTime)
      Sets the allowed time for the entire path reconstruction process in seconds. Another var `pathReconstructionTimeout` is the limited time for reconstructing each batch or path. If `pathReconstructionTotalTime` is set as a negative value or 0, it implies ignoring the time restriction.
      Parameters:
      pathReconstructionTotalTime - The total time to set for the path reconstruction in seconds
    • mustKeepStatements

      public boolean mustKeepStatements()
      Gets whether the analysis must keep statements along the path
      Returns:
      True if the analysis must keep statements along th path, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object