Package it.unive.lisa.interprocedural
Class CallGraphBasedAnalysis<A extends it.unive.lisa.analysis.AbstractState<A>>
- java.lang.Object
-
- it.unive.lisa.interprocedural.CallGraphBasedAnalysis<A>
-
- Type Parameters:
A
- TheAbstractState
of the analysis
- All Implemented Interfaces:
it.unive.lisa.interprocedural.InterproceduralAnalysis<A>
- Direct Known Subclasses:
ContextBasedAnalysis
public abstract class CallGraphBasedAnalysis<A extends it.unive.lisa.analysis.AbstractState<A>> extends java.lang.Object implements it.unive.lisa.interprocedural.InterproceduralAnalysis<A>
An interprocedural analysis based on a call graph.
-
-
Field Summary
Fields Modifier and Type Field Description protected it.unive.lisa.program.Application
app
The application.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.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CallGraphBasedAnalysis()
Builds the analysis.protected
CallGraphBasedAnalysis(CallGraphBasedAnalysis<A> other)
Builds the analysis by copying the given one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description it.unive.lisa.analysis.AnalysisState<A>
getAbstractResultOf(it.unive.lisa.program.cfg.statement.call.OpenCall call, it.unive.lisa.analysis.AnalysisState<A> entryState, it.unive.lisa.analysis.lattices.ExpressionSet[] parameters, it.unive.lisa.analysis.StatementStore<A> expressions)
void
init(it.unive.lisa.program.Application app, it.unive.lisa.interprocedural.callgraph.CallGraph callgraph, it.unive.lisa.interprocedural.OpenCallPolicy policy)
boolean
needsCallGraph()
it.unive.lisa.analysis.AnalysisState<A>
prepareEntryStateOfEntryPoint(it.unive.lisa.analysis.AnalysisState<A> 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 call, java.util.Set<it.unive.lisa.type.Type>[] types, it.unive.lisa.analysis.symbols.SymbolAliasing aliasing)
-
-
-
Field Detail
-
callgraph
protected it.unive.lisa.interprocedural.callgraph.CallGraph callgraph
The call graph used to resolve method calls.
-
app
protected it.unive.lisa.program.Application app
The application.
-
policy
protected it.unive.lisa.interprocedural.OpenCallPolicy policy
The policy to evaluate results of open calls.
-
-
Constructor Detail
-
CallGraphBasedAnalysis
protected CallGraphBasedAnalysis()
Builds the analysis.
-
CallGraphBasedAnalysis
protected CallGraphBasedAnalysis(CallGraphBasedAnalysis<A> other)
Builds the analysis by copying the given one.- Parameters:
other
- the original analysis to copy
-
-
Method Detail
-
needsCallGraph
public boolean needsCallGraph()
-
init
public void init(it.unive.lisa.program.Application app, it.unive.lisa.interprocedural.callgraph.CallGraph callgraph, it.unive.lisa.interprocedural.OpenCallPolicy policy) 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 call, java.util.Set<it.unive.lisa.type.Type>[] types, it.unive.lisa.analysis.symbols.SymbolAliasing aliasing) throws it.unive.lisa.interprocedural.callgraph.CallResolutionException
-
prepareEntryStateOfEntryPoint
public it.unive.lisa.analysis.AnalysisState<A> prepareEntryStateOfEntryPoint(it.unive.lisa.analysis.AnalysisState<A> 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 statecfg
- 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> getAbstractResultOf(it.unive.lisa.program.cfg.statement.call.OpenCall call, it.unive.lisa.analysis.AnalysisState<A> entryState, it.unive.lisa.analysis.lattices.ExpressionSet[] parameters, it.unive.lisa.analysis.StatementStore<A> expressions) throws it.unive.lisa.analysis.SemanticException
-
-