accrue.analysis.pointer

## Class PointsToGraph

- java.lang.Object
- - accrue.analysis.pointer.PointsToGraph

- Direct Known Subclasses:
    PointsToGraphSerial, PointsToGraphSync

      public abstract class PointsToGraph
      extends java.lang.Object

  A PointsToGraph is a data structure that describes what expressions/locations (i.e., PointsToGraphNodes) can point to what abstract objects (i.e., HContexts)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected HeapAbstractionFactory` | `af`
    `protected PointsToEngine` | `engine`
    `protected boolean` | `solved` Has this graph been solved yet? Various methods shoudl only be called once the points to graph inference has finished.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PointsToGraph(HeapAbstractionFactory af)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `addCall(PointsToEngine.StmtAndContext sac, polyglot.types.CodeInstance caller, CContext callerContext, polyglot.types.ProcedureInstance callee, CContext calleeContext, polyglot.util.Position origin)`
    `abstract boolean` | `addEdge(PointsToEngine.StmtAndContext sac, PointsToGraphNode src, HContext trg, polyglot.util.Position origin)`
    `abstract boolean` | `addEdges(PointsToEngine.StmtAndContext sac, PointsToGraphNode src, java.util.Set<HContext> trgs, polyglot.util.Position origin)`
    `abstract accrue.analysis.pointer.CallGraph` | `callGraph()`
    `abstract void` | `dump(java.io.PrintStream out)` Dump the graph in a human readable form.
    `abstract void` | `dumpPointsToGraph(int level)` Dump the graph in GraphViz dot format.
    `abstract long` | `edgeSize()`
    `boolean` | `equals(java.lang.Object obj)`
    `abstract java.util.Set<CContext>` | `getContexts(polyglot.types.CodeInstance pi)`
    `int` | `hashCode()`
    `long` | `nodeSize()`
    `abstract java.util.Set<HContext>` | `pointsTo(PointsToEngine.StmtAndContext sac, PointsToGraphNode r)`
    `java.util.Set<HContext>` | `pointsTo(PointsToGraphNode r)`
    `java.util.Set<HContext>` | `pointsToFiltered(PointsToGraphNode r, polyglot.types.Type t)`
    `java.util.Set<HContext>` | `pointsToFiltered(PointsToGraphNode r, polyglot.types.Type t, java.util.Set<polyglot.types.Type> notT)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### af

          protected final HeapAbstractionFactory af

    - #### engine

          protected PointsToEngine engine

    - #### solved

          protected boolean solved

      Has this graph been solved yet? Various methods shoudl only be called once the points to graph inference has finished.

  - ### Constructor Detail

    - #### PointsToGraph

          public PointsToGraph(HeapAbstractionFactory af)

  - ### Method Detail

    - #### pointsTo

          public final java.util.Set<HContext> pointsTo(PointsToGraphNode r)

    - #### pointsToFiltered

          public final java.util.Set<HContext> pointsToFiltered(PointsToGraphNode r,
                                                 polyglot.types.Type t)

    - #### pointsToFiltered

          public final java.util.Set<HContext> pointsToFiltered(PointsToGraphNode r,
                                                 polyglot.types.Type t,
                                                 java.util.Set<polyglot.types.Type> notT)

    - #### addEdges

          public abstract boolean addEdges(PointsToEngine.StmtAndContext sac,
                         PointsToGraphNode src,
                         java.util.Set<HContext> trgs,
                         polyglot.util.Position origin)

    - #### addEdge

          public abstract boolean addEdge(PointsToEngine.StmtAndContext sac,
                        PointsToGraphNode src,
                        HContext trg,
                        polyglot.util.Position origin)

    - #### addCall

          public abstract boolean addCall(PointsToEngine.StmtAndContext sac,
                        polyglot.types.CodeInstance caller,
                        CContext callerContext,
                        polyglot.types.ProcedureInstance callee,
                        CContext calleeContext,
                        polyglot.util.Position origin)

    - #### pointsTo

          public abstract java.util.Set<HContext> pointsTo(PointsToEngine.StmtAndContext sac,
                                         PointsToGraphNode r)

    - #### getContexts

          public abstract java.util.Set<CContext> getContexts(polyglot.types.CodeInstance pi)

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### dump

          public abstract void dump(java.io.PrintStream out)

      Dump the graph in a human readable form.
      Parameters:
        `out` -

    - #### dumpPointsToGraph

          public abstract void dumpPointsToGraph(int level)

      Dump the graph in GraphViz dot format.
      Parameters:
        `out` -

    - #### nodeSize

          public long nodeSize()

    - #### edgeSize

          public abstract long edgeSize()

    - #### callGraph

          public abstract accrue.analysis.pointer.CallGraph callGraph()