protected class DemandRefinementPointsTo.PointsToComputer extends Object
Modifier and Type | Field and Description |
---|---|
protected OrdinalSetMapping<InstanceKeyAndState> |
ikAndStates
for numbering
InstanceKey , StateMachine.State pairs |
protected Map<PointerKeyAndState,MutableIntSet> |
pkToP2Set |
protected Map<PointerKeyAndState,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(Map<PointerKeyAndState,MutableIntSet> p2setMap,
PointerKeyAndState pkAndState,
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> MutableIntSet |
find(Map<K,MutableIntSet> M,
K key) |
protected <K> MutableIntSet |
findOrCreate(Map<K,MutableIntSet> M,
K key) |
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(MutableIntSet curTrackedSet,
PointerKeyAndState predPkAndState,
IFlowLabel label)
Handle a predecessor when processing some tracked locations
|
void |
makePassOverFieldStmts() |
protected Collection<PointerKeyAndState> |
matchingPToQueried(PointerKeyAndState curPkAndState,
PointerKey predPk,
IFlowLabel label) |
protected void |
worklistLoop() |
protected final PointerKeyAndState queriedPkAndState
protected final Map<PointerKeyAndState,MutableIntSet> pkToP2Set
protected final Map<PointerKeyAndState,MutableIntSet> pkToTrackedSet
protected final OrdinalSetMapping<InstanceKeyAndState> ikAndStates
InstanceKey
, StateMachine.State
pairsprotected PointsToComputer()
DemandRefinementPointsTo.FlowsToComputer
)protected PointsToComputer(PointerKey pk)
protected PointsToComputer(PointerKeyAndState pkAndState)
public Collection<InstanceKeyAndState> getComputedP2Set(PointerKeyAndState queried)
compute()
; does _not_ do any fresh
demand-driven computation.protected boolean addAllToP2Set(Map<PointerKeyAndState,MutableIntSet> p2setMap, PointerKeyAndState pkAndState, IntSet vals, IFlowLabel label)
protected void compute()
protected void worklistLoop()
protected Collection<PointerKeyAndState> matchingPToQueried(PointerKeyAndState curPkAndState, PointerKey predPk, IFlowLabel label)
label
- the label of the edge from curPk to predPk (must be barred)PointerKeyAndState
s 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 curPkAndState
protected 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 addedcallee
- pkAndState
- public void handleTrackedPointsToWorklist()
public void makePassOverFieldStmts()
protected <K> MutableIntSet findOrCreate(Map<K,MutableIntSet> M, K key)
protected <K> MutableIntSet find(Map<K,MutableIntSet> M, K key)
protected boolean handleTrackedPred(MutableIntSet curTrackedSet, PointerKeyAndState predPkAndState, IFlowLabel label)
curTrackedSet
- the tracked locationspredPkAndState
- the predecessor