Package com.ibm.wala.cast.ipa.callgraph
Class AstSSAPropagationCallGraphBuilder
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
-
- com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder
-
- com.ibm.wala.cast.ipa.callgraph.AstSSAPropagationCallGraphBuilder
-
- All Implemented Interfaces:
CallGraphBuilder
,HeapModel
,InstanceKeyFactory
,PointerKeyFactory
- Direct Known Subclasses:
CrossLanguageSSAPropagationCallGraphBuilder
public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCallGraphBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AstSSAPropagationCallGraphBuilder.AstConstraintVisitor
static class
AstSSAPropagationCallGraphBuilder.AstInterestingVisitor
static class
AstSSAPropagationCallGraphBuilder.AstPointerAnalysisImpl
-
Nested classes/interfaces inherited from class com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder
SSAPropagationCallGraphBuilder.ConstraintVisitor, SSAPropagationCallGraphBuilder.InterestingVisitor
-
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 static boolean
DEBUG_PROPERTIES
static boolean
DEBUG_TYPE_INFERENCE
-
Fields inherited from class com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder
monitor, PERIODIC_WIPE_SOFT_CACHES, SHORT_CIRCUIT_SINGLE_USES, WIPE_SOFT_CACHE_INTERVAL
-
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 protected
AstSSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, PointerKeyFactory pointerKeyFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ExplicitCallGraph
createEmptyCallGraph(IClassHierarchy cha, AnalysisOptions options)
protected abstract AbstractFieldPointerKey
fieldKeyForUnknownWrites(AbstractFieldPointerKey fieldKey)
If the given fieldKey represents a concrete field, return the corresponding field key that represents all writes to unknown fields that could potentially alias fieldKeyabstract GlobalObjectKey
getGlobalObject(Atom language)
boolean
hasNoInterestingUses(CGNode node, int vn, DefUse du)
protected boolean
isUncataloguedField(IClass type, String fieldName)
each language can specify whether a particular field name should be stored in object catalogs or not.SSAContextInterpreter
makeDefaultContextInterpreters(SSAContextInterpreter appContextInterpreter, AnalysisOptions options, IClassHierarchy cha)
protected SSAPropagationCallGraphBuilder.InterestingVisitor
makeInterestingVisitor(CGNode node, int vn)
protected PropagationSystem
makeSystem(AnalysisOptions options)
SSAPropagationCallGraphBuilder.ConstraintVisitor
makeVisitor(CGNode node)
protected abstract boolean
sameMethod(CGNode opNode, String definingMethod)
Is definingMethod the same as the method represented by opNode? We need this since the names for methods in some languages don't map in the straightforward way to the CGNodeprotected abstract boolean
useObjectCatalog()
should we maintain an object catalog for each instance key, storing the names of all known properties of the instance key? required to handleEachElementGetInstruction
s.-
Methods inherited from class com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder
addBlockInstructionConstraints, addConstraintsFromNode, addNodeInstructionConstraints, addNodePassthruExceptionConstraints, contentsAreInvariant, contentsAreInvariant, getCaughtExceptionTypes, getCFAContextInterpreter, getIncomingPEIs, getInstanceKeyForPEI, getInstanceKeyForPEI, getInvariantContents, getInvariantContents, getTargetPointerKey, getTargetsForCall, getUniqueCatchKey, hasUniqueCatchBlock, isConstantRef, iterateCrossProduct, iteratePointerKeys, makeSolver, processCallingConstraints, unconditionallyAddConstraintsFromNode
-
Methods inherited from class com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
addAssignmentsForCatchPointerKey, addConstraintsFromChangedNode, addConstraintsFromNewNodes, assignInstanceToCatch, catches, customInit, filterForClass, getAnalysisCache, getCallGraph, getClassHierarchy, getContextInterpreter, getContextSelector, getFilteredPointerKeyForLocal, getFilteredPointerKeyForLocal, getFilteredPointerKeyForLocal, getInstanceKeyForAllocation, getInstanceKeyForConstant, getInstanceKeyForMetadataObject, getInstanceKeyForMultiNewArray, getInstanceKeys, getInstanceKeysForClass, getJavaLangObject, getMutableInstanceKeysForClass, getOptions, getPointerAnalysis, getPointerKeyFactory, getPointerKeyForArrayContents, getPointerKeyForExceptionalReturnValue, getPointerKeyForInstanceField, getPointerKeyForLocal, getPointerKeyForReturnValue, getPointerKeyForStaticField, getPropagationSystem, getSolver, getSystem, getTargetForCall, haveAlreadyVisited, isJavaLangObject, makeCallGraph, makeCallGraph, markAlreadyVisited, markChanged, markDiscovered, representsNullType, setContextInterpreter, setContextSelector, setInstanceKeys, setPointerKeyFactory, wasChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.HeapModel
getClassHierarchy
-
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.InstanceKeyFactory
getInstanceKeyForAllocation, getInstanceKeyForConstant, getInstanceKeyForMetadataObject, getInstanceKeyForMultiNewArray
-
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.PointerKeyFactory
getFilteredPointerKeyForLocal, getPointerKeyForArrayContents, getPointerKeyForExceptionalReturnValue, getPointerKeyForInstanceField, getPointerKeyForLocal, getPointerKeyForReturnValue, getPointerKeyForStaticField
-
-
-
-
Field Detail
-
DEBUG_TYPE_INFERENCE
public static final boolean DEBUG_TYPE_INFERENCE
- See Also:
- Constant Field Values
-
DEBUG_PROPERTIES
public static final boolean DEBUG_PROPERTIES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AstSSAPropagationCallGraphBuilder
protected AstSSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, PointerKeyFactory pointerKeyFactory)
-
-
Method Detail
-
useObjectCatalog
protected abstract boolean useObjectCatalog()
should we maintain an object catalog for each instance key, storing the names of all known properties of the instance key? required to handleEachElementGetInstruction
s.
-
isUncataloguedField
protected boolean isUncataloguedField(IClass type, String fieldName)
each language can specify whether a particular field name should be stored in object catalogs or not. By default, always return false.
-
getGlobalObject
public abstract GlobalObjectKey getGlobalObject(Atom language)
-
makeDefaultContextInterpreters
public SSAContextInterpreter makeDefaultContextInterpreters(SSAContextInterpreter appContextInterpreter, AnalysisOptions options, IClassHierarchy cha)
-
makeSystem
protected PropagationSystem makeSystem(AnalysisOptions options)
- Overrides:
makeSystem
in classPropagationCallGraphBuilder
-
createEmptyCallGraph
protected ExplicitCallGraph createEmptyCallGraph(IClassHierarchy cha, AnalysisOptions options)
- Overrides:
createEmptyCallGraph
in classPropagationCallGraphBuilder
-
makeInterestingVisitor
protected SSAPropagationCallGraphBuilder.InterestingVisitor makeInterestingVisitor(CGNode node, int vn)
- Overrides:
makeInterestingVisitor
in classSSAPropagationCallGraphBuilder
-
hasNoInterestingUses
public boolean hasNoInterestingUses(CGNode node, int vn, DefUse du)
- Overrides:
hasNoInterestingUses
in classSSAPropagationCallGraphBuilder
-
makeVisitor
public SSAPropagationCallGraphBuilder.ConstraintVisitor makeVisitor(CGNode node)
- Overrides:
makeVisitor
in classSSAPropagationCallGraphBuilder
- Returns:
- a visitor to examine instructions in the ir
-
fieldKeyForUnknownWrites
protected abstract AbstractFieldPointerKey fieldKeyForUnknownWrites(AbstractFieldPointerKey fieldKey)
If the given fieldKey represents a concrete field, return the corresponding field key that represents all writes to unknown fields that could potentially alias fieldKey
-
-