Class BoundedTabulationSolver<T,P,F>
java.lang.Object
com.ibm.wala.dataflow.IFDS.TabulationSolver<T,P,F>
com.ibm.wala.dataflow.IFDS.BoundedTabulationSolver<T,P,F>
- Type Parameters:
T- type of node in the supergraphP- type of a procedure (like a box in an RSM)F- type of factoids propagated when solving this problem
A
TabulationSolver that gives up after a finite bound.-
Nested Class Summary
Nested classes/interfaces inherited from class TabulationSolver
TabulationSolver.Result, TabulationSolver.WorklistModifier and TypeClassDescriptionclassprotected class -
Field Summary
Fields inherited from class TabulationSolver
DEBUG_LEVEL, flowFunctionMap, PERIODIC_WIPE_SOFT_CACHES, progressMonitor, summaryEdges, supergraph, verboseModifier and TypeFieldDescriptionprotected static final intDEBUG_LEVEL: 0 No output 1 Print some simple stats and warning information 2 Detailed debugging 3 Also print worklistsprotected final IFlowFunctionMap<T> A map from an edge in a supergraph to a flow functionprotected static final booleanShould we periodically clear out soft reference caches in an attempt to help the GC?protected final MonitorUtil.IProgressMonitorA progress monitor.protected final Map<P, LocalSummaryEdges> A map from Object (procedure) -> LocalSummaryEdges.protected final ISupergraph<T, P> The supergraph which induces this dataflow problemprotected static final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBoundedTabulationSolver(TabulationProblem<T, P, F> p, int bound, MonitorUtil.IProgressMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,P, F> BoundedTabulationSolver <T, P, F> createBoundedTabulationSolver(TabulationProblem<T, P, F> p, int bound, MonitorUtil.IProgressMonitor monitor) intprotected booleanPropagate the fact <s_p,i> -> <n, j> has arisen as a path edge.voidMethods inherited from class TabulationSolver
addSeed, addToWorkList, computeBinaryFlow, computeFlow, computeInverseFlow, findOrCreateCallFlowEdges, findOrCreateLocalPathEdges, findOrCreateLocalSummaryEdges, getCurPathEdge, getCurSummaryEdge, getInversePathEdges, getLocalPathEdges, getProblem, getProgressMonitor, getResult, getSeeds, getSummarySources, getSupergraph, initialize, make, makeWorklist, newCallExplodedEdge, newNormalExplodedEdge, newSummaryEdge, performVerboseAction, popFromWorkList, processCall, processExit, processParticularCallee, recordCall, solve, tendToSoftCachesModifier and TypeMethodDescriptionvoidRestart tabulation from a particular path edge.protected voidaddToWorkList(T s_p, int i, T n, int j) protected IntSetcomputeBinaryFlow(int call_d, int exit_d, IBinaryReturnFlowFunction f) protected IntSetcomputeFlow(int d1, IUnaryFlowFunction f) protected IntSetcomputeInverseFlow(int d2, IReversibleFlowFunction f) protected CallFlowEdgesprotected LocalPathEdgesprotected LocalSummaryEdgesprotected IntSetgetInversePathEdges(T s_p, T n, int d2) getLocalPathEdges(T s_p) get the bitvector of facts that hold at the entry to a given nodegetSeeds()getSummarySources(T n2, int d2, T n1) protected voidStart tabulation with the initial seeds.static <T,P, F> TabulationSolver <T, P, F> make(TabulationProblem<T, P, F> p) protected ITabulationWorklist<T> Subclasses can override this to plug in a different worklist implementation.protected voidnewCallExplodedEdge(PathEdge<T> edge, T calleeEntry, int d3) Indicates that due to a path edge 'edge' <s_p, d1> -> <n, d2> and application of a call flow function, a new path edge <calleeEntry, d3> -> <calleeEntry, d3> was created.protected voidnewNormalExplodedEdge(PathEdge<T> edge, T m, int d3) Indicates that due to a path edge <s_p, d1> -> <n, d2> (the 'edge' parameter) and a normal flow function application, a new path edge <s_p, d1> -> <m, d3> was created.protected voidCombines [25] and [26-28].protected final voidprotected voidprocessCall(PathEdge<T> edge) Handle lines [14 - 19] of the algorithm, propagating information into and across a call site.protected voidprocessExit(PathEdge<T> edge) Handle lines [21 - 32] of the algorithm, propagating information from an exit node.protected voidprocessParticularCallee(PathEdge<T> edge, int callNodeNum, Collection<T> allReturnSites, T calleeEntry) handle a particular callee for some call node.protected voidrecordCall(T callNode, T callee, int d1, boolean gotReuse) invoked when a callee is processed with a particular entry factsolve()Solve the dataflow problem.protected voidFor some reason (either a bug in our code that defeats soft references, or a bad policy in the GC), leaving soft reference caches to clear themselves out doesn't work.
-
Constructor Details
-
BoundedTabulationSolver
protected BoundedTabulationSolver(TabulationProblem<T, P, F> p, int bound, MonitorUtil.IProgressMonitor monitor)
-
-
Method Details
-
createBoundedTabulationSolver
public static <T,P, BoundedTabulationSolver<T,F> P, createBoundedTabulationSolverF> (TabulationProblem<T, P, F> p, int bound, MonitorUtil.IProgressMonitor monitor) -
propagate
Description copied from class:TabulationSolverPropagate the fact <s_p,i> -> <n, j> has arisen as a path edge. Returns <code>true</code> iff the path edge was not previously observed.- Overrides:
propagatein classTabulationSolver<T,P, F> - Parameters:
s_p- entry blocki- dataflow fact on entryn- reached blockj- dataflow fact reached
-
getNumSteps
public int getNumSteps() -
resetBound
public void resetBound()
-