Package edu.umd.cs.findbugs.ba
Class LockAnalysis
java.lang.Object
- All Implemented Interfaces:
DataflowAnalysis<LockSet>
Analysis to determine where particular values are locked in a method. The
dataflow values are maps of value numbers to the number of times those values
are locked.
- Author:
- David Hovemeyer
- See Also:
-
Constructor Summary
ConstructorDescriptionLockAnalysis
(org.apache.bcel.generic.MethodGen methodGen, ValueNumberDataflow vnaDataflow, DepthFirstSearch dfs) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Copy dataflow facts.Create empty (uninitialized) dataflow facts for one program point.void
initEntryFact
(LockSet result) Initialize the "entry" fact for the graph.boolean
isFactValid
(LockSet fact) Determine whether the given fact is valid (neither top nor bottom).boolean
Is the given fact the top value.void
makeFactTop
(LockSet fact) Make given fact the top value.void
Meet a dataflow fact associated with an incoming edge into another fact.boolean
Are given dataflow facts the same?void
transferInstruction
(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, LockSet fact) Transfer function for a single instruction.Methods inherited from class edu.umd.cs.findbugs.ba.ForwardDataflowAnalysis
getBlockOrder, getDepthFirstSearch, isForwards
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis
getFactAfterLocation, getFactAtLocation, transfer
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis
edgeTransfer, factToString, finishIteration, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
-
Constructor Details
-
LockAnalysis
public LockAnalysis(org.apache.bcel.generic.MethodGen methodGen, ValueNumberDataflow vnaDataflow, DepthFirstSearch dfs)
-
-
Method Details
-
createFact
Description copied from interface:DataflowAnalysis
Create empty (uninitialized) dataflow facts for one program point. A valid value will be copied into it before it is used. -
copy
Description copied from interface:DataflowAnalysis
Copy dataflow facts. -
initEntryFact
Description copied from interface:DataflowAnalysis
Initialize the "entry" fact for the graph. -
makeFactTop
Description copied from interface:DataflowAnalysis
Make given fact the top value. -
isTop
Description copied from interface:DataflowAnalysis
Is the given fact the top value. -
same
Description copied from interface:DataflowAnalysis
Are given dataflow facts the same? -
meetInto
Description copied from interface:DataflowAnalysis
Meet 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
-
transferInstruction
public void transferInstruction(org.apache.bcel.generic.InstructionHandle handle, BasicBlock basicBlock, LockSet fact) throws DataflowAnalysisException Description copied from class:AbstractDataflowAnalysis
Transfer function for a single instruction.- Specified by:
transferInstruction
in classAbstractDataflowAnalysis<LockSet>
- 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
-
isFactValid
Description copied from class:AbstractDataflowAnalysis
Determine whether the given fact is valid (neither top nor bottom).- Specified by:
isFactValid
in classAbstractDataflowAnalysis<LockSet>
-