Package edu.umd.cs.findbugs.ba.jsr305
Class BackwardTypeQualifierDataflowAnalysis
- 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.BackwardTypeQualifierDataflowAnalysis
-
- All Implemented Interfaces:
DataflowAnalysis<TypeQualifierValueSet>
public class BackwardTypeQualifierDataflowAnalysis extends TypeQualifierDataflowAnalysis
Backwards type qualifier dataflow analysis.- Author:
- David Hovemeyer
-
-
Field Summary
-
Fields inherited from class edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
cfg, cpg, typeQualifierValue, vnaDataflow, xmethod
-
-
Constructor Summary
Constructors Constructor Description BackwardTypeQualifierDataflowAnalysis(DepthFirstSearch dfs, ReverseDepthFirstSearch rdfs, 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 voidedgeTransfer(Edge edge, TypeQualifierValueSet fact)Edge transfer function.BlockOrdergetBlockOrder(CFG cfg1)Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.booleanisForwards()Returns true if the analysis is forwards, false if backwards.protected voidpropagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN)voidregisterSourceSinkLocations()This method must be called before the dataflow analysis is executed.voidsetForwardTypeQualifierDataflow(ForwardTypeQualifierDataflow forwardTypeQualifierDataflow)voidtransferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, TypeQualifierValueSet fact)Transfer function for a single instruction.-
Methods inherited from class edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
copy, createFact, getSourceSinkInfoSet, initEntryFact, isFactValid, isTop, makeFactTop, meetInto, registerSourceSink, same
-
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
-
-
-
-
Constructor Detail
-
BackwardTypeQualifierDataflowAnalysis
public BackwardTypeQualifierDataflowAnalysis(DepthFirstSearch dfs, ReverseDepthFirstSearch rdfs, XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue<?> typeQualifierValue)
Constructor.- Parameters:
dfs- DepthFirstSearch on the analyzed methodrdfs- ReverseDepthFirstSearch 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
-
setForwardTypeQualifierDataflow
public void setForwardTypeQualifierDataflow(ForwardTypeQualifierDataflow forwardTypeQualifierDataflow)
- Parameters:
forwardTypeQualifierDataflow- The forwardTypeQualifierDataflow to set.
-
edgeTransfer
public void edgeTransfer(Edge edge, TypeQualifierValueSet fact) throws DataflowAnalysisException
Description copied from interface:DataflowAnalysisEdge transfer function. Modify the given fact that is true on the (logical) edge source to modify it so that it is true at the (logical) edge target.A do-nothing implementation is legal, and appropriate for analyses where branches are not significant.
- Specified by:
edgeTransferin interfaceDataflowAnalysis<TypeQualifierValueSet>- Overrides:
edgeTransferin classTypeQualifierDataflowAnalysis- Parameters:
edge- the Edgefact- a dataflow fact- Throws:
DataflowAnalysisException
-
transferInstruction
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, TypeQualifierValueSet fact) throws DataflowAnalysisExceptionDescription copied from class:AbstractDataflowAnalysisTransfer function for a single instruction.- Overrides:
transferInstructionin classTypeQualifierDataflowAnalysis- Parameters:
handle- the instructionbasicBlock- the BasicBlock containing the instruction; needed to disambiguate instructions in inlined JSR subroutinesfact- which should be modified based on the instruction- Throws:
DataflowAnalysisException
-
getBlockOrder
public BlockOrder getBlockOrder(CFG cfg1)
Description copied from interface:DataflowAnalysisReturn 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:DataflowAnalysisReturns true if the analysis is forwards, false if backwards.
-
registerSourceSinkLocations
public void registerSourceSinkLocations() throws DataflowAnalysisExceptionDescription copied from class:TypeQualifierDataflowAnalysisThis method must be called before the dataflow analysis is executed.- Specified by:
registerSourceSinkLocationsin classTypeQualifierDataflowAnalysis- Throws:
DataflowAnalysisException
-
propagateAcrossPhiNode
protected void propagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN)
- Specified by:
propagateAcrossPhiNodein classTypeQualifierDataflowAnalysis
-
-