Package soot.jimple.infoflow
Class InfoflowConfiguration.PathConfiguration
java.lang.Object
soot.jimple.infoflow.InfoflowConfiguration.PathConfiguration
- Enclosing class:
- InfoflowConfiguration
The configuration that defines how FlowDroid shall handle between sources and
sinks
- Author:
- Steven Arzt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGets the maximum call stack size.intGets the maximum size for taint propagation paths.intGets the maximum number of paths that shall be recorded per abstraction.Gets the algorithm that shall be used for reconstructing the propagation paths between source and sinkintGets the number of paths that shall be reconstructed in one batch.Gets the mode that defines how the paths between sources and sinks shall be reconstructedlongGets the timeout in seconds after which path reconstruction shall be aborted.longGets the allowed time for the entire path reconstruction process in seconds.booleanGets whether FlowDroid shall perform sequential path reconstruction instead of running all reconstruction tasks concurrently.inthashCode()voidmerge(InfoflowConfiguration.PathConfiguration pathConfig) Copies the settings of the given configuration into this configuration objectbooleanGets whether the analysis must keep statements along the pathvoidsetMaxCallStackSize(int maxCallStackSize) Sets the maximum call stack size.voidsetMaxPathLength(int maxPathLength) Sets the maximum size for taint propagation paths.voidsetMaxPathsPerAbstraction(int maxPathsPerAbstraction) Sets the maximum number of paths that shall be recorded per abstraction.voidsetPathBuildingAlgorithm(InfoflowConfiguration.PathBuildingAlgorithm pathBuildingAlgorithm) Sets the algorithm that shall be used for reconstructing the propagation paths between source and sinkvoidsetPathReconstructionBatchSize(int pathReconstructionBatchSize) Sets the number of paths that shall be reconstructed in one batch.voidsetPathReconstructionMode(InfoflowConfiguration.PathReconstructionMode pathReconstructionMode) Sets the mode that defines how the paths between sources and sinks shall be reconstructedvoidsetPathReconstructionTimeout(long timeout) Sets the timeout in seconds after which path reconstruction shall be aborted.voidsetPathReconstructionTotalTime(long pathReconstructionTotalTime) Sets the allowed time for the entire path reconstruction process in seconds.voidsetSequentialPathProcessing(boolean sequentialPathProcessing) Sets whether FlowDroid shall perform sequential path reconstruction instead of running all reconstruction tasks concurrently.
-
Constructor Details
-
PathConfiguration
public PathConfiguration()
-
-
Method Details
-
merge
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
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
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() -
equals
-