protected class DemandRefinementPointsTo.PointsToComputer
extends java.lang.Object
Pseudocode in Chapter 5 of Manu Sridharan's dissertation.
| Modifier and Type | Field and Description |
|---|---|
protected com.ibm.wala.util.intset.OrdinalSetMapping<InstanceKeyAndState> |
ikAndStates
for numbering
InstanceKey, StateMachine.State pairs |
protected java.util.Map<PointerKeyAndState,com.ibm.wala.util.intset.MutableIntSet> |
pkToP2Set |
protected java.util.Map<PointerKeyAndState,com.ibm.wala.util.intset.MutableIntSet> |
pkToTrackedSet |
protected PointerKeyAndState |
queriedPkAndState |
| Modifier | Constructor and Description |
|---|---|
protected |
PointsToComputer()
use this with care! only for subclasses that aren't computing points-to information exactly
(e.g.,
DemandRefinementPointsTo.FlowsToComputer) |
protected |
PointsToComputer(PointerKey pk) |
protected |
PointsToComputer(PointerKeyAndState pkAndState) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addAllToP2Set(java.util.Map<PointerKeyAndState,com.ibm.wala.util.intset.MutableIntSet> p2setMap,
PointerKeyAndState pkAndState,
com.ibm.wala.util.intset.IntSet vals,
IFlowLabel label) |
protected void |
addToTrackedPToWorklist(PointerKeyAndState pkAndState) |
protected boolean |
calleeSubGraphMissingAndShouldNotBeAdded(boolean addGraphs,
CGNode callee,
PointerKeyAndState pkAndState)
when doing backward interprocedural propagation, is it true that we should not add a graph
representation for a callee _and_ that the subgraph for the callee is missing?
|
protected void |
compute() |
protected <K> com.ibm.wala.util.intset.MutableIntSet |
find(java.util.Map<K,com.ibm.wala.util.intset.MutableIntSet> M,
K key) |
protected <K> com.ibm.wala.util.intset.MutableIntSet |
findOrCreate(java.util.Map<K,com.ibm.wala.util.intset.MutableIntSet> M,
K key) |
java.util.Collection<InstanceKeyAndState> |
getComputedP2Set(PointerKeyAndState queried)
get a points-to set that has already been computed via some previous call to
compute(); does _not_ do any fresh demand-driven computation. |
protected void |
handleBackCopy(PointerKeyAndState curPkAndState,
PointerKey predPk,
IFlowLabel label) |
void |
handleTrackedPointsToWorklist() |
protected boolean |
handleTrackedPred(com.ibm.wala.util.intset.MutableIntSet curTrackedSet,
PointerKeyAndState predPkAndState,
IFlowLabel label)
Handle a predecessor when processing some tracked locations
|
void |
makePassOverFieldStmts() |
protected java.util.Collection<PointerKeyAndState> |
matchingPToQueried(PointerKeyAndState curPkAndState,
PointerKey predPk,
IFlowLabel label) |
protected void |
worklistLoop() |
protected final PointerKeyAndState queriedPkAndState
protected final java.util.Map<PointerKeyAndState,com.ibm.wala.util.intset.MutableIntSet> pkToP2Set
protected final java.util.Map<PointerKeyAndState,com.ibm.wala.util.intset.MutableIntSet> pkToTrackedSet
protected final com.ibm.wala.util.intset.OrdinalSetMapping<InstanceKeyAndState> ikAndStates
InstanceKey, StateMachine.State pairsprotected PointsToComputer()
DemandRefinementPointsTo.FlowsToComputer)protected PointsToComputer(PointerKey pk)
protected PointsToComputer(PointerKeyAndState pkAndState)
public java.util.Collection<InstanceKeyAndState> getComputedP2Set(PointerKeyAndState queried)
compute(); does _not_ do any fresh demand-driven computation.protected boolean addAllToP2Set(java.util.Map<PointerKeyAndState,com.ibm.wala.util.intset.MutableIntSet> p2setMap, PointerKeyAndState pkAndState, com.ibm.wala.util.intset.IntSet vals, IFlowLabel label)
protected void compute()
protected void worklistLoop()
protected java.util.Collection<PointerKeyAndState> matchingPToQueried(PointerKeyAndState curPkAndState, PointerKey predPk, IFlowLabel label)
label - the label of the edge from curPk to predPk (must be barred)PointerKeyAndStates whose points-to sets have been queried, such that
the PointerKey is predPk, and transitioning from its state on label.bar()
yields the state of curPkAndStateprotected void handleBackCopy(PointerKeyAndState curPkAndState, PointerKey predPk, IFlowLabel label)
protected void addToTrackedPToWorklist(PointerKeyAndState pkAndState)
protected boolean calleeSubGraphMissingAndShouldNotBeAdded(boolean addGraphs,
CGNode callee,
PointerKeyAndState pkAndState)
addGraphs - whether graphs should always be addedpublic void handleTrackedPointsToWorklist()
public void makePassOverFieldStmts()
protected <K> com.ibm.wala.util.intset.MutableIntSet findOrCreate(java.util.Map<K,com.ibm.wala.util.intset.MutableIntSet> M,
K key)
protected <K> com.ibm.wala.util.intset.MutableIntSet find(java.util.Map<K,com.ibm.wala.util.intset.MutableIntSet> M,
K key)
protected boolean handleTrackedPred(com.ibm.wala.util.intset.MutableIntSet curTrackedSet,
PointerKeyAndState predPkAndState,
IFlowLabel label)
curTrackedSet - the tracked locationspredPkAndState - the predecessor