Interface PointsToGraph


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 Details

    • mayPointsTo

      Iterable<AssignExprIF> mayPointsTo(Variable root, List<Field> fields)
      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

      Iterable<AssignExprIF> mayPointsTo(AssignExprIF expr)
      Parameters:
      expr - an abstract object
      Returns:
      the may points-to set of the given abstract object
    • addPointsTo

      boolean addPointsTo(AssignExprIF expr, Iterable<AssignExprIF> pointsTo)
      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 updated
      pointsTo - the points-to set that will be added
      Returns:
      true iff the graph will be re-computed.
    • addSubsetRelation

      boolean addSubsetRelation(AssignExprIF superset, AssignExprIF subset)
      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 relation
      subset - 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