Class FlowGraphBuilder

  • Direct Known Subclasses:
    FilteredFlowGraphBuilder

    public class FlowGraphBuilder
    extends java.lang.Object
    Class for building intra-procedural flow graphs for a given class hierarchy.
    • Constructor Summary

      Constructors 
      Constructor Description
      FlowGraphBuilder​(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache, boolean supportPointerAnalysis)  
    • Constructor Detail

      • FlowGraphBuilder

        public FlowGraphBuilder​(com.ibm.wala.ipa.cha.IClassHierarchy cha,
                                com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache,
                                boolean supportPointerAnalysis)
    • Method Detail

      • buildFlowGraph

        public FlowGraph buildFlowGraph()
        This is the main entry point of the flow graph builder.

        It creates a new, empty flow graph, adds nodes for a small number of special primitive functions such as Object and Function and sets up flow edges to make them flow into the corresponding global variables. Then it iterates over all functions in the class hierarchy and all their IR instructions, and adds the flow edges induced by these instructions.

        Returns:
        the completed flow graph
      • visitProgram

        public void visitProgram​(FlowGraph flowgraph)
      • visitFunction

        public void visitFunction​(FlowGraph flowgraph,
                                  com.ibm.wala.classLoader.IMethod method)