Class FieldBasedCallGraphBuilder

    • Constructor Summary

      Constructors 
      Constructor Description
      FieldBasedCallGraphBuilder​(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.ipa.callgraph.AnalysisOptions options, com.ibm.wala.ipa.callgraph.IAnalysisCacheView iAnalysisCacheView, boolean supportFullPointerAnalysis)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addEdgeToJSCallGraph​(JSCallGraph cg, com.ibm.wala.classLoader.CallSiteReference site, com.ibm.wala.classLoader.IMethod target, com.ibm.wala.ipa.callgraph.CGNode caller)  
      FieldBasedCallGraphBuilder.CallGraphResult buildCallGraph​(java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> eps, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
      Main entry point: builds a flow graph, then extracts a call graph and returns it.
      abstract FlowGraph buildFlowGraph​(com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
      Build a flow graph for the program to be analysed.
      JSCallGraph extract​(FlowGraph flowgraph, java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> eps, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
      Extract a call graph from a given flow graph.
      JSCallGraph extract​(com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter interpreter, FlowGraph flowgraph, java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> eps, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)  
      java.util.Set<com.ibm.wala.util.collections.Pair<CallVertex,​FuncVertex>> extractCallGraphEdges​(FlowGraph flowgraph, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
      Extract call edges from the flow graph into high-level representation.
      protected FlowGraph flowGraphFactory()  
      boolean handleFunctionCallOrApplyInvocation​(FlowGraph flowgraph, com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor, JSCallGraph cg, CallVertex callVertex, com.ibm.wala.ipa.callgraph.CGNode caller, com.ibm.wala.classLoader.CallSiteReference site, com.ibm.wala.classLoader.IMethod target)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cha

        protected final com.ibm.wala.ipa.cha.IClassHierarchy cha
      • options

        protected final com.ibm.wala.ipa.callgraph.AnalysisOptions options
      • cache

        protected final com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache
      • targetSelector

        public final com.ibm.wala.ipa.callgraph.MethodTargetSelector targetSelector
      • supportFullPointerAnalysis

        protected final boolean supportFullPointerAnalysis
    • Constructor Detail

      • FieldBasedCallGraphBuilder

        public FieldBasedCallGraphBuilder​(com.ibm.wala.ipa.cha.IClassHierarchy cha,
                                          com.ibm.wala.ipa.callgraph.AnalysisOptions options,
                                          com.ibm.wala.ipa.callgraph.IAnalysisCacheView iAnalysisCacheView,
                                          boolean supportFullPointerAnalysis)
    • Method Detail

      • flowGraphFactory

        protected FlowGraph flowGraphFactory()
      • buildFlowGraph

        public abstract FlowGraph buildFlowGraph​(com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                                          throws com.ibm.wala.util.CancelException
        Build a flow graph for the program to be analysed.
        Throws:
        com.ibm.wala.util.CancelException
      • buildCallGraph

        public FieldBasedCallGraphBuilder.CallGraphResult buildCallGraph​(java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> eps,
                                                                         com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                                                                  throws com.ibm.wala.util.CancelException
        Main entry point: builds a flow graph, then extracts a call graph and returns it.
        Throws:
        com.ibm.wala.util.CancelException
      • extract

        public JSCallGraph extract​(FlowGraph flowgraph,
                                   java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> eps,
                                   com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                            throws com.ibm.wala.util.CancelException
        Extract a call graph from a given flow graph.
        Throws:
        com.ibm.wala.util.CancelException
      • extract

        public JSCallGraph extract​(com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter interpreter,
                                   FlowGraph flowgraph,
                                   java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> eps,
                                   com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                            throws com.ibm.wala.util.CancelException
        Throws:
        com.ibm.wala.util.CancelException
      • handleFunctionCallOrApplyInvocation

        public boolean handleFunctionCallOrApplyInvocation​(FlowGraph flowgraph,
                                                           com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor,
                                                           JSCallGraph cg,
                                                           CallVertex callVertex,
                                                           com.ibm.wala.ipa.callgraph.CGNode caller,
                                                           com.ibm.wala.classLoader.CallSiteReference site,
                                                           com.ibm.wala.classLoader.IMethod target)
                                                    throws com.ibm.wala.util.CancelException
        Throws:
        com.ibm.wala.util.CancelException
      • addEdgeToJSCallGraph

        public boolean addEdgeToJSCallGraph​(JSCallGraph cg,
                                            com.ibm.wala.classLoader.CallSiteReference site,
                                            com.ibm.wala.classLoader.IMethod target,
                                            com.ibm.wala.ipa.callgraph.CGNode caller)
                                     throws com.ibm.wala.util.CancelException
        Throws:
        com.ibm.wala.util.CancelException
      • extractCallGraphEdges

        public java.util.Set<com.ibm.wala.util.collections.Pair<CallVertex,​FuncVertex>> extractCallGraphEdges​(FlowGraph flowgraph,
                                                                                                                    com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
                                                                                                             throws com.ibm.wala.util.CancelException
        Extract call edges from the flow graph into high-level representation.
        Throws:
        com.ibm.wala.util.CancelException