accrue.analysis.domination

## Class PostDominatorDataFlow

- java.lang.Object
- - polyglot.visit.NodeVisitor
  - - polyglot.visit.HaltingVisitor
    - - polyglot.visit.ErrorHandlingVisitor
      - - polyglot.visit.DataFlow<FlowItem>
        - - accrue.analysis.interprocanalysis.PreciseDataFlow<accrue.analysis.domination.ImmediatePostDominator>
          - - accrue.analysis.domination.PostDominatorDataFlow

- All Implemented Interfaces:
    java.lang.Cloneable, polyglot.util.Copy<polyglot.visit.NodeVisitor>
  Direct Known Subclasses:
    NonFatalPostDominatorDataFlow

      public class PostDominatorDataFlow
      extends PreciseDataFlow<accrue.analysis.domination.ImmediatePostDominator>

  This PreciseDataFlow finds postdominators. For any branch X that is postdominated by a peer Y in the same analysis unit (i.e., the same code decl), it (a) records with X that it is postdominated by Y, and (b) records with Y that it postdominates X. In addition, this analysis determines the different exit paths from this code decl. This is useful in determining the post dominator of method calls.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class accrue.analysis.interprocanalysis.PreciseDataFlow

      `PreciseDataFlow.PreciseCFGBuilder<FlowItem extends polyglot.visit.DataFlow.Item>`

    - ### Nested classes/interfaces inherited from class polyglot.visit.DataFlow

      `polyglot.visit.DataFlow.BoolItem<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.ConditionNavigator<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.FlowGraphSource<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.Frame<FlowItem extends polyglot.visit.DataFlow.Item>, polyglot.visit.DataFlow.Item`

    - ### Nested classes/interfaces inherited from interface polyglot.util.Copy

      `polyglot.util.Copy.Util`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DominationAnalysisUtil` | `autil`
    `protected java.util.Map<polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator>,accrue.analysis.domination.ImmediatePostDominator>` | `postdoms`

    - ### Fields inherited from class polyglot.visit.DataFlow

      `dataflowOnEntry, detectBackEdges, flowCounter, flowgraphStack, forward`

    - ### Fields inherited from class polyglot.visit.ErrorHandlingVisitor

      `error, job, nf, ts`

    - ### Fields inherited from class polyglot.visit.HaltingVisitor

      `bypass, bypassParent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PostDominatorDataFlow(polyglot.frontend.Job job, polyglot.types.TypeSystem ts, polyglot.ast.NodeFactory nf, DominationAnalysisUtil autil)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `check(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph, polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> p)`
    `protected void` | `check(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph, polyglot.ast.Term n, boolean entry, accrue.analysis.domination.ImmediatePostDominator inItem, java.util.Map<polyglot.visit.FlowGraph.EdgeKey,accrue.analysis.domination.ImmediatePostDominator> outItems)`
    `protected accrue.analysis.domination.ImmediatePostDominator` | `confluence(java.util.List<accrue.analysis.domination.ImmediatePostDominator> items, polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> peer, polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)`
    `protected accrue.analysis.domination.ImmediatePostDominator` | `createInitialItem(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph, polyglot.ast.Term node, boolean entry)` Create an initial Item for the dataflow analysis.
    `protected void` | `dataflow(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)`
    `protected java.util.Map<polyglot.visit.FlowGraph.EdgeKey,accrue.analysis.domination.ImmediatePostDominator>` | `flow(java.util.List<accrue.analysis.domination.ImmediatePostDominator> inItems, java.util.List<polyglot.visit.FlowGraph.EdgeKey> inItemKeys, polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph, polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> peer)`
    `protected accrue.analysis.domination.ImmediatePostDominator` | `intersect(accrue.analysis.domination.ImmediatePostDominator a, accrue.analysis.domination.ImmediatePostDominator b)`
    `protected accrue.analysis.domination.ImmediatePostDominator` | `intersect(java.util.List<polyglot.visit.FlowGraph.Edge<accrue.analysis.domination.ImmediatePostDominator>> edges, polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)` Find immediate postdominator for all edges in edges.
    `protected accrue.analysis.domination.ImmediatePostDominator` | `ipd(polyglot.visit.FlowGraph.Edge<accrue.analysis.domination.ImmediatePostDominator> e, polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)`
    `void` | `performDataflow(polyglot.ast.CodeNode cd)`
    `protected void` | `record(accrue.analysis.domination.ImmediatePostDominator ipd, polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> p)`

    - ### Methods inherited from class accrue.analysis.interprocanalysis.PreciseDataFlow

      `autil, createCFGBuilder, currentContext, dataFlowNodeIdentifierForPeer, dataFlowNodeIdentifierForPeer, initGraph, peerForDataFlowNodeIdentifier`

    - ### Methods inherited from class polyglot.visit.DataFlow

      `confluence, constructItemsFromCondition, createFrame, createInitialItem, currentFlowGraph, dataflow, dataflow, dumpFlowGraph, enterCall, filterItems, filterItemsExceptionSubclass, filterItemsNonError, filterItemsNonException, findSCCs, flow, flow, flow, flow, flowBooleanConditions, flowToBooleanFlow, hasTrueFalseBranches, initGraph, itemsToMap, itemToMap, lang, leave, leaveCall, post, safeConfluence, safeConfluence, safeConfluence`

    - ### Methods inherited from class polyglot.visit.ErrorHandlingVisitor

      `begin, catchErrors, enter, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystem`

    - ### Methods inherited from class polyglot.visit.HaltingVisitor

      `bypass, bypass, bypassChildren, override, visitChildren`

    - ### Methods inherited from class polyglot.visit.NodeVisitor

      `copy, enter, finish, finish, leave, override, toString, visitEdge, visitEdgeNoOverride`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### autil

          protected final DominationAnalysisUtil autil

    - #### postdoms

          protected final java.util.Map<polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator>,accrue.analysis.domination.ImmediatePostDominator> postdoms

  - ### Constructor Detail

    - #### PostDominatorDataFlow

          public PostDominatorDataFlow(polyglot.frontend.Job job,
                               polyglot.types.TypeSystem ts,
                               polyglot.ast.NodeFactory nf,
                               DominationAnalysisUtil autil)

  - ### Method Detail

    - #### createInitialItem

          protected accrue.analysis.domination.ImmediatePostDominator createInitialItem(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph,
                                                                            polyglot.ast.Term node,
                                                                            boolean entry)

      Create an initial Item for the dataflow analysis.
      Specified by:
        `createInitialItem` in class `polyglot.visit.DataFlow<accrue.analysis.domination.ImmediatePostDominator>`

    - #### performDataflow

          public void performDataflow(polyglot.ast.CodeNode cd)
                               throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### dataflow

          protected void dataflow(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)

      Overrides:
        `dataflow` in class `polyglot.visit.DataFlow<accrue.analysis.domination.ImmediatePostDominator>`

    - #### flow

          protected java.util.Map<polyglot.visit.FlowGraph.EdgeKey,accrue.analysis.domination.ImmediatePostDominator> flow(java.util.List<accrue.analysis.domination.ImmediatePostDominator> inItems,
                                                                                                               java.util.List<polyglot.visit.FlowGraph.EdgeKey> inItemKeys,
                                                                                                               polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph,
                                                                                                               polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> peer)

      Overrides:
        `flow` in class `polyglot.visit.DataFlow<accrue.analysis.domination.ImmediatePostDominator>`

    - #### check

          protected void check(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph,
                   polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> p)
                        throws polyglot.types.SemanticException

      Overrides:
        `check` in class `polyglot.visit.DataFlow<accrue.analysis.domination.ImmediatePostDominator>`
      Throws:
        `polyglot.types.SemanticException`

    - #### record

          protected void record(accrue.analysis.domination.ImmediatePostDominator ipd,
                    polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> p)

    - #### check

          protected void check(polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph,
                   polyglot.ast.Term n,
                   boolean entry,
                   accrue.analysis.domination.ImmediatePostDominator inItem,
                   java.util.Map<polyglot.visit.FlowGraph.EdgeKey,accrue.analysis.domination.ImmediatePostDominator> outItems)
                        throws polyglot.types.SemanticException

      Specified by:
        `check` in class `polyglot.visit.DataFlow<accrue.analysis.domination.ImmediatePostDominator>`
      Throws:
        `polyglot.types.SemanticException`

    - #### confluence

          protected accrue.analysis.domination.ImmediatePostDominator confluence(java.util.List<accrue.analysis.domination.ImmediatePostDominator> items,
                                                                     polyglot.visit.FlowGraph.Peer<accrue.analysis.domination.ImmediatePostDominator> peer,
                                                                     polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)

      Specified by:
        `confluence` in class `polyglot.visit.DataFlow<accrue.analysis.domination.ImmediatePostDominator>`

    - #### intersect

          protected accrue.analysis.domination.ImmediatePostDominator intersect(java.util.List<polyglot.visit.FlowGraph.Edge<accrue.analysis.domination.ImmediatePostDominator>> edges,
                                                                    polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)

      Find immediate postdominator for all edges in edges.

    - #### intersect

          protected accrue.analysis.domination.ImmediatePostDominator intersect(accrue.analysis.domination.ImmediatePostDominator a,
                                                                    accrue.analysis.domination.ImmediatePostDominator b)

    - #### ipd

          protected accrue.analysis.domination.ImmediatePostDominator ipd(polyglot.visit.FlowGraph.Edge<accrue.analysis.domination.ImmediatePostDominator> e,
                                                              polyglot.visit.FlowGraph<accrue.analysis.domination.ImmediatePostDominator> graph)