public class ExceptionAnalysis
extends java.lang.Object
ExceptionAnalysis2EdgeFilter to
remove infeasible edges.
In a first step an intraprocedural analysis is performed, to collect the thrown exceptions and collect the exceptions caught, per invoke instruction. The results of the intraprocedural analysis are used for a GenKill data flow analysis on the call graph. (Each node generates intraprocedural thrown exceptions and along invoke edges, caught exceptions are removed.)
Notice: Only exceptions, which are part of the analysis scope are considered.
| Constructor and Description |
|---|
ExceptionAnalysis(CallGraph callgraph,
PointerAnalysis<InstanceKey> pointerAnalysis,
ClassHierarchy cha) |
ExceptionAnalysis(CallGraph callgraph,
PointerAnalysis<InstanceKey> pointerAnalysis,
ClassHierarchy cha,
InterproceduralExceptionFilter<SSAInstruction> filter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
catchesException(CGNode node,
ISSABasicBlock throwBlock,
ISSABasicBlock catchBlock) |
java.util.Set<TypeReference> |
getCGNodeExceptions(CGNode node) |
java.util.Set<TypeReference> |
getExceptions(CGNode node,
SSAInstruction instruction)
Returns all exceptions, which may be raised by this instruction.
|
InterproceduralExceptionFilter<SSAInstruction> |
getFilter() |
boolean |
hasUncaughtExceptions(CGNode node,
ISSABasicBlock block) |
void |
solve() |
void |
solve(com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor) |
public ExceptionAnalysis(CallGraph callgraph, PointerAnalysis<InstanceKey> pointerAnalysis, ClassHierarchy cha)
public ExceptionAnalysis(CallGraph callgraph, PointerAnalysis<InstanceKey> pointerAnalysis, ClassHierarchy cha, InterproceduralExceptionFilter<SSAInstruction> filter)
filter - a filter to include results of other analysis (like ArrayOutOfBoundsAnalysis or IntraproceduralNullPointerAnalysis) or to ignore
exceptions completely.public void solve()
public void solve(com.ibm.wala.util.MonitorUtil.IProgressMonitor monitor)
throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionpublic boolean catchesException(CGNode node, ISSABasicBlock throwBlock, ISSABasicBlock catchBlock)
public boolean hasUncaughtExceptions(CGNode node, ISSABasicBlock block)
public java.util.Set<TypeReference> getExceptions(CGNode node, SSAInstruction instruction)
public java.util.Set<TypeReference> getCGNodeExceptions(CGNode node)
public InterproceduralExceptionFilter<SSAInstruction> getFilter()