public class LazyContextSensitivePointsToSet extends java.lang.Object implements EqualsSupportingPointsToSet
DemandCSPointsTo
analysis.
The idea is that the points-to set is usually context-insensitive. However, when compared with another points-to set and the intersection
of these points-to sets is non-empty, then context information is computed for this points-to set and also for the other one, if applicable.
Then the test is repeated. Once context information is computed it is stored in this wrapper object so that it does not have to be computed again.
Objects of this type should only be compared to other LazyContextSensitivePointsToSet
objects using the equals method.
Checking for non-empty intersection with points-to sets of other types should be possible but it is recommended to consistently use
LazyContextSensitivePointsToSet
nevertheless.Constructor and Description |
---|
LazyContextSensitivePointsToSet(Local l,
EqualsSupportingPointsToSet contextInsensitiveSet,
DemandCSPointsTo demandCSPointsTo) |
Modifier and Type | Method and Description |
---|---|
void |
computeContextSensitiveInfo() |
EqualsSupportingPointsToSet |
getDelegate() |
boolean |
hasNonEmptyIntersection(PointsToSet other)
Returns true if this set shares some objects with other.
|
boolean |
isContextSensitive() |
boolean |
isEmpty()
Returns true if this set contains no run-time objects.
|
boolean |
pointsToSetEquals(java.lang.Object other)
Returns
true if and only if other holds the same alloc nodes as this. |
int |
pointsToSetHashCode()
Computes a hash code based on the contents of the points-to set.
|
java.util.Set<ClassConstant> |
possibleClassConstants()
If this points-to set consists entirely of objects of
type java.lang.Class of a known class,
returns a set of ClassConstant's that are these classes.
|
java.util.Set<java.lang.String> |
possibleStringConstants()
If this points-to set consists entirely of string constants,
returns a set of these constant strings.
|
java.util.Set<Type> |
possibleTypes()
Set of all possible run-time types of objects in the set.
|
public LazyContextSensitivePointsToSet(Local l, EqualsSupportingPointsToSet contextInsensitiveSet, DemandCSPointsTo demandCSPointsTo)
public boolean isContextSensitive()
public boolean hasNonEmptyIntersection(PointsToSet other)
PointsToSet
hasNonEmptyIntersection
in interface PointsToSet
public void computeContextSensitiveInfo()
public boolean isEmpty()
PointsToSet
isEmpty
in interface PointsToSet
public java.util.Set<ClassConstant> possibleClassConstants()
PointsToSet
possibleClassConstants
in interface PointsToSet
public java.util.Set<java.lang.String> possibleStringConstants()
PointsToSet
possibleStringConstants
in interface PointsToSet
public java.util.Set<Type> possibleTypes()
PointsToSet
possibleTypes
in interface PointsToSet
public boolean pointsToSetEquals(java.lang.Object other)
EqualsSupportingPointsToSet
true
if and only if other holds the same alloc nodes as this.
Note that equals() is not overwritten on purpose.
This is because Spark relies on comparison by object identity.pointsToSetEquals
in interface EqualsSupportingPointsToSet
public int pointsToSetHashCode()
EqualsSupportingPointsToSet
pointsToSetHashCode
in interface EqualsSupportingPointsToSet
public EqualsSupportingPointsToSet getDelegate()