|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<Fact>
edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis<Fact>
edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis<FrameType>
edu.umd.cs.findbugs.ba.FrameDataflowAnalysis<ValueNumber,ValueNumberFrame>
edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysis
public class ValueNumberAnalysis
A dataflow analysis to track the production and flow of values in the Java
stack frame. See the ValueNumber
class for an explanation
of what the value numbers mean, and when they can be compared.
This class is still experimental.
ValueNumber
,
DominatorsAnalysis
Field Summary | |
---|---|
static boolean |
DEBUG
|
Constructor Summary | |
---|---|
ValueNumberAnalysis(org.apache.bcel.generic.MethodGen methodGen,
DepthFirstSearch dfs,
LoadedFieldSet loadedFieldSet,
RepositoryLookupFailureCallback lookupFailureCallback)
|
Method Summary | |
---|---|
void |
compactValueNumbers(Dataflow<ValueNumberFrame,ValueNumberAnalysis> dataflow)
Deprecated. |
ValueNumberFrame |
createFact()
Create empty (uninitialized) dataflow facts for one program point. |
java.util.Iterator<ValueNumberFrame> |
factIterator()
Get an Iterator over all dataflow facts that we've recorded for the Locations in the CFG. |
java.lang.String |
getClassName(ValueNumber v)
|
ValueNumber |
getClassObjectValue(java.lang.String className)
|
ValueNumber |
getEntryValue(int local)
Get the value number assigned to the given local variable upon entry to the method. |
ValueNumber |
getEntryValueForParameter(int param)
Get the value number assigned to the given parameter upon entry to the method. |
ValueNumberFrame |
getFactAfterLocation(Location location)
Get the dataflow fact representing the point just after given Location. |
ValueNumberFrame |
getFactAtLocation(Location location)
Get the dataflow fact representing the point just before given Location. |
ValueNumberFactory |
getFactory()
|
MergeTree |
getMergeTree()
|
int |
getNumValuesAllocated()
|
ValueNumber |
getThisValue()
|
void |
initEntryFact(ValueNumberFrame result)
Initialize the "entry" fact for the graph. |
boolean |
isThisValue(ValueNumber value)
|
void |
meetInto(ValueNumberFrame fact,
Edge edge,
ValueNumberFrame result)
Meet a dataflow fact associated with an incoming edge into another fact. |
protected void |
mergeInto(ValueNumberFrame frame,
ValueNumberFrame result)
Merge one frame into another. |
protected void |
mergeValues(ValueNumberFrame otherFrame,
ValueNumberFrame resultFrame,
int slot)
Merge the values contained in a given slot of two Frames. |
void |
setMergeTree(MergeTree mergeTree)
|
void |
transferInstruction(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock,
ValueNumberFrame fact)
Transfer function for a single instruction. |
Methods inherited from class edu.umd.cs.findbugs.ba.FrameDataflowAnalysis |
---|
copy, getLastUpdateTimestamp, isFactValid, isTop, makeFactTop, modifyFrame, same, setLastUpdateTimestamp |
Methods inherited from class edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis |
---|
getBlockOrder, getDepthFirstSearch, isForwards |
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis |
---|
transfer |
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis |
---|
edgeTransfer, factToString, finishIteration, getFactOnEdge, getResultFact, getStartFact, resultFactIterator, startIteration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
Constructor Detail |
---|
public ValueNumberAnalysis(org.apache.bcel.generic.MethodGen methodGen, DepthFirstSearch dfs, LoadedFieldSet loadedFieldSet, RepositoryLookupFailureCallback lookupFailureCallback)
Method Detail |
---|
public ValueNumber getClassObjectValue(java.lang.String className)
public void setMergeTree(MergeTree mergeTree)
public MergeTree getMergeTree()
public ValueNumberFactory getFactory()
public int getNumValuesAllocated()
public boolean isThisValue(ValueNumber value)
public ValueNumber getThisValue()
public ValueNumber getEntryValue(int local)
local
- local variable number
public ValueNumber getEntryValueForParameter(int param)
param
- a parameter (0 == first parameter)
public ValueNumberFrame createFact()
DataflowAnalysis
public void initEntryFact(ValueNumberFrame result)
DataflowAnalysis
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, ValueNumberFrame fact) throws DataflowAnalysisException
AbstractDataflowAnalysis
transferInstruction
in class AbstractDataflowAnalysis<ValueNumberFrame>
handle
- the instructionbasicBlock
- the BasicBlock containing the instruction; needed to disambiguate
instructions in inlined JSR subroutinesfact
- which should be modified based on the instruction
DataflowAnalysisException
public void meetInto(ValueNumberFrame fact, Edge edge, ValueNumberFrame result) throws DataflowAnalysisException
DataflowAnalysis
fact
- the predecessor fact (incoming edge)edge
- the edge from the predecessorresult
- the result fact
DataflowAnalysisException
protected void mergeInto(ValueNumberFrame frame, ValueNumberFrame result) throws DataflowAnalysisException
FrameDataflowAnalysis
mergeInto
in class FrameDataflowAnalysis<ValueNumber,ValueNumberFrame>
frame
- the frame to merge with the resultresult
- the result frame, which is modified to be the
merge of the two frames
DataflowAnalysisException
protected void mergeValues(ValueNumberFrame otherFrame, ValueNumberFrame resultFrame, int slot) throws DataflowAnalysisException
FrameDataflowAnalysis
mergeValues
in class FrameDataflowAnalysis<ValueNumber,ValueNumberFrame>
otherFrame
- a FrameresultFrame
- a Frame which will contain the resulting merged valueslot
- a slot in both frames
DataflowAnalysisException
public ValueNumberFrame getFactAtLocation(Location location)
AbstractDataflowAnalysis
getFactAtLocation
in interface DataflowAnalysis<ValueNumberFrame>
getFactAtLocation
in class AbstractDataflowAnalysis<ValueNumberFrame>
location
- the location
public ValueNumberFrame getFactAfterLocation(Location location)
AbstractDataflowAnalysis
getFactAfterLocation
in interface DataflowAnalysis<ValueNumberFrame>
getFactAfterLocation
in class AbstractDataflowAnalysis<ValueNumberFrame>
location
- the location
public java.util.Iterator<ValueNumberFrame> factIterator()
@Deprecated public void compactValueNumbers(Dataflow<ValueNumberFrame,ValueNumberAnalysis> dataflow)
This method should be called at most once.
dataflow
- the Dataflow object which executed this analysis
(and has all of the block result values)@CheckForNull @DottedClassName public java.lang.String getClassName(ValueNumber v)
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |