Package edu.umd.cs.findbugs.ba.jsr305
Class ForwardTypeQualifierDataflowAnalysis
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<Fact>
-
- edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<TypeQualifierValueSet>
-
- edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
-
- edu.umd.cs.findbugs.ba.jsr305.ForwardTypeQualifierDataflowAnalysis
-
- All Implemented Interfaces:
DataflowAnalysis<TypeQualifierValueSet>
public class ForwardTypeQualifierDataflowAnalysis extends TypeQualifierDataflowAnalysis
Forward type qualifier dataflow analysis.
-
-
Field Summary
Fields Modifier and Type Field Description private DepthFirstSearch
dfs
-
Fields inherited from class edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
cfg, cpg, DEBUG_VERBOSE, typeQualifierValue, vnaDataflow, xmethod
-
-
Constructor Summary
Constructors Constructor Description ForwardTypeQualifierDataflowAnalysis(DepthFirstSearch dfs, XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue<?> typeQualifierValue)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockOrder
getBlockOrder(CFG cfg1)
Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.boolean
isForwards()
Returns true if the analysis is forwards, false if backwards.protected void
propagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN)
private void
registerConstantPushSource(Location location)
private void
registerConstantSource(Location location, java.lang.Object constantValue)
private void
registerFieldLoadSource(Location location)
private void
registerInstructionSources()
private void
registerLDC2ValueSource(Location location)
private void
registerLDCValueSource(Location location)
private void
registerOtherSource(Location location)
private void
registerParameterSources()
private void
registerPushNullSource(Location location)
private void
registerReturnValueSource(Location location)
void
registerSourceSinkLocations()
This method must be called before the dataflow analysis is executed.private void
registerTopOfStackSource(SourceSinkType sourceSinkType, Location location, javax.annotation.meta.When when, boolean interproc, java.lang.Object constantValue)
-
Methods inherited from class edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
copy, createFact, edgeTransfer, getSourceSinkInfoSet, initEntryFact, isFactValid, isIdentifyFunctionForTypeQualifiers, isTop, makeFactTop, meetInto, primitiveType, registerSourceSink, same, transferInstruction
-
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis
getFactAfterLocation, getFactAtLocation, transfer
-
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis
factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
-
-
-
-
Field Detail
-
dfs
private final DepthFirstSearch dfs
-
-
Constructor Detail
-
ForwardTypeQualifierDataflowAnalysis
public ForwardTypeQualifierDataflowAnalysis(DepthFirstSearch dfs, XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue<?> typeQualifierValue)
Constructor.- Parameters:
dfs
- DepthFirstSearch on the analyzed methodxmethod
- XMethod for the analyzed methodcfg
- CFG of the analyzed methodvnaDataflow
- ValueNumberDataflow on the analyzed methodcpg
- ConstantPoolGen of the analyzed methodtypeQualifierValue
- TypeQualifierValue representing type qualifier the analysis should check
-
-
Method Detail
-
getBlockOrder
public BlockOrder getBlockOrder(CFG cfg1)
Description copied from interface:DataflowAnalysis
Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.- Parameters:
cfg1
- the CFG upon which we're performing dataflow analysis
-
isForwards
public boolean isForwards()
Description copied from interface:DataflowAnalysis
Returns true if the analysis is forwards, false if backwards.
-
registerSourceSinkLocations
public void registerSourceSinkLocations() throws DataflowAnalysisException
Description copied from class:TypeQualifierDataflowAnalysis
This method must be called before the dataflow analysis is executed.- Specified by:
registerSourceSinkLocations
in classTypeQualifierDataflowAnalysis
- Throws:
DataflowAnalysisException
-
registerInstructionSources
private void registerInstructionSources() throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerLDCValueSource
private void registerLDCValueSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerLDC2ValueSource
private void registerLDC2ValueSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerPushNullSource
private void registerPushNullSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerConstantSource
private void registerConstantSource(Location location, @CheckForNull java.lang.Object constantValue) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerOtherSource
private void registerOtherSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerConstantPushSource
private void registerConstantPushSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerReturnValueSource
private void registerReturnValueSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerFieldLoadSource
private void registerFieldLoadSource(Location location) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerTopOfStackSource
private void registerTopOfStackSource(SourceSinkType sourceSinkType, Location location, javax.annotation.meta.When when, boolean interproc, @CheckForNull java.lang.Object constantValue) throws DataflowAnalysisException
- Throws:
DataflowAnalysisException
-
registerParameterSources
private void registerParameterSources()
-
propagateAcrossPhiNode
protected void propagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN)
- Specified by:
propagateAcrossPhiNode
in classTypeQualifierDataflowAnalysis
-
-