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 PropagationCallGraphBuilder
PropagationCallGraphBuilder.ArrayLoadOperator, PropagationCallGraphBuilder.ArrayStoreOperator, PropagationCallGraphBuilder.FilterOperator, PropagationCallGraphBuilder.GetFieldOperator, PropagationCallGraphBuilder.InstanceArrayStoreOperator, PropagationCallGraphBuilder.InstancePutFieldOperator, PropagationCallGraphBuilder.InverseFilterOperator, PropagationCallGraphBuilder.MutableBoolean, PropagationCallGraphBuilder.PutFieldOperator, PropagationCallGraphBuilder.TypedPointerKey -
Field Summary
FieldsModifier and TypeFieldDescriptionset of classes (IClass) discovered to be allocatedset of classes whose clinit are processedprotected final booleanShould we change calls to clone() to assignments?protected static final booleanprotected static final intFields inherited from class PropagationCallGraphBuilder
assignOperator, callGraph, cha, contextSelector, DEBUG_GENERAL, entrypointCallSites, filterOperator, instanceKeyFactory, inverseFilterOperator, options, pointerKeyFactory, system -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRTABuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddConstraintsFromNode(CGNode node, MonitorUtil.IProgressMonitor monitor) Visit all instructions in a node, and add dataflow constraints induced by each statement relevant to RTAprotected ExplicitCallGraphcreateEmptyCallGraph(IMethod fakeRootClass, AnalysisOptions options) protected voidprotected abstract PointerKeyprotected RTAContextInterpreterprotected SSAContextInterpretermakeContextInterpreter(SSAContextInterpreter appContextInterpreter) protected ContextSelectormakeContextSelector(ContextSelector appContextSelector) protected abstract UnaryOperator<PointsToSetVariable> makeDispatchOperator(CallSiteReference site, CGNode node) protected IPointsToSolverprotected PropagationSystemmakeSystem(AnalysisOptions options) protected voidprocessClassInitializer(IClass klass) protected booleanprotected abstract voidupdateSetsForNewClass(IClass klass, InstanceKey iKey, CGNode node, NewSiteReference ns) Perform needed bookkeeping when a new class is discovered.voidvisitInvoke(CGNode node, CallSiteReference site) Add a constraint for a call instructionvoidvisitNew(CGNode node, NewSiteReference newSite) Add a constraint for an allocateMethods inherited from class 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 relevant to RTA- Specified by:
addConstraintsFromNodein 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:
customInitin classPropagationCallGraphBuilder
-
getAllocatedTypes
-
makeSolver
- Specified by:
makeSolverin classPropagationCallGraphBuilder
-
makeContextSelector
-
makeContextInterpreter
-
unconditionallyAddConstraintsFromNode
protected boolean unconditionallyAddConstraintsFromNode(CGNode node, MonitorUtil.IProgressMonitor monitor) - Specified by:
unconditionallyAddConstraintsFromNodein classPropagationCallGraphBuilder
-
createEmptyCallGraph
- Overrides:
createEmptyCallGraphin classPropagationCallGraphBuilder
-
makeSystem
- Overrides:
makeSystemin classPropagationCallGraphBuilder
-
getPointerAnalysis
- Specified by:
getPointerAnalysisin interfaceCallGraphBuilder<InstanceKey>- Overrides:
getPointerAnalysisin classPropagationCallGraphBuilder- Returns:
- the Pointer Analysis information computed as a side-effect of call graph construction.
- See Also:
-