Class BatchPathBuilder
java.lang.Object
soot.jimple.infoflow.data.pathBuilders.AbstractAbstractionPathBuilder
soot.jimple.infoflow.data.pathBuilders.BatchPathBuilder
- All Implemented Interfaces:
IAbstractionPathBuilder,IMemoryBoundedSolver
- Direct Known Subclasses:
DefaultPathBuilderFactory.ShutdownBatchPathBuilder
Path builder that forwards all its requests to another path builder in
batches. This builder waits for each batch to complete before submitting
another batch. Use this path builder to reduce the memory consumption of the
path building process by keeping less paths in memory at the same time.
- Author:
- Steven Arzt
-
Nested Class Summary
Nested classes/interfaces inherited from interface soot.jimple.infoflow.data.pathBuilders.IAbstractionPathBuilder
IAbstractionPathBuilder.OnPathBuilderResultAvailableNested classes/interfaces inherited from interface soot.jimple.infoflow.memory.IMemoryBoundedSolver
IMemoryBoundedSolver.IMemoryBoundedSolverStatusNotification -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final IAbstractionPathBuilderprotected ISolverTerminationReasonFields inherited from class soot.jimple.infoflow.data.pathBuilders.AbstractAbstractionPathBuilder
config, logger, manager, resultAvailableHandlers -
Constructor Summary
ConstructorsConstructorDescriptionBatchPathBuilder(InfoflowManager manager, IAbstractionPathBuilder innerBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new listener that will be notified of status changes in the solvervoidComputes the path of tainted data between the source and the sinkvoidForces the solver to terminate its tasks and stop processing new tasks.Gets the constructed result pathsIn case this solver was killed before it could complete its task, this method returns the reason for the abortion.booleanisKilled()Checks whether this solver was killed before it could complete its tasksbooleanChecks whether this solver is terminated, either by forced termination, or because it has finished all of its work.voidreset()Resets the solver to its initial state after it has been forcefully terminated.voidIncrementally runs the path builder after some paths have already been computed.voidsetBatchSize(int batchSize) Sets the number of paths that shall be part of one batch, i.e., that shall be forwarded to the inner path builder at the same timeMethods inherited from class soot.jimple.infoflow.data.pathBuilders.AbstractAbstractionPathBuilder
addResultAvailableHandler
-
Field Details
-
innerBuilder
-
batchSize
protected int batchSize -
terminationReason
-
-
Constructor Details
-
BatchPathBuilder
-
-
Method Details
-
computeTaintPaths
Description copied from interface:IAbstractionPathBuilderComputes the path of tainted data between the source and the sink- Parameters:
res- The data flow tracker results
-
getResults
Description copied from interface:IAbstractionPathBuilderGets the constructed result paths- Returns:
- The constructed result paths
-
runIncrementalPathComputation
public void runIncrementalPathComputation()Description copied from interface:IAbstractionPathBuilderIncrementally runs the path builder after some paths have already been computed. This method is usually called after the taint propagation has finished when incremental path building has been used in between. -
forceTerminate
Description copied from interface:IMemoryBoundedSolverForces the solver to terminate its tasks and stop processing new tasks. This will kill the solver.- Parameters:
reason- The reason why the solver is terminated
-
isTerminated
public boolean isTerminated()Description copied from interface:IMemoryBoundedSolverChecks whether this solver is terminated, either by forced termination, or because it has finished all of its work.- Returns:
- True if this solver is terminated, otherwise false
-
isKilled
public boolean isKilled()Description copied from interface:IMemoryBoundedSolverChecks whether this solver was killed before it could complete its tasks- Returns:
- True if this solver was killed before it could complete its tasks, otherwise false
-
getTerminationReason
Description copied from interface:IMemoryBoundedSolverIn case this solver was killed before it could complete its task, this method returns the reason for the abortion. Otherwise, this method returns null.- Returns:
- The reason for the abortion in case the solver was killed, otherwise null
-
reset
public void reset()Description copied from interface:IMemoryBoundedSolverResets the solver to its initial state after it has been forcefully terminated. After calling this method, the solver is expected to accept new tasks. -
addStatusListener
Description copied from interface:IMemoryBoundedSolverAdds a new listener that will be notified of status changes in the solver- Parameters:
listener- The listener that will be notified when the status of the solver changes
-
setBatchSize
public void setBatchSize(int batchSize) Sets the number of paths that shall be part of one batch, i.e., that shall be forwarded to the inner path builder at the same time- Parameters:
batchSize- The number of paths in one batch
-