Interface NodeResult<Node,Fact>

Type Parameters:
Node - type of graph nodes
Fact - type of data-flow facts
All Superinterfaces:
StmtResult<Fact>
All Known Implementing Classes:
DataflowResult

public interface NodeResult<Node,Fact> extends StmtResult<Fact>
An interface for querying data-flow results.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    default Fact
    NodeResult is designed to be compatible with CFGs of both stmt nodes and block nodes.
    default boolean
    Typically, all stmts are relevant in NodeResult.
  • Method Details

    • getInFact

      Fact getInFact(Node node)
      Returns:
      the flowing-in fact of given node.
    • getOutFact

      Fact getOutFact(Node node)
      Returns:
      the flowing-out fact of given node.
    • isRelevant

      default boolean isRelevant(Stmt stmt)
      Typically, all stmts are relevant in NodeResult.
      Specified by:
      isRelevant in interface StmtResult<Node>
      Returns:
      true.
    • getResult

      default Fact getResult(Stmt stmt)
      NodeResult is designed to be compatible with CFGs of both stmt nodes and block nodes. When the node result instance represent results of stmt nodes, it can be used as a StmtResult.
      Specified by:
      getResult in interface StmtResult<Node>
      Returns:
      out fact as the analysis result for given stmt.