Class WorklistBasedOptimisticCallgraphBuilder
java.lang.Object
com.ibm.wala.cast.js.callgraph.fieldbased.FieldBasedCallGraphBuilder
com.ibm.wala.cast.js.callgraph.fieldbased.WorklistBasedOptimisticCallgraphBuilder
Optimistic call graph builder that propagates inter-procedural data flow iteratively as call
edges are discovered. Slower, but potentially more sound than
PessimisticCallGraphBuilder.
This variant uses a worklist algorithm, generally making it scale better than OptimisticCallgraphBuilder, which repeatedly runs the pessimistic algorithm.
- Author:
- mschaefer
-
Nested Class Summary
Nested classes/interfaces inherited from class FieldBasedCallGraphBuilder
FieldBasedCallGraphBuilder.CallGraphResult -
Field Summary
FieldsModifier and TypeFieldDescriptionintThe maximum number of iterations to perform.Fields inherited from class FieldBasedCallGraphBuilder
cache, cha, constructors, options, supportFullPointerAnalysis, targetSelector -
Constructor Summary
ConstructorsConstructorDescriptionWorklistBasedOptimisticCallgraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, boolean supportFullPointerAnalysis, int bound) -
Method Summary
Modifier and TypeMethodDescriptionvoidBuild a flow graph for the program to be analysed.extractCallGraphEdges(FlowGraph flowgraph, MonitorUtil.IProgressMonitor monitor) Extract call edges from the flow graph into high-level representation.voidprocessPendingCallWorklist(FlowGraph flowgraph, Map<Vertex, Set<FuncVertex>> pendingCallWorklist, VertexFactory factory, Map<Vertex, MutableIntSet> reachingFunctions, Map<VarVertex, Pair<JavaScriptInvoke, Boolean>> reflectiveCalleeVertices, Set<Vertex> worklist, OrdinalSetMapping<FuncVertex> mapping) voidprocessPendingReflectiveCallWorklist(FlowGraph flowgraph, Map<Vertex, Set<FuncVertex>> pendingReflectiveCallWorklist, Map<VarVertex, Pair<JavaScriptInvoke, Boolean>> reflectiveCalleeVertices, Set<Vertex> worklist) Methods inherited from class FieldBasedCallGraphBuilder
addEdgeToJSCallGraph, buildCallGraph, extract, extract, flowGraphFactory, handleFunctionCallOrApplyInvocation
-
Field Details
-
ITERATION_CUTOFF
public int ITERATION_CUTOFFThe maximum number of iterations to perform.
-
-
Constructor Details
-
WorklistBasedOptimisticCallgraphBuilder
public WorklistBasedOptimisticCallgraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, boolean supportFullPointerAnalysis, int bound)
-
-
Method Details
-
buildFlowGraph
Description copied from class:FieldBasedCallGraphBuilderBuild a flow graph for the program to be analysed.- Specified by:
buildFlowGraphin classFieldBasedCallGraphBuilder- Throws:
CancelException
-
extractCallGraphEdges
public Set<Pair<CallVertex, FuncVertex>> extractCallGraphEdges(FlowGraph flowgraph, MonitorUtil.IProgressMonitor monitor) throws CancelException Description copied from class:FieldBasedCallGraphBuilderExtract call edges from the flow graph into high-level representation.- Overrides:
extractCallGraphEdgesin classFieldBasedCallGraphBuilder- Throws:
CancelException
-
processPendingCallWorklist
public void processPendingCallWorklist(FlowGraph flowgraph, Map<Vertex, Set<FuncVertex>> pendingCallWorklist, VertexFactory factory, Map<Vertex, MutableIntSet> reachingFunctions, Map<VarVertex, Pair<JavaScriptInvoke, Boolean>> reflectiveCalleeVertices, Set<Vertex> worklist, OrdinalSetMapping<FuncVertex> mapping) -
processPendingReflectiveCallWorklist
-
addFlowEdge
-