com.ibm.wala.cast.js.ipa.callgraph
Class JSSSAPropagationCallGraphBuilder
java.lang.Object
com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder
com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder
com.ibm.wala.cast.ipa.callgraph.AstSSAPropagationCallGraphBuilder
com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder
- All Implemented Interfaces:
- CallGraphBuilder, HeapModel, InstanceKeyFactory, PointerKeyFactory
- Direct Known Subclasses:
- JSCFABuilder
public class JSSSAPropagationCallGraphBuilder
- extends AstSSAPropagationCallGraphBuilder
| Fields inherited from class com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder |
assignOperator, callGraph, cha, contextSelector, DEBUG_GENERAL, entrypointCallSites, filterOperator, instanceKeyFactory, inverseFilterOperator, options, pointerKeyFactory, system |
|
Method Summary |
protected void |
addAssignmentsForCatchPointerKey(PointerKey exceptionVar,
java.util.Set catchClasses,
PointerKey e)
Generate a set of constraints to represent assignment to an exception variable in a catch clause. |
protected ExplicitCallGraph |
createEmptyCallGraph(IClassHierarchy cha,
AnalysisOptions options)
|
java.net.URL |
getBaseURL()
|
protected boolean |
isConstantRef(SymbolTable symbolTable,
int valueNumber)
|
protected boolean |
isUncataloguedField(IClass type,
java.lang.String fieldName)
each language can specify whether a particular field name should be stored
in object catalogs or not. |
protected SSAPropagationCallGraphBuilder.InterestingVisitor |
makeInterestingVisitor(CGNode node,
int vn)
|
protected PropagationSystem |
makeSystem(AnalysisOptions options)
|
protected TypeInference |
makeTypeInference(IR ir,
IClassHierarchy cha)
|
protected JSSSAPropagationCallGraphBuilder.JSConstraintVisitor |
makeVisitor(CGNode node)
|
protected void |
processCallingConstraints(CGNode caller,
SSAAbstractInvokeInstruction instruction,
CGNode target,
InstanceKey[][] constParams,
PointerKey uniqueCatchKey)
|
void |
setBaseURL(java.net.URL url)
|
protected 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 handle
EachElementGetInstructions. |
| 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, iterateCrossProduct, iteratePointerKeys, makeSolver, unconditionallyAddConstraintsFromNode |
| Methods inherited from class com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder |
addConstraintsFromChangedNode, addConstraintsFromNewNodes, assignInstanceToCatch, catches, customInit, filterForClass, getAnalysisCache, getCallGraph, getClassHierarchy, getContextInterpreter, getContextSelector, getFilteredPointerKeyForLocal, getFilteredPointerKeyForLocal, getFilteredPointerKeyForLocal, getInstanceKeyForAllocation, getInstanceKeyForClassObject, getInstanceKeyForConstant, getInstanceKeyForMultiNewArray, getInstanceKeys, getInstanceKeysForClass, getJavaLangObject, getMutableInstanceKeysForClass, getOptions, getPointerAnalysis, getPointerKeyFactory, getPointerKeyForArrayContents, getPointerKeyForExceptionalReturnValue, getPointerKeyForInstanceField, getPointerKeyForLocal, getPointerKeyForReturnValue, getPointerKeyForStaticField, getPropagationSystem, getSolver, getTargetForCall, haveAlreadyVisited, isJavaLangObject, makeCallGraph, makeCallGraph, markAlreadyVisited, markChanged, markDiscovered, representsNullType, setContextInterpreter, setContextSelector, setInstanceKeys, wasChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG_LEXICAL
public static final boolean DEBUG_LEXICAL
- See Also:
- Constant Field Values
DEBUG_TYPE_INFERENCE
public static final boolean DEBUG_TYPE_INFERENCE
- See Also:
- Constant Field Values
JSSSAPropagationCallGraphBuilder
protected JSSSAPropagationCallGraphBuilder(IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache,
PointerKeyFactory pointerKeyFactory)
getBaseURL
public java.net.URL getBaseURL()
setBaseURL
public void setBaseURL(java.net.URL url)
isConstantRef
protected boolean isConstantRef(SymbolTable symbolTable,
int valueNumber)
- Overrides:
isConstantRef in class SSAPropagationCallGraphBuilder
useObjectCatalog
protected boolean useObjectCatalog()
- Description copied from class:
AstSSAPropagationCallGraphBuilder
- should we maintain an object catalog for each instance key, storing the
names of all known properties of the instance key? required to handle
EachElementGetInstructions.
- Specified by:
useObjectCatalog in class AstSSAPropagationCallGraphBuilder
- See Also:
AstSSAPropagationCallGraphBuilder.AstConstraintVisitor.visitPut(SSAPutInstruction),
AstSSAPropagationCallGraphBuilder.AstConstraintVisitor.visitEachElementGet(EachElementGetInstruction)
isUncataloguedField
protected boolean isUncataloguedField(IClass type,
java.lang.String fieldName)
- Description copied from class:
AstSSAPropagationCallGraphBuilder
- each language can specify whether a particular field name should be stored
in object catalogs or not. By default, always return false.
- Overrides:
isUncataloguedField in class AstSSAPropagationCallGraphBuilder
createEmptyCallGraph
protected ExplicitCallGraph createEmptyCallGraph(IClassHierarchy cha,
AnalysisOptions options)
- Overrides:
createEmptyCallGraph in class AstSSAPropagationCallGraphBuilder
makeTypeInference
protected TypeInference makeTypeInference(IR ir,
IClassHierarchy cha)
addAssignmentsForCatchPointerKey
protected void addAssignmentsForCatchPointerKey(PointerKey exceptionVar,
java.util.Set catchClasses,
PointerKey e)
- Description copied from class:
PropagationCallGraphBuilder
- Generate a set of constraints to represent assignment to an exception variable in a catch clause. Note that we use
FilterOperator to filter out types that the exception handler doesn't catch.
- Overrides:
addAssignmentsForCatchPointerKey in class PropagationCallGraphBuilder
- Parameters:
exceptionVar - points-to set for a variable representing a caught exceptioncatchClasses - set of TypeReferences that the exceptionVar may catche - points-to-set representing a thrown exception that might be caught.
makeInterestingVisitor
protected SSAPropagationCallGraphBuilder.InterestingVisitor makeInterestingVisitor(CGNode node,
int vn)
- Overrides:
makeInterestingVisitor in class AstSSAPropagationCallGraphBuilder
makeSystem
protected PropagationSystem makeSystem(AnalysisOptions options)
- Overrides:
makeSystem in class PropagationCallGraphBuilder
makeVisitor
protected JSSSAPropagationCallGraphBuilder.JSConstraintVisitor makeVisitor(CGNode node)
- Overrides:
makeVisitor in class SSAPropagationCallGraphBuilder
- Returns:
- a visitor to examine instructions in the ir
processCallingConstraints
protected void processCallingConstraints(CGNode caller,
SSAAbstractInvokeInstruction instruction,
CGNode target,
InstanceKey[][] constParams,
PointerKey uniqueCatchKey)
- Overrides:
processCallingConstraints in class SSAPropagationCallGraphBuilder