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.interprocedural.OpenCallPolicy policy
      The policy to evaluate results of open calls.
      protected it.unive.lisa.program.Program program
      The program.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      it.unive.lisa.analysis.AnalysisState<A,​H,​V> getAbstractResultOf​(it.unive.lisa.program.cfg.statement.call.OpenCall call, it.unive.lisa.analysis.AnalysisState<A,​H,​V> entryState, it.unive.lisa.analysis.lattices.ExpressionSet<it.unive.lisa.symbolic.SymbolicExpression>[] parameters)  
      void init​(it.unive.lisa.program.Program program, it.unive.lisa.interprocedural.callgraph.CallGraph callgraph, it.unive.lisa.interprocedural.OpenCallPolicy policy)  
      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.
      • policy

        protected it.unive.lisa.interprocedural.OpenCallPolicy policy
        The policy to evaluate results of open calls.
    • Constructor Detail

      • CallGraphBasedAnalysis

        public CallGraphBasedAnalysis()
    • Method Detail

      • init

        public void init​(it.unive.lisa.program.Program program,
                         it.unive.lisa.interprocedural.callgraph.CallGraph callgraph,
                         it.unive.lisa.interprocedural.OpenCallPolicy policy)
                  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 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 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
      • getAbstractResultOf

        public it.unive.lisa.analysis.AnalysisState<A,​H,​V> getAbstractResultOf​(it.unive.lisa.program.cfg.statement.call.OpenCall call,
                                                                                           it.unive.lisa.analysis.AnalysisState<A,​H,​V> entryState,
                                                                                           it.unive.lisa.analysis.lattices.ExpressionSet<it.unive.lisa.symbolic.SymbolicExpression>[] parameters)
                                                                                    throws it.unive.lisa.analysis.SemanticException
        Specified by:
        getAbstractResultOf 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.analysis.SemanticException