public abstract class SSAPropagationCallGraphBuilder extends PropagationCallGraphBuilder implements HeapModel
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SSAPropagationCallGraphBuilder.ConstraintVisitor
A visitor that generates constraints based on statements in SSA form.
|
protected static class |
SSAPropagationCallGraphBuilder.InterestingVisitor
sets bingo to true when it visits an interesting instruction
|
PropagationCallGraphBuilder.ArrayLoadOperator, PropagationCallGraphBuilder.ArrayStoreOperator, PropagationCallGraphBuilder.FilterOperator, PropagationCallGraphBuilder.GetFieldOperator, PropagationCallGraphBuilder.InstanceArrayStoreOperator, PropagationCallGraphBuilder.InstancePutFieldOperator, PropagationCallGraphBuilder.InverseFilterOperator, PropagationCallGraphBuilder.MutableBoolean, PropagationCallGraphBuilder.PutFieldOperator, PropagationCallGraphBuilder.TypedPointerKey| Modifier and Type | Field and Description |
|---|---|
com.ibm.wala.util.MonitorUtil.IProgressMonitor |
monitor |
static boolean |
PERIODIC_WIPE_SOFT_CACHES
Should we periodically clear out soft reference caches in an attempt to help the GC?
|
protected static boolean |
SHORT_CIRCUIT_SINGLE_USES
An optimization: if we can locally determine that a particular pointer p has exactly one use, then we don't actually create the
points-to-set for p, but instead short-circuit by propagating the final solution to the unique use.
|
static int |
WIPE_SOFT_CACHE_INTERVAL
Interval which defines the period to clear soft reference caches
|
assignOperator, callGraph, cha, contextSelector, DEBUG_GENERAL, entrypointCallSites, filterOperator, instanceKeyFactory, inverseFilterOperator, options, pointerKeyFactory, system| Modifier | Constructor and Description |
|---|---|
protected |
SSAPropagationCallGraphBuilder(IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache,
PointerKeyFactory pointerKeyFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBlockInstructionConstraints(CGNode node,
ControlFlowGraph<SSAInstruction,ISSABasicBlock> cfg,
SSACFG.BasicBlock b,
SSAPropagationCallGraphBuilder.ConstraintVisitor v,
com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
Add constraints for a particular basic block.
|
protected boolean |
addConstraintsFromNode(CGNode node,
com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
Visit all instructions in a node, and add dataflow constraints induced by each statement in the SSA form.
|
protected void |
addNodeInstructionConstraints(CGNode node,
com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
Add pointer flow constraints based on instructions in a given node
|
protected void |
addNodePassthruExceptionConstraints(CGNode node,
IR ir,
DefUse du)
Add constraints to represent the flow of exceptions to the exceptional return value for this node
|
protected boolean |
contentsAreInvariant(SymbolTable symbolTable,
DefUse du,
int valueNumber)
A value is "invariant" if we can figure out the instances it can ever point to locally, without resorting to propagation.
|
protected boolean |
contentsAreInvariant(SymbolTable symbolTable,
DefUse du,
int[] valueNumbers) |
static Set<IClass> |
getCaughtExceptionTypes(SSAGetCaughtExceptionInstruction instruction,
IR ir) |
SSAContextInterpreter |
getCFAContextInterpreter() |
static List<ProgramCounter> |
getIncomingPEIs(IR ir,
ISSABasicBlock bb) |
InstanceKey |
getInstanceKeyForPEI(CGNode node,
ProgramCounter instr,
TypeReference type) |
static InstanceKey |
getInstanceKeyForPEI(CGNode node,
ProgramCounter x,
TypeReference type,
InstanceKeyFactory ikFactory) |
InstanceKey[] |
getInvariantContents(SymbolTable symbolTable,
DefUse du,
CGNode node,
int valueNumber,
HeapModel hm)
precondition:contentsAreInvariant(valueNumber)
|
protected InstanceKey[] |
getInvariantContents(SymbolTable symbolTable,
DefUse du,
CGNode node,
int valueNumber,
HeapModel hm,
boolean ensureIndexes) |
PointerKey |
getTargetPointerKey(CGNode target,
int index)
TODO: enhance this logic using type inference TODO!!!: enhance filtering to consider concrete types, not just cones.
|
protected Set<CGNode> |
getTargetsForCall(CGNode caller,
SSAAbstractInvokeInstruction instruction,
InstanceKey[][] invs) |
PointerKey |
getUniqueCatchKey(SSAAbstractInvokeInstruction call,
IR ir,
CGNode node)
precondition: hasUniqueCatchBlock(call,node,cg)
|
boolean |
hasNoInterestingUses(CGNode node,
int vn,
DefUse du) |
protected static boolean |
hasUniqueCatchBlock(SSAAbstractInvokeInstruction call,
IR ir) |
protected boolean |
isConstantRef(SymbolTable symbolTable,
int valueNumber) |
protected void |
iterateCrossProduct(CGNode caller,
SSAAbstractInvokeInstruction call,
com.ibm.wala.util.intset.IntSet parameters,
InstanceKey[][] invariants,
com.ibm.wala.util.functions.VoidFunction<InstanceKey[]> f) |
Iterator<PointerKey> |
iteratePointerKeys() |
protected SSAPropagationCallGraphBuilder.InterestingVisitor |
makeInterestingVisitor(CGNode node,
int vn) |
protected IPointsToSolver |
makeSolver() |
protected SSAPropagationCallGraphBuilder.ConstraintVisitor |
makeVisitor(CGNode node) |
protected void |
processCallingConstraints(CGNode caller,
SSAAbstractInvokeInstruction instruction,
CGNode target,
InstanceKey[][] constParams,
PointerKey uniqueCatchKey) |
protected boolean |
unconditionallyAddConstraintsFromNode(CGNode node,
com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) |
addAssignmentsForCatchPointerKey, addConstraintsFromChangedNode, addConstraintsFromNewNodes, assignInstanceToCatch, catches, createEmptyCallGraph, 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, makeSystem, markAlreadyVisited, markChanged, markDiscovered, representsNullType, setContextInterpreter, setContextSelector, setInstanceKeys, setPointerKeyFactory, wasChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassHierarchygetInstanceKeyForAllocation, getInstanceKeyForConstant, getInstanceKeyForMetadataObject, getInstanceKeyForMultiNewArraygetFilteredPointerKeyForLocal, getPointerKeyForArrayContents, getPointerKeyForExceptionalReturnValue, getPointerKeyForInstanceField, getPointerKeyForLocal, getPointerKeyForReturnValue, getPointerKeyForStaticFieldpublic static final boolean PERIODIC_WIPE_SOFT_CACHES
public static final int WIPE_SOFT_CACHE_INTERVAL
protected static final boolean SHORT_CIRCUIT_SINGLE_USES
public com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor
protected SSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, PointerKeyFactory pointerKeyFactory)
public SSAContextInterpreter getCFAContextInterpreter()
public static InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter x, TypeReference type, InstanceKeyFactory ikFactory)
node - x - type - IllegalArgumentException - if ikFactory is nullprotected boolean addConstraintsFromNode(CGNode node, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) throws com.ibm.wala.util.CancelException
addConstraintsFromNode in class PropagationCallGraphBuildercom.ibm.wala.util.CancelExceptioncom.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder#addConstraintsFromNode(com.ibm.wala.ipa.callgraph.CGNode)protected boolean unconditionallyAddConstraintsFromNode(CGNode node, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) throws com.ibm.wala.util.CancelException
unconditionallyAddConstraintsFromNode in class PropagationCallGraphBuildercom.ibm.wala.util.CancelExceptionprotected SSAPropagationCallGraphBuilder.ConstraintVisitor makeVisitor(CGNode node)
protected void addNodeInstructionConstraints(CGNode node, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionprotected void addBlockInstructionConstraints(CGNode node, ControlFlowGraph<SSAInstruction,ISSABasicBlock> cfg, SSACFG.BasicBlock b, SSAPropagationCallGraphBuilder.ConstraintVisitor v, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionprotected void addNodePassthruExceptionConstraints(CGNode node, IR ir, DefUse du)
node - ir - protected static boolean hasUniqueCatchBlock(SSAAbstractInvokeInstruction call, IR ir)
public PointerKey getUniqueCatchKey(SSAAbstractInvokeInstruction call, IR ir, CGNode node) throws IllegalArgumentException, IllegalArgumentException
IllegalArgumentException - if ir == nullIllegalArgumentException - if call == nullpublic static List<ProgramCounter> getIncomingPEIs(IR ir, ISSABasicBlock bb)
IllegalArgumentException - if ir is nullprotected void processCallingConstraints(CGNode caller, SSAAbstractInvokeInstruction instruction, CGNode target, InstanceKey[][] constParams, PointerKey uniqueCatchKey)
protected void iterateCrossProduct(CGNode caller, SSAAbstractInvokeInstruction call, com.ibm.wala.util.intset.IntSet parameters, InstanceKey[][] invariants, com.ibm.wala.util.functions.VoidFunction<InstanceKey[]> f)
protected Set<CGNode> getTargetsForCall(CGNode caller, SSAAbstractInvokeInstruction instruction, InstanceKey[][] invs)
protected SSAPropagationCallGraphBuilder.InterestingVisitor makeInterestingVisitor(CGNode node, int vn)
public PointerKey getTargetPointerKey(CGNode target, int index)
target - protected boolean contentsAreInvariant(SymbolTable symbolTable, DefUse du, int valueNumber)
valueNumber - protected boolean contentsAreInvariant(SymbolTable symbolTable, DefUse du, int[] valueNumbers)
public InstanceKey[] getInvariantContents(SymbolTable symbolTable, DefUse du, CGNode node, int valueNumber, HeapModel hm)
valueNumber - protected InstanceKey[] getInvariantContents(SymbolTable symbolTable, DefUse du, CGNode node, int valueNumber, HeapModel hm, boolean ensureIndexes)
protected boolean isConstantRef(SymbolTable symbolTable, int valueNumber)
public Iterator<PointerKey> iteratePointerKeys()
iteratePointerKeys in interface HeapModelpublic static Set<IClass> getCaughtExceptionTypes(SSAGetCaughtExceptionInstruction instruction, IR ir)
public InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter instr, TypeReference type)
getInstanceKeyForPEI in interface InstanceKeyFactoryprotected IPointsToSolver makeSolver()
makeSolver in class PropagationCallGraphBuilderCopyright © 2015. All rights reserved.