Class FlowGraph

  • All Implemented Interfaces:
    java.lang.Iterable<Vertex>

    public class FlowGraph
    extends java.lang.Object
    implements java.lang.Iterable<Vertex>
    A flow graph models data flow between vertices representing local variables, properties, return values, and so forth.
    • Constructor Summary

      Constructors 
      Constructor Description
      FlowGraph()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addEdge​(Vertex from, Vertex to)
      Adds an edge from vertex from to vertex to, adding the vertices to the graph if they are not in there yet.
      com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis<ObjectVertex> getPointerAnalysis​(com.ibm.wala.ipa.callgraph.CallGraph cg, com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)  
      com.ibm.wala.util.intset.OrdinalSet<FuncVertex> getReachingSet​(Vertex dest, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
      Computes the set of vertices that may reach dest along paths not containing an UnknownVertex.
      java.util.Iterator<Vertex> getSucc​(Vertex v)  
      VertexFactory getVertexFactory()  
      java.util.Iterator<Vertex> iterator()  
      java.lang.String toJSON()
      Converts flow graph to a JSON representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • FlowGraph

        public FlowGraph()
    • Method Detail

      • addEdge

        public void addEdge​(Vertex from,
                            Vertex to)
        Adds an edge from vertex from to vertex to, adding the vertices to the graph if they are not in there yet.
      • getReachingSet

        public com.ibm.wala.util.intset.OrdinalSet<FuncVertex> getReachingSet​(Vertex dest,
                                                                              com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                                                                       throws com.ibm.wala.util.CancelException
        Computes the set of vertices that may reach dest along paths not containing an UnknownVertex.
        Throws:
        com.ibm.wala.util.CancelException
      • getSucc

        public java.util.Iterator<Vertex> getSucc​(Vertex v)
      • iterator

        public java.util.Iterator<Vertex> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Vertex>
      • getPointerAnalysis

        public com.ibm.wala.ipa.callgraph.propagation.PointerAnalysis<ObjectVertex> getPointerAnalysis​(com.ibm.wala.ipa.callgraph.CallGraph cg,
                                                                                                       com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache,
                                                                                                       com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                                                                                                throws com.ibm.wala.util.CancelException
        Throws:
        com.ibm.wala.util.CancelException
      • toJSON

        public java.lang.String toJSON()
        Converts flow graph to a JSON representation. Keys of the JSON object are vertices, with each vertex mapped to its successors. Vertices are serialized using their Vertex.toSourceLevelString(IAnalysisCacheView) method to include information about source-level variables whenever possible.