Class AbstractRTABuilder
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
-
- com.ibm.wala.ipa.callgraph.propagation.rta.AbstractRTABuilder
-
- All Implemented Interfaces:
CallGraphBuilder
- Direct Known Subclasses:
BasicRTABuilder
public abstract class AbstractRTABuilder extends PropagationCallGraphBuilder
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
Fields Modifier and Type Field Description protected HashSet<IClass>allocatedClassesset of classes (IClass) discovered to be allocatedprotected Set<IClass>clinitProcessedset of classes whose clinit are processedprotected booleanclone2AssignShould we change calls to clone() to assignments?protected static booleanDEBUGprotected static intDEBUG_LEVEL-
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
Constructors Modifier Constructor Description protectedAbstractRTABuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter)
-
Method Summary
-
Methods 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 Detail
-
DEBUG_LEVEL
protected static final int DEBUG_LEVEL
- See Also:
- Constant Field Values
-
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
-
clone2Assign
protected final boolean clone2Assign
Should we change calls to clone() to assignments?- See Also:
- Constant Field Values
-
clinitProcessed
protected final Set<IClass> clinitProcessed
set of classes whose clinit are processed
-
-
Constructor Detail
-
AbstractRTABuilder
protected AbstractRTABuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter)
-
-
Method Detail
-
getRTAContextInterpreter
protected RTAContextInterpreter getRTAContextInterpreter()
-
addConstraintsFromNode
protected boolean addConstraintsFromNode(CGNode node, MonitorUtil.IProgressMonitor monitor)
Visit all instructions in a node, and add dataflow constraints induced by each statement relevat to RTA- Specified by:
addConstraintsFromNodein classPropagationCallGraphBuilder- Returns:
- true iff any new constraints are added.
-
processClassInitializer
protected void processClassInitializer(IClass klass)
-
visitInvoke
public void visitInvoke(CGNode node, CallSiteReference site)
Add a constraint for a call instruction- Throws:
IllegalArgumentException- if site is null
-
makeDispatchOperator
protected abstract UnaryOperator<PointsToSetVariable> makeDispatchOperator(CallSiteReference site, CGNode node)
-
getKeyForSite
protected abstract PointerKey getKeyForSite(CallSiteReference site)
-
visitNew
public void visitNew(CGNode node, NewSiteReference newSite)
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.- Parameters:
klass-
-
customInit
protected void customInit()
- Overrides:
customInitin classPropagationCallGraphBuilder
-
getAllocatedTypes
public Set<IClass> getAllocatedTypes()
- Returns:
- set of IClasses determined to be allocated
-
makeSolver
protected IPointsToSolver makeSolver()
- Specified by:
makeSolverin classPropagationCallGraphBuilder
-
makeContextSelector
protected ContextSelector makeContextSelector(ContextSelector appContextSelector)
-
makeContextInterpreter
protected SSAContextInterpreter makeContextInterpreter(SSAContextInterpreter appContextInterpreter)
-
unconditionallyAddConstraintsFromNode
protected boolean unconditionallyAddConstraintsFromNode(CGNode node, MonitorUtil.IProgressMonitor monitor)
- Specified by:
unconditionallyAddConstraintsFromNodein classPropagationCallGraphBuilder
-
createEmptyCallGraph
protected ExplicitCallGraph createEmptyCallGraph(IClassHierarchy cha, AnalysisOptions options)
- Overrides:
createEmptyCallGraphin classPropagationCallGraphBuilder
-
makeSystem
protected PropagationSystem makeSystem(AnalysisOptions options)
- Overrides:
makeSystemin classPropagationCallGraphBuilder
-
getPointerAnalysis
public PointerAnalysis<InstanceKey> getPointerAnalysis()
- Specified by:
getPointerAnalysisin interfaceCallGraphBuilder- Overrides:
getPointerAnalysisin classPropagationCallGraphBuilder- Returns:
- the Pointer Analysis information computed as a side-effect of call graph construction.
-
-