Package soot.jimple.infoflow.solver
Interface IInfoflowSolver
- All Known Implementing Classes:
InfoflowSolver,InfoflowSolver,InfoflowSolver,InfoflowSolver,SparseInfoflowSolver
public interface IInfoflowSolver
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplySummary(soot.SootMethod callee, Abstraction d3, soot.Unit callSite, Abstraction d2, Abstraction d1) Calls applyEndSummaryOnCall in the current solvervoidcleanup()Cleans up some unused memory.Set<EndSummary<soot.Unit,Abstraction>> endSummary(soot.SootMethod m, Abstraction d3) Gets the end summary of the given method for the given incoming abstractionIMemoryManager<Abstraction,soot.Unit> Gets the memory manager used by this solver to reduce memory consumptionlongGets the number of edges propagated by the solverGets the IFDS problem solved by this solvervoidinjectContext(IInfoflowSolver otherSolver, soot.SootMethod callee, Abstraction d3, soot.Unit callSite, Abstraction d2, Abstraction d1) Injects the given calling context into the incoming setbooleanprocessEdge(heros.solver.PathEdge<soot.Unit, Abstraction> edge) Schedules the given edge for processing in the solvervoidSets a handler that will be called when a followReturnsPastSeeds case happens, i.e., a taint leaves a method for which we have not seen any callersvoidsetMaxAbstractionPathLength(int maxAbstractionPathLength) Sets the maximum length of a taint propagation path.voidsetMaxCalleesPerCallSite(int maxCalleesPerCallSite) Sets the maximum number of callees that are allowed per call site.voidsetMaxJoinPointAbstractions(int maxJoinPointAbstractions) Sets the maximum number of abstractions that shall be recorded per join point.voidsetMemoryManager(IMemoryManager<Abstraction, soot.Unit> memoryManager) Sets the memory manager that shall be used to manage the abstractionsvoidsetPeerGroup(ISolverPeerGroup solverPeerGroup) Sets the peer group in which this solver operates.voidSets whether abstractions on method returns shall be connected to the respective call abstractions to shortcut paths.voidsetSolverId(boolean solverId) voidsolve()Solves the data flow problemvoidNotifies the solver that no further edges will be scheduled
-
Method Details
-
processEdge
Schedules the given edge for processing in the solver- Parameters:
edge- The edge to schedule for processing- Returns:
- True if the edge was scheduled, otherwise (e.g., if the edge has already been processed earlier) false
-
endSummary
Gets the end summary of the given method for the given incoming abstraction- Parameters:
m- The method for which to get the end summaryd3- The incoming fact (context) for which to get the end summary- Returns:
- The end summary of the given method for the given incoming abstraction
-
injectContext
void injectContext(IInfoflowSolver otherSolver, soot.SootMethod callee, Abstraction d3, soot.Unit callSite, Abstraction d2, Abstraction d1) Injects the given calling context into the incoming set- Parameters:
callee- methodd3- calling contextcallSite- call sited2- incoming abstraction at the call sited1- calling context at the call site
-
applySummary
void applySummary(soot.SootMethod callee, Abstraction d3, soot.Unit callSite, Abstraction d2, Abstraction d1) Calls applyEndSummaryOnCall in the current solver- Parameters:
callee- methodd3- calling contextcallSite- call sited2- incoming abstraction at the call sited1- calling context at the call site
-
cleanup
void cleanup()Cleans up some unused memory. Results will still be available afterwards, but no intermediate computation values. -
setFollowReturnsPastSeedsHandler
Sets a handler that will be called when a followReturnsPastSeeds case happens, i.e., a taint leaves a method for which we have not seen any callers- Parameters:
handler- The handler to be called when a followReturnsPastSeeds case happens
-
setMemoryManager
Sets the memory manager that shall be used to manage the abstractions- Parameters:
memoryManager- The memory manager that shall be used to manage the abstractions
-
getMemoryManager
IMemoryManager<Abstraction,soot.Unit> getMemoryManager()Gets the memory manager used by this solver to reduce memory consumption- Returns:
- The memory manager registered with this solver
-
setPredecessorShorteningMode
Sets whether abstractions on method returns shall be connected to the respective call abstractions to shortcut paths.- Parameters:
mode- The strategy to use for shortening predecessor paths
-
getPropagationCount
long getPropagationCount()Gets the number of edges propagated by the solver- Returns:
- The number of edges propagated by the solver
-
solve
void solve()Solves the data flow problem -
setSolverId
void setSolverId(boolean solverId) -
getTabulationProblem
AbstractInfoflowProblem getTabulationProblem()Gets the IFDS problem solved by this solver- Returns:
- The IFDS problem solved by this solver
-
setMaxJoinPointAbstractions
void setMaxJoinPointAbstractions(int maxJoinPointAbstractions) Sets the maximum number of abstractions that shall be recorded per join point. In other words, enabling this option disables the recording of neighbors beyond the given count.- Parameters:
maxJoinPointAbstractions- The maximum number of abstractions per join point, or -1 to record an arbitrary number of join point abstractions
-
setMaxCalleesPerCallSite
void setMaxCalleesPerCallSite(int maxCalleesPerCallSite) Sets the maximum number of callees that are allowed per call site. If a call site has more than this number of callees, the call site is skipped and none of the callees are processed.- Parameters:
maxCalleesPerCallSite- The maximum number of callees per call site
-
setMaxAbstractionPathLength
void setMaxAbstractionPathLength(int maxAbstractionPathLength) Sets the maximum length of a taint propagation path. Abstractions that run beyond this limit are dropped.- Parameters:
maxAbstractionPathLength- The maximum number of abstractions on a propagation path
-
setPeerGroup
Sets the peer group in which this solver operates. Peer groups allow for synchronization between solvers- Parameters:
solverPeerGroup- The solver peer group
-
terminate
void terminate()Notifies the solver that no further edges will be scheduled
-