public class SSACFGNullPointerAnalysis extends Object implements ExceptionPruningAnalysis<SSAInstruction,ISSABasicBlock>
Constructor and Description |
---|
SSACFGNullPointerAnalysis(TypeReference[] ignoredExceptions,
IR ir,
ParameterState paramState,
MethodState mState) |
Modifier and Type | Method and Description |
---|---|
int |
compute(MonitorUtil.IProgressMonitor progress)
Computes impossible control flow that is due to exceptions that definitely
will not appear or that will always be thrown.
|
ControlFlowGraph<SSAInstruction,ISSABasicBlock> |
getCFG()
Returns the result of the analysis: A control flow graph where impossible
control flow has been removed.
|
NullPointerState |
getState(ISSABasicBlock bb)
Returns the state of a node.
|
boolean |
hasExceptions()
Returns true if the corresponding method contains instructions that may
throw an exception which is not caught in the same method.
|
public SSACFGNullPointerAnalysis(TypeReference[] ignoredExceptions, IR ir, ParameterState paramState, MethodState mState)
public int compute(MonitorUtil.IProgressMonitor progress) throws GraphIntegrity.UnsoundGraphException, CancelException
ExceptionPruningAnalysis
compute
in interface ExceptionPruningAnalysis<SSAInstruction,ISSABasicBlock>
progress
- A progress monitor that is used to display the progress of the
analysis. It can also be used to detect a cancel request from the
user. The common behavior is to cancel the method if
progress.isCanceled() is true by throwing a CancelException.GraphIntegrity.UnsoundGraphException
- Thrown if the original CFG contains inconsistencies.CancelException
- Thrown if the user requested cancellation through the progress
monitor.public ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG()
ExceptionPruningAnalysis
getCFG
in interface ExceptionPruningAnalysis<SSAInstruction,ISSABasicBlock>
public boolean hasExceptions()
ExceptionPruningAnalysis
hasExceptions
in interface ExceptionPruningAnalysis<SSAInstruction,ISSABasicBlock>
public NullPointerState getState(ISSABasicBlock bb)
ExceptionPruningAnalysis
getState
in interface ExceptionPruningAnalysis<SSAInstruction,ISSABasicBlock>
bb
- Node