Class PointsToMap
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.PointsToMap
-
public class PointsToMap extends Object
An object that tracks the mapping between pointer keys and points-to set variables
-
-
Constructor Summary
Constructors Constructor Description PointsToMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIndex(PointerKey p)protected intgetNumberOfPointerKeys()PointsToSetVariablegetPointsToSet(int id)PointsToSetVariablegetPointsToSet(PointerKey p)If p is unified, returns the representative for p.intgetRepresentative(int i)Iterator<PointerKey>getTransitiveRoots()booleanisImplicit(PointerKey p)booleanisUnified(PointerKey p)Iterator<PointerKey>iterateKeys()voidput(PointerKey key, PointsToSetVariable v)voidrecordImplicit(PointerKey key)record that a particular points-to-set is represented implicitlyvoidrecordTransitiveRoot(PointerKey key)record points-to-sets that are "roots" of the transitive closure.voidrecordUnified(PointerKey key)record that a particular points-to-set has been unioned with anothervoidrevertToPreTransitive()Wipe out the cached transitive closure informationvoidunify(int i, int j)Unify the points-to-sets for the variables with numbers i and jvoidunify(IntSet s)Unify the points-to-sets for the variables identified by the set s
-
-
-
Method Detail
-
iterateKeys
public Iterator<PointerKey> iterateKeys()
- Returns:
- iterator of all PointerKeys tracked
-
getPointsToSet
public PointsToSetVariable getPointsToSet(PointerKey p)
If p is unified, returns the representative for p.
-
getPointsToSet
public PointsToSetVariable getPointsToSet(int id)
- Returns:
- the
PointsToSetVariablerecorded for a particular id
-
recordImplicit
public void recordImplicit(PointerKey key)
record that a particular points-to-set is represented implicitly
-
put
public void put(PointerKey key, PointsToSetVariable v)
-
recordUnified
public void recordUnified(PointerKey key)
record that a particular points-to-set has been unioned with another
-
recordTransitiveRoot
public void recordTransitiveRoot(PointerKey key)
record points-to-sets that are "roots" of the transitive closure. These points-to-sets can't be thrown away for a pre-transitive solver. A "root" is a points-to-set whose contents do not result from flow from other points-to-sets; there points-to-sets are the primordial assignments from which the transitive closure flows.
-
isUnified
public boolean isUnified(PointerKey p)
-
isImplicit
public boolean isImplicit(PointerKey p)
-
getNumberOfPointerKeys
protected int getNumberOfPointerKeys()
-
revertToPreTransitive
public void revertToPreTransitive()
Wipe out the cached transitive closure information
-
getTransitiveRoots
public Iterator<PointerKey> getTransitiveRoots()
- Returns:
- Iterator
-
unify
public void unify(IntSet s) throws IllegalArgumentException
Unify the points-to-sets for the variables identified by the set s- Parameters:
s- numbers of points-to-set variables- Throws:
IllegalArgumentException- if s is null
-
unify
public void unify(int i, int j)Unify the points-to-sets for the variables with numbers i and j
-
getIndex
public int getIndex(PointerKey p)
- Returns:
- the unique integer that identifies this pointer key
-
getRepresentative
public int getRepresentative(int i)
-
-