public class ExceptionAnalysis extends 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.<[email protected]>
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) |
Set<TypeReference> |
getCGNodeExceptions(CGNode node) |
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.CancelException
public boolean catchesException(CGNode node, ISSABasicBlock throwBlock, ISSABasicBlock catchBlock)
public boolean hasUncaughtExceptions(CGNode node, ISSABasicBlock block)
public Set<TypeReference> getExceptions(CGNode node, SSAInstruction instruction)
public Set<TypeReference> getCGNodeExceptions(CGNode node)
public InterproceduralExceptionFilter<SSAInstruction> getFilter()
Copyright © 2019. All rights reserved.