Class InfoflowSolver
java.lang.Object
soot.jimple.infoflow.solver.AbstractIFDSSolver<N,D>
soot.jimple.infoflow.solver.fastSolver.flowInsensitive.FlowInsensitiveSolver<soot.Unit,Abstraction,IInfoflowCFG>
soot.jimple.infoflow.solver.fastSolver.flowInsensitive.InfoflowSolver
- All Implemented Interfaces:
IMemoryBoundedSolver,IInfoflowSolver
public class InfoflowSolver
extends FlowInsensitiveSolver<soot.Unit,Abstraction,IInfoflowCFG>
implements IInfoflowSolver
We are subclassing the JimpleIFDSSolver because we need the same executor for
both the forward and the backward analysis Also we need to be able to insert
edges containing new taint information
-
Nested Class Summary
Nested classes/interfaces inherited from interface soot.jimple.infoflow.memory.IMemoryBoundedSolver
IMemoryBoundedSolver.IMemoryBoundedSolverStatusNotification -
Field Summary
Fields inherited from class soot.jimple.infoflow.solver.fastSolver.flowInsensitive.FlowInsensitiveSolver
DEBUG, DEFAULT_CACHE_BUILDER, endSummary, executor, ffCache, flowFunctions, followReturnsPastSeeds, icfg, incoming, initialSeeds, jumpFunctions, logger, memoryManager, numThreads, propagationCount, zeroValueFields inherited from class soot.jimple.infoflow.solver.AbstractIFDSSolver
shorteningMode -
Constructor Summary
ConstructorsConstructorDescriptionInfoflowSolver(AbstractInfoflowProblem problem, InterruptableExecutor executor) -
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.protected Set<Abstraction>computeCallFlowFunction(heros.FlowFunction<Abstraction> flowFunction, Abstraction d1, Abstraction d2) Computes the call flow function for the given call-site abstractionprotected Set<Abstraction>computeCallToReturnFlowFunction(heros.FlowFunction<Abstraction> flowFunction, Abstraction d1, Abstraction d2) Computes the call-to-return flow function for the given call-site abstractionprotected Set<Abstraction>computeNormalFlowFunction(heros.FlowFunction<Abstraction> flowFunction, Abstraction d1, Abstraction d2) Computes the normal flow function for the given set of start and end abstractions.protected Set<Abstraction>computeReturnFlowFunction(heros.FlowFunction<Abstraction> retFunction, Abstraction d1, Abstraction d2, soot.Unit callSite, Collection<Abstraction> callerSideDs) Computes the return flow function for the given set of caller-side abstractions.Set<EndSummary<soot.Unit,Abstraction>> endSummary(soot.SootMethod m, Abstraction d3) Gets the end summary of the given method for the given incoming abstractionprotected InterruptableExecutorFactory method for this solver's thread-pool executor.longGets 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 solverprotected voidprocessExit(Abstraction d1, soot.Unit n, Abstraction d2) Lines 21-32 of the algorithm.voidSets 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 callersvoidsetPeerGroup(ISolverPeerGroup solverPeerGroup) Sets the peer group in which this solver operates.voidsetSolverId(boolean solverId) voidNotifies the solver that no further edges will be scheduledMethods inherited from class soot.jimple.infoflow.solver.fastSolver.flowInsensitive.FlowInsensitiveSolver
addFunction, addIncoming, addStatusListener, applyEndSummaryOnCall, awaitCompletionComputeValuesAndShutdown, forceTerminate, getDebugName, getMemoryManager, getSolverId, getTerminationReason, incoming, isKilled, isTerminated, printStats, propagate, propagate, reset, scheduleEdgeProcessing, setMaxAbstractionPathLength, setMaxCalleesPerCallSite, setMaxJoinPointAbstractions, setMemoryManager, solve, submitInitialSeedsMethods inherited from class soot.jimple.infoflow.solver.AbstractIFDSSolver
setPredecessorShorteningMode, shortenPredecessorsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface soot.jimple.infoflow.solver.IInfoflowSolver
getMemoryManager, setMaxAbstractionPathLength, setMaxCalleesPerCallSite, setMaxJoinPointAbstractions, setMemoryManager, setPredecessorShorteningMode, solve
-
Constructor Details
-
InfoflowSolver
-
-
Method Details
-
getExecutor
Description copied from class:FlowInsensitiveSolverFactory method for this solver's thread-pool executor.- Overrides:
getExecutorin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG>
-
processEdge
Description copied from interface:IInfoflowSolverSchedules the given edge for processing in the solver- Specified by:
processEdgein interfaceIInfoflowSolver- 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
-
injectContext
public void injectContext(IInfoflowSolver otherSolver, soot.SootMethod callee, Abstraction d3, soot.Unit callSite, Abstraction d2, Abstraction d1) Description copied from interface:IInfoflowSolverInjects the given calling context into the incoming set- Specified by:
injectContextin interfaceIInfoflowSolvercallee- methodd3- calling contextcallSite- call sited2- incoming abstraction at the call sited1- calling context at the call site
-
applySummary
public void applySummary(soot.SootMethod callee, Abstraction d3, soot.Unit callSite, Abstraction d2, Abstraction d1) Description copied from interface:IInfoflowSolverCalls applyEndSummaryOnCall in the current solver- Specified by:
applySummaryin interfaceIInfoflowSolver- Parameters:
callee- methodd3- calling contextcallSite- call sited2- incoming abstraction at the call sited1- calling context at the call site
-
computeReturnFlowFunction
protected Set<Abstraction> computeReturnFlowFunction(heros.FlowFunction<Abstraction> retFunction, Abstraction d1, Abstraction d2, soot.Unit callSite, Collection<Abstraction> callerSideDs) Description copied from class:FlowInsensitiveSolverComputes the return flow function for the given set of caller-side abstractions.- Overrides:
computeReturnFlowFunctionin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG> - Parameters:
retFunction- The return flow function to computed1- The abstraction at the beginning of the calleed2- The abstraction at the exit node in the calleecallSite- The call sitecallerSideDs- The abstractions at the call site- Returns:
- The set of caller-side abstractions at the return site
-
computeNormalFlowFunction
protected Set<Abstraction> computeNormalFlowFunction(heros.FlowFunction<Abstraction> flowFunction, Abstraction d1, Abstraction d2) Description copied from class:FlowInsensitiveSolverComputes the normal flow function for the given set of start and end abstractions.- Overrides:
computeNormalFlowFunctionin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG> - Parameters:
flowFunction- The normal flow function to computed1- The abstraction at the method's start noded2- The abstraction at the current node- Returns:
- The set of abstractions at the successor node
-
computeCallToReturnFlowFunction
protected Set<Abstraction> computeCallToReturnFlowFunction(heros.FlowFunction<Abstraction> flowFunction, Abstraction d1, Abstraction d2) Description copied from class:FlowInsensitiveSolverComputes the call-to-return flow function for the given call-site abstraction- Overrides:
computeCallToReturnFlowFunctionin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG> - Parameters:
flowFunction- The call-to-return flow function to computed1- The abstraction at the current method's start node.d2- The abstraction at the call site- Returns:
- The set of caller-side abstractions at the return site
-
computeCallFlowFunction
protected Set<Abstraction> computeCallFlowFunction(heros.FlowFunction<Abstraction> flowFunction, Abstraction d1, Abstraction d2) Description copied from class:FlowInsensitiveSolverComputes the call flow function for the given call-site abstraction- Overrides:
computeCallFlowFunctionin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG> - Parameters:
flowFunction- The call flow function to computed1- The abstraction at the current method's start node.d2- The abstraction at the call site- Returns:
- The set of caller-side abstractions at the callee's start node
-
cleanup
public void cleanup()Description copied from interface:IInfoflowSolverCleans up some unused memory. Results will still be available afterwards, but no intermediate computation values.- Specified by:
cleanupin interfaceIInfoflowSolver
-
endSummary
Description copied from interface:IInfoflowSolverGets the end summary of the given method for the given incoming abstraction- Specified by:
endSummaryin interfaceIInfoflowSolver- Overrides:
endSummaryin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG> - 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
-
processExit
Description copied from class:FlowInsensitiveSolverLines 21-32 of the algorithm. Stores callee-side summaries. Also, at the side of the caller, propagates intra-procedural flows to return sites using those newly computed summaries.- Overrides:
processExitin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG>
-
setFollowReturnsPastSeedsHandler
Description copied from interface:IInfoflowSolverSets 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- Specified by:
setFollowReturnsPastSeedsHandlerin interfaceIInfoflowSolver- Parameters:
handler- The handler to be called when a followReturnsPastSeeds case happens
-
getPropagationCount
public long getPropagationCount()Description copied from interface:IInfoflowSolverGets the number of edges propagated by the solver- Specified by:
getPropagationCountin interfaceIInfoflowSolver- Returns:
- The number of edges propagated by the solver
-
setSolverId
public void setSolverId(boolean solverId) - Specified by:
setSolverIdin interfaceIInfoflowSolver- Overrides:
setSolverIdin classFlowInsensitiveSolver<soot.Unit,Abstraction, IInfoflowCFG>
-
getTabulationProblem
Description copied from interface:IInfoflowSolverGets the IFDS problem solved by this solver- Specified by:
getTabulationProblemin interfaceIInfoflowSolver- Returns:
- The IFDS problem solved by this solver
-
setPeerGroup
Description copied from interface:IInfoflowSolverSets the peer group in which this solver operates. Peer groups allow for synchronization between solvers- Specified by:
setPeerGroupin interfaceIInfoflowSolver- Parameters:
solverPeerGroup- The solver peer group
-
terminate
public void terminate()Description copied from interface:IInfoflowSolverNotifies the solver that no further edges will be scheduled- Specified by:
terminatein interfaceIInfoflowSolver
-