Class TypeQualifierDataflowAnalysis
java.lang.Object
edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<TypeQualifierValueSet>
edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<TypeQualifierValueSet>
edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowAnalysis
- All Implemented Interfaces:
DataflowAnalysis<TypeQualifierValueSet>
- Direct Known Subclasses:
BackwardTypeQualifierDataflowAnalysis, ForwardTypeQualifierDataflowAnalysis
public abstract class TypeQualifierDataflowAnalysis
extends AbstractDataflowAnalysis<TypeQualifierValueSet>
Abstract base class for type qualifier dataflow analyses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CFGprotected final org.apache.bcel.generic.ConstantPoolGen(package private) static final booleanprivate final Map<Location, Set<SourceSinkInfo>> protected final TypeQualifierValue<?> protected final ValueNumberDataflowprotected final XMethod -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeQualifierDataflowAnalysis(XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue<?> typeQualifierValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy(TypeQualifierValueSet source, TypeQualifierValueSet dest) Copy dataflow facts.Create empty (uninitialized) dataflow facts for one program point.voidedgeTransfer(Edge edge, TypeQualifierValueSet fact) Edge transfer function.getSourceSinkInfoSet(Location location) Get the set of SourceSinkInfo objects representing sources/sinks at a given Location.voidinitEntryFact(TypeQualifierValueSet result) Initialize the "entry" fact for the graph.booleanDetermine whether the given fact is valid (neither top nor bottom).(package private) static booleanbooleanisTop(TypeQualifierValueSet fact) Is the given fact the top value.voidMake given fact the top value.voidmeetInto(TypeQualifierValueSet fact, Edge edge, TypeQualifierValueSet result) Meet a dataflow fact associated with an incoming edge into another fact.(package private) static StringprimitiveType(String simpleClass) protected abstract voidpropagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN) protected voidregisterSourceSink(SourceSinkInfo sourceSinkInfo) abstract voidThis method must be called before the dataflow analysis is executed.booleansame(TypeQualifierValueSet fact1, TypeQualifierValueSet fact2) Are given dataflow facts the same?voidtransferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, TypeQualifierValueSet fact) Transfer function for a single instruction.Methods inherited from class AbstractDataflowAnalysis
getFactAfterLocation, getFactAtLocation, transferMethods inherited from class BasicAbstractDataflowAnalysis
factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIterationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataflowAnalysis
getBlockOrder, isForwards
-
Field Details
-
DEBUG_VERBOSE
static final boolean DEBUG_VERBOSE -
xmethod
-
cfg
-
vnaDataflow
-
typeQualifierValue
-
cpg
protected final org.apache.bcel.generic.ConstantPoolGen cpg -
sourceSinkMap
-
-
Constructor Details
-
TypeQualifierDataflowAnalysis
protected TypeQualifierDataflowAnalysis(XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue<?> typeQualifierValue) Constructor.- Parameters:
xmethod- XMethod object containing information about the method being analyzedcfg- the control-flow graph (CFG) of the method being analyzedvnaDataflow- ValueNumberDataflow for the methodcpg- the constant pool being built uptypeQualifierValue- the TypeQualifierValue we want the dataflow analysis to check
-
-
Method Details
-
primitiveType
-
isIdentifyFunctionForTypeQualifiers
-
initEntryFact
Description copied from interface:DataflowAnalysisInitialize the "entry" fact for the graph.- Throws:
DataflowAnalysisException
-
isFactValid
Description copied from class:AbstractDataflowAnalysisDetermine whether the given fact is valid (neither top nor bottom).- Specified by:
isFactValidin classAbstractDataflowAnalysis<TypeQualifierValueSet>
-
copy
Description copied from interface:DataflowAnalysisCopy dataflow facts. -
createFact
Description copied from interface:DataflowAnalysisCreate empty (uninitialized) dataflow facts for one program point. A valid value will be copied into it before it is used. -
isTop
Description copied from interface:DataflowAnalysisIs the given fact the top value. -
makeFactTop
Description copied from interface:DataflowAnalysisMake given fact the top value. -
meetInto
public void meetInto(TypeQualifierValueSet fact, Edge edge, TypeQualifierValueSet result) throws DataflowAnalysisException Description copied from interface:DataflowAnalysisMeet a dataflow fact associated with an incoming edge into another fact. This is used to determine the start fact for a basic block.- Parameters:
fact- the predecessor fact (incoming edge)edge- the edge from the predecessorresult- the result fact- Throws:
DataflowAnalysisException
-
same
Description copied from interface:DataflowAnalysisAre given dataflow facts the same? -
edgeTransfer
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 classBasicAbstractDataflowAnalysis<TypeQualifierValueSet>- Parameters:
edge- the Edgefact- a dataflow fact- Throws:
DataflowAnalysisException
-
propagateAcrossPhiNode
protected abstract void propagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN) -
registerSourceSinkLocations
This method must be called before the dataflow analysis is executed.- Throws:
DataflowAnalysisException
-
registerSourceSink
-
getSourceSinkInfoSet
Get the set of SourceSinkInfo objects representing sources/sinks at a given Location.- Parameters:
location- a Location- Returns:
- Set of SourceSinkInfo objects representing sources/sinks at the Location
-
transferInstruction
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, TypeQualifierValueSet fact) throws DataflowAnalysisException Description copied from class:AbstractDataflowAnalysisTransfer function for a single instruction.- Specified by:
transferInstructionin classAbstractDataflowAnalysis<TypeQualifierValueSet>- 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
-