Class BackwardsStmtGraph

All Implemented Interfaces:
Iterable

public class BackwardsStmtGraph extends ForwardingStmtGraph
Author:
Zun Wang
  • Constructor Details

    • BackwardsStmtGraph

      public BackwardsStmtGraph(@NonNull StmtGraph<?> stmtGraph)
  • Method Details

    • getStartingStmt

      public Stmt getStartingStmt()
      Overrides:
      getStartingStmt in class ForwardingStmtGraph
    • getStartingStmts

      public @NonNull List<Stmt> getStartingStmts()
    • getNodes

      public @NonNull Collection<Stmt> getNodes()
      Description copied from class: StmtGraph
      returns the nodes in this graph in a non-deterministic order (->Set) to get the nodes in linearized, ordered manner use iterator() or getStmts.
      Overrides:
      getNodes in class ForwardingStmtGraph
    • getBlocksSorted

      public @NonNull List<? extends BasicBlock<?>> getBlocksSorted()
      Overrides:
      getBlocksSorted in class ForwardingStmtGraph
    • predecessors

      public @NonNull List<Stmt> predecessors(@NonNull Stmt node)
      Description copied from class: StmtGraph
      returns the ingoing flows to node as an List with no reliable/specific order and possibly duplicate entries i.e. if a JSwitchStmt has multiple cases that brnach to `node`
      Overrides:
      predecessors in class ForwardingStmtGraph
    • successors

      public @NonNull List<Stmt> successors(@NonNull Stmt node)
      Description copied from class: StmtGraph
      returns the outgoing flows of node as ordered List. The List can have duplicate entries!
      Overrides:
      successors in class ForwardingStmtGraph
    • inDegree

      public int inDegree(@NonNull Stmt node)
      Description copied from class: StmtGraph
      returns the amount of ingoing flows into node
      Overrides:
      inDegree in class ForwardingStmtGraph
    • outDegree

      public int outDegree(@NonNull Stmt node)
      Description copied from class: StmtGraph
      returns the amount of flows that start from node
      Overrides:
      outDegree in class ForwardingStmtGraph
    • hasEdgeConnecting

      public boolean hasEdgeConnecting(@NonNull Stmt source, @NonNull Stmt target)
      Description copied from class: StmtGraph
      returns true if there is a flow between source and target throws an Exception if at least one of the parameters is not contained in the graph.
      Overrides:
      hasEdgeConnecting in class ForwardingStmtGraph