Class AbstractRTABuilder
java.lang.Object
com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
com.ibm.wala.ipa.callgraph.propagation.rta.AbstractRTABuilder
- All Implemented Interfaces:
CallGraphBuilder<InstanceKey>
- Direct Known Subclasses:
BasicRTABuilder
Abstract superclass of various RTA flavors
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
PropagationCallGraphBuilder.ArrayLoadOperator, PropagationCallGraphBuilder.ArrayStoreOperator, PropagationCallGraphBuilder.FilterOperator, PropagationCallGraphBuilder.GetFieldOperator, PropagationCallGraphBuilder.InstanceArrayStoreOperator, PropagationCallGraphBuilder.InstancePutFieldOperator, PropagationCallGraphBuilder.InverseFilterOperator, PropagationCallGraphBuilder.MutableBoolean, PropagationCallGraphBuilder.PutFieldOperator, PropagationCallGraphBuilder.TypedPointerKey
-
Field Summary
Modifier and TypeFieldDescriptionset of classes (IClass) discovered to be allocatedset of classes whose clinit are processedprotected final boolean
Should we change calls to clone() to assignments?protected static final boolean
protected static final int
Fields inherited from class com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
assignOperator, callGraph, cha, contextSelector, DEBUG_GENERAL, entrypointCallSites, filterOperator, instanceKeyFactory, inverseFilterOperator, options, pointerKeyFactory, system
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractRTABuilder
(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addConstraintsFromNode
(CGNode node, MonitorUtil.IProgressMonitor monitor) Visit all instructions in a node, and add dataflow constraints induced by each statement relevat to RTAprotected ExplicitCallGraph
createEmptyCallGraph
(IMethod fakeRootClass, AnalysisOptions options) protected void
protected abstract PointerKey
protected RTAContextInterpreter
protected SSAContextInterpreter
makeContextInterpreter
(SSAContextInterpreter appContextInterpreter) protected ContextSelector
makeContextSelector
(ContextSelector appContextSelector) protected abstract UnaryOperator
<PointsToSetVariable> makeDispatchOperator
(CallSiteReference site, CGNode node) protected IPointsToSolver
protected PropagationSystem
makeSystem
(AnalysisOptions options) protected void
processClassInitializer
(IClass klass) protected boolean
protected abstract void
updateSetsForNewClass
(IClass klass, InstanceKey iKey, CGNode node, NewSiteReference ns) Perform needed bookkeeping when a new class is discovered.void
visitInvoke
(CGNode node, CallSiteReference site) Add a constraint for a call instructionvoid
visitNew
(CGNode node, NewSiteReference newSite) Add a constraint for an allocateMethods inherited from class com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
addAssignmentsForCatchPointerKey, addConstraintsFromChangedNode, addConstraintsFromNewNodes, assignInstanceToCatch, catches, filterForClass, getAnalysisCache, getCallGraph, getClassHierarchy, getContextInterpreter, getContextSelector, getFilteredPointerKeyForLocal, getFilteredPointerKeyForLocal, getFilteredPointerKeyForLocal, getInstanceKeyForAllocation, getInstanceKeyForConstant, getInstanceKeyForMetadataObject, getInstanceKeyForMultiNewArray, getInstanceKeys, getInstanceKeysForClass, getJavaLangObject, getMutableInstanceKeysForClass, getOptions, getPointerKeyFactory, getPointerKeyForArrayContents, getPointerKeyForExceptionalReturnValue, getPointerKeyForInstanceField, getPointerKeyForLocal, getPointerKeyForReturnValue, getPointerKeyForStaticField, getPropagationSystem, getSolver, getSystem, getTargetForCall, haveAlreadyVisited, isJavaLangObject, makeCallGraph, makeCallGraph, markAlreadyVisited, markChanged, markDiscovered, representsNullType, setContextInterpreter, setContextSelector, setInstanceKeys, setPointerKeyFactory, wasChanged
-
Field Details
-
DEBUG_LEVEL
protected static final int DEBUG_LEVEL- See Also:
-
DEBUG
protected static final boolean DEBUG- See Also:
-
clone2Assign
protected final boolean clone2AssignShould we change calls to clone() to assignments?- See Also:
-
clinitProcessed
-
allocatedClasses
-
-
Constructor Details
-
AbstractRTABuilder
protected AbstractRTABuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter)
-
-
Method Details
-
getRTAContextInterpreter
-
addConstraintsFromNode
Visit all instructions in a node, and add dataflow constraints induced by each statement relevat to RTA- Specified by:
addConstraintsFromNode
in classPropagationCallGraphBuilder
- Returns:
- true iff any new constraints are added.
-
processClassInitializer
-
visitInvoke
Add a constraint for a call instruction- Throws:
IllegalArgumentException
- if site is null
-
makeDispatchOperator
protected abstract UnaryOperator<PointsToSetVariable> makeDispatchOperator(CallSiteReference site, CGNode node) -
getKeyForSite
-
visitNew
Add a constraint for an allocate- Throws:
IllegalArgumentException
- if newSite is null
-
updateSetsForNewClass
protected abstract void updateSetsForNewClass(IClass klass, InstanceKey iKey, CGNode node, NewSiteReference ns) Perform needed bookkeeping when a new class is discovered. -
customInit
protected void customInit()- Overrides:
customInit
in classPropagationCallGraphBuilder
-
getAllocatedTypes
-
makeSolver
- Specified by:
makeSolver
in classPropagationCallGraphBuilder
-
makeContextSelector
-
makeContextInterpreter
-
unconditionallyAddConstraintsFromNode
protected boolean unconditionallyAddConstraintsFromNode(CGNode node, MonitorUtil.IProgressMonitor monitor) - Specified by:
unconditionallyAddConstraintsFromNode
in classPropagationCallGraphBuilder
-
createEmptyCallGraph
- Overrides:
createEmptyCallGraph
in classPropagationCallGraphBuilder
-
makeSystem
- Overrides:
makeSystem
in classPropagationCallGraphBuilder
-
getPointerAnalysis
- Specified by:
getPointerAnalysis
in interfaceCallGraphBuilder<InstanceKey>
- Overrides:
getPointerAnalysis
in classPropagationCallGraphBuilder
- Returns:
- the Pointer Analysis information computed as a side-effect of call graph construction.
- See Also:
-