public interface PointsToGraph
A points-to graph G is a tuple (V, E, pt) where V are nodes, E are edges and pt is a function from V to sets of V. A node represents a program object, "pt(v)" represents the points-to set of a node "v" and an edge (v0, v1) represents a relation "pt(v0) is a subset of pt(v1)".
This interface is an realization of the above graph where nodes are abstract
objects (instances of AssignExprIFs).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPointsTo(AssignExprIF expr, Iterable<AssignExprIF> pointsTo) Adds additional point-to information to the graph.booleanaddSubsetRelation(AssignExprIF superset, AssignExprIF subset) Adds subset-of relation to the graph.clone()mayPointsTo(AssignExprIF expr) mayPointsTo(Variable root, List<Field> fields)
-
Method Details
-
mayPointsTo
- Parameters:
root- a variable "v"fields- a sequence of accessing fields "{f0, f1, ...}"- Returns:
- the may points-to set of the given program object represented as "v.f0.f1. ..."
-
mayPointsTo
- Parameters:
expr- an abstract object- Returns:
- the may points-to set of the given abstract object
-
addPointsTo
Adds additional point-to information to the graph. If it has any new information, the graph will be re-computed.- Parameters:
expr- the abstract object whose points-to set will be updatedpointsTo- the points-to set that will be added- Returns:
- true iff the graph will be re-computed.
-
addSubsetRelation
Adds subset-of relation to the graph. If it has any new information, the graph will be re-computed.- Parameters:
superset- abstract object whose points-to set is the super-set in the relationsubset- abstract object whose points-to set is the sub-set in the relation- Returns:
- true iff the graph will be re-computed
-
clone
PointsToGraph clone()- Returns:
- a new instance that was deep copied from this instance
-