public abstract class TypeQualifierDataflowAnalysis extends AbstractDataflowAnalysis<TypeQualifierValueSet>
Modifier and Type | Field and Description |
---|---|
protected CFG |
cfg |
protected org.apache.bcel.generic.ConstantPoolGen |
cpg |
protected TypeQualifierValue<?> |
typeQualifierValue |
protected ValueNumberDataflow |
vnaDataflow |
protected XMethod |
xmethod |
Constructor and Description |
---|
TypeQualifierDataflowAnalysis(XMethod xmethod,
CFG cfg,
ValueNumberDataflow vnaDataflow,
org.apache.bcel.generic.ConstantPoolGen cpg,
TypeQualifierValue<?> typeQualifierValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(TypeQualifierValueSet source,
TypeQualifierValueSet dest)
Copy dataflow facts.
|
TypeQualifierValueSet |
createFact()
Create empty (uninitialized) dataflow facts for one program point.
|
void |
edgeTransfer(Edge edge,
TypeQualifierValueSet fact)
Edge transfer function.
|
java.util.Set<SourceSinkInfo> |
getSourceSinkInfoSet(Location location)
Get the set of SourceSinkInfo objects representing sources/sinks at a
given Location.
|
void |
initEntryFact(TypeQualifierValueSet result)
Initialize the "entry" fact for the graph.
|
boolean |
isFactValid(TypeQualifierValueSet fact)
Determine whether the given fact is valid (neither top nor
bottom).
|
boolean |
isTop(TypeQualifierValueSet fact)
Is the given fact the top value.
|
void |
makeFactTop(TypeQualifierValueSet fact)
Make given fact the top value.
|
void |
meetInto(TypeQualifierValueSet fact,
Edge edge,
TypeQualifierValueSet result)
Meet a dataflow fact associated with an incoming edge into another fact.
|
protected abstract void |
propagateAcrossPhiNode(TypeQualifierValueSet fact,
ValueNumber sourceVN,
ValueNumber targetVN) |
protected void |
registerSourceSink(SourceSinkInfo sourceSinkInfo) |
abstract void |
registerSourceSinkLocations()
This method must be called before the dataflow analysis is executed.
|
boolean |
same(TypeQualifierValueSet fact1,
TypeQualifierValueSet fact2)
Are given dataflow facts the same?
|
void |
transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
TypeQualifierValueSet fact)
Transfer function for a single instruction.
|
getFactAfterLocation, getFactAtLocation, transfer
factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBlockOrder, isForwards
protected final XMethod xmethod
protected final CFG cfg
protected final ValueNumberDataflow vnaDataflow
protected final TypeQualifierValue<?> typeQualifierValue
protected final org.apache.bcel.generic.ConstantPoolGen cpg
public TypeQualifierDataflowAnalysis(XMethod xmethod, CFG cfg, ValueNumberDataflow vnaDataflow, org.apache.bcel.generic.ConstantPoolGen cpg, TypeQualifierValue<?> typeQualifierValue)
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 checkpublic void initEntryFact(TypeQualifierValueSet result) throws DataflowAnalysisException
DataflowAnalysis
DataflowAnalysisException
public boolean isFactValid(TypeQualifierValueSet fact)
AbstractDataflowAnalysis
isFactValid
in class AbstractDataflowAnalysis<TypeQualifierValueSet>
public void copy(TypeQualifierValueSet source, TypeQualifierValueSet dest)
DataflowAnalysis
public TypeQualifierValueSet createFact()
DataflowAnalysis
public boolean isTop(TypeQualifierValueSet fact)
DataflowAnalysis
public void makeFactTop(TypeQualifierValueSet fact)
DataflowAnalysis
public void meetInto(TypeQualifierValueSet fact, Edge edge, TypeQualifierValueSet result) throws DataflowAnalysisException
DataflowAnalysis
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result factDataflowAnalysisException
public boolean same(TypeQualifierValueSet fact1, TypeQualifierValueSet fact2)
DataflowAnalysis
public void edgeTransfer(Edge edge, TypeQualifierValueSet fact) throws DataflowAnalysisException
DataflowAnalysis
A do-nothing implementation is legal, and appropriate for analyses where branches are not significant.
edgeTransfer
in interface DataflowAnalysis<TypeQualifierValueSet>
edgeTransfer
in class BasicAbstractDataflowAnalysis<TypeQualifierValueSet>
edge
- the Edgefact
- a dataflow factDataflowAnalysisException
protected abstract void propagateAcrossPhiNode(TypeQualifierValueSet fact, ValueNumber sourceVN, ValueNumber targetVN)
public abstract void registerSourceSinkLocations() throws DataflowAnalysisException
DataflowAnalysisException
protected void registerSourceSink(SourceSinkInfo sourceSinkInfo)
public java.util.Set<SourceSinkInfo> getSourceSinkInfoSet(Location location)
location
- a Locationpublic void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, TypeQualifierValueSet fact) throws DataflowAnalysisException
AbstractDataflowAnalysis
transferInstruction
in class AbstractDataflowAnalysis<TypeQualifierValueSet>
handle
- the instructionbasicBlock
- the BasicBlock containing the instruction; needed to
disambiguate instructions in inlined JSR subroutinesfact
- which should be modified based on the instructionDataflowAnalysisException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.