Class CallGraphBasedAnalysis<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>>

  • Type Parameters:
    A - The abstract state of the analysis
    H - The heap domain
    V - The value domain
    All Implemented Interfaces:
    it.unive.lisa.interprocedural.InterproceduralAnalysis<A,​H,​V>
    Direct Known Subclasses:
    ContextBasedAnalysis

    public abstract class CallGraphBasedAnalysis<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>>
    extends java.lang.Object
    implements it.unive.lisa.interprocedural.InterproceduralAnalysis<A,​H,​V>
    An interprocedural analysis based on a call graph.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected it.unive.lisa.interprocedural.callgraph.CallGraph callgraph
      The call graph used to resolve method calls.
      protected it.unive.lisa.program.Program program
      The program.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(it.unive.lisa.program.Program program, it.unive.lisa.interprocedural.callgraph.CallGraph callgraph)  
      protected it.unive.lisa.analysis.AnalysisState<A,​H,​V> prepareEntryStateOfEntryPoint​(it.unive.lisa.analysis.AnalysisState<A,​H,​V> entryState, it.unive.lisa.program.cfg.CFG cfg)
      Prepare and entry state for the analysis of a method by renaming parameters.
      it.unive.lisa.program.cfg.statement.call.Call resolve​(it.unive.lisa.program.cfg.statement.call.UnresolvedCall unresolvedCall)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface it.unive.lisa.interprocedural.InterproceduralAnalysis

        fixpoint, getAbstractResultOf, getAnalysisResultsOf
    • Field Detail

      • callgraph

        protected it.unive.lisa.interprocedural.callgraph.CallGraph callgraph
        The call graph used to resolve method calls.
      • program

        protected it.unive.lisa.program.Program program
        The program.
    • Constructor Detail

      • CallGraphBasedAnalysis

        public CallGraphBasedAnalysis()
    • Method Detail

      • init

        public final void init​(it.unive.lisa.program.Program program,
                               it.unive.lisa.interprocedural.callgraph.CallGraph callgraph)
                        throws it.unive.lisa.interprocedural.InterproceduralAnalysisException
        Specified by:
        init in interface it.unive.lisa.interprocedural.InterproceduralAnalysis<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>>
        Throws:
        it.unive.lisa.interprocedural.InterproceduralAnalysisException
      • resolve

        public final it.unive.lisa.program.cfg.statement.call.Call resolve​(it.unive.lisa.program.cfg.statement.call.UnresolvedCall unresolvedCall)
                                                                    throws it.unive.lisa.interprocedural.callgraph.CallResolutionException
        Specified by:
        resolve in interface it.unive.lisa.interprocedural.InterproceduralAnalysis<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>>
        Throws:
        it.unive.lisa.interprocedural.callgraph.CallResolutionException
      • prepareEntryStateOfEntryPoint

        protected final it.unive.lisa.analysis.AnalysisState<A,​H,​V> prepareEntryStateOfEntryPoint​(it.unive.lisa.analysis.AnalysisState<A,​H,​V> entryState,
                                                                                                              it.unive.lisa.program.cfg.CFG cfg)
                                                                                                       throws it.unive.lisa.analysis.SemanticException
        Prepare and entry state for the analysis of a method by renaming parameters.
        Parameters:
        entryState - the initial entry state
        cfg - the CFG of the method
        Returns:
        the entry state with the right parameter binding
        Throws:
        it.unive.lisa.analysis.SemanticException - if the analysis fails