Class CallGraphBasedAnalysis<A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>
- java.lang.Object
-
- it.unive.lisa.interprocedural.impl.CallGraphBasedAnalysis<A,H,V>
-
- Type Parameters:
A- The abstract state of the analysisH- The heap domainV- The value domain
- All Implemented Interfaces:
InterproceduralAnalysis<A,H,V>
- Direct Known Subclasses:
ContextBasedAnalysis
public abstract class CallGraphBasedAnalysis<A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> extends java.lang.Object implements InterproceduralAnalysis<A,H,V>
An interprocedural analysis based on a call graph.
-
-
Constructor Summary
Constructors Constructor Description CallGraphBasedAnalysis()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(Program program, CallGraph callgraph)Initializes the interprocedural analysis of the given program.protected AnalysisState<A,H,V>prepareEntryStateOfEntryPoint(AnalysisState<A,H,V> entryState, CFG cfg)Prepare and entry state for the analysis of a method by renaming parameters.Callresolve(UnresolvedCall unresolvedCall)Yields aCallimplementation that corresponds to the resolution of the givenUnresolvedCall.-
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
-
-
-
-
Method Detail
-
init
public final void init(Program program, CallGraph callgraph) throws InterproceduralAnalysisException
Description copied from interface:InterproceduralAnalysisInitializes the interprocedural analysis of the given program.- Specified by:
initin interfaceInterproceduralAnalysis<A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>- Parameters:
program- the programcallgraph- the callgraph used to resolve method calls- Throws:
InterproceduralAnalysisException- if an exception happens while performing the interprocedural analysis
-
resolve
public final Call resolve(UnresolvedCall unresolvedCall) throws CallResolutionException
Description copied from interface:InterproceduralAnalysisYields aCallimplementation that corresponds to the resolution of the givenUnresolvedCall. This method will return:- a
CFGCall, if at least oneCFGthat matchesUnresolvedCall.getTargetName()is found. The returnedCFGCallwill be linked to all the possible runtime targets matchingUnresolvedCall.getTargetName(); - an
OpenCall, if noCFGmatchingUnresolvedCall.getTargetName()is found.
- Specified by:
resolvein interfaceInterproceduralAnalysis<A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>- Parameters:
unresolvedCall- the call to resolve- Returns:
- a collection of all the possible runtime targets
- Throws:
CallResolutionException- if this analysis is unable to resolve the given call
- a
-
prepareEntryStateOfEntryPoint
protected final AnalysisState<A,H,V> prepareEntryStateOfEntryPoint(AnalysisState<A,H,V> entryState, CFG cfg) throws SemanticException
Prepare and entry state for the analysis of a method by renaming parameters.- Parameters:
entryState- the initial entry statecfg- the CFG of the method- Returns:
- the entry state with the right parameter binding
- Throws:
SemanticException- if the analysis fails
-
-