Class AbstractAnalysis.Worklist
java.lang.Object
org.checkerframework.dataflow.analysis.AbstractAnalysis.Worklist
- Enclosing class:
- AbstractAnalysis<V extends AbstractValue<V>,S extends Store<S>, T extends TransferFunction<V, S>> 
A worklist is a priority queue of blocks in which the order is given by depth-first ordering to
 place non-loop predecessors ahead of successors.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionclassComparators to allow priority queue to order blocks by their depth-first order, using by backward analysis.classComparators to allow priority queue to order blocks by their depth-first order, using by forward analysis.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final IdentityHashMap<Block,Integer> Map all blocks in the CFG to their depth-first order.protected final PriorityQueue<Block>The backing priority queue.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd the given block toqueue.booleanCheck ifqueuecontains the block which is passed as the argument.booleanisEmpty()poll()SeePriorityQueue.poll().voidprocess(ControlFlowGraph cfg) Process the control flow graph, add the blocks todepthFirstOrder.toString()
- 
Field Details- 
depthFirstOrderMap all blocks in the CFG to their depth-first order.
- 
queueThe backing priority queue.
 
- 
- 
Constructor Details- 
WorklistCreate a Worklist.- Parameters:
- direction- the direction (forward or backward)
 
 
- 
- 
Method Details- 
processProcess the control flow graph, add the blocks todepthFirstOrder.- Parameters:
- cfg- the control flow graph to process
 
- 
isEmpty- Returns:
- true if queueis empty else false
- See Also:
 
- 
containsCheck ifqueuecontains the block which is passed as the argument.- Parameters:
- block- the given block to check
- Returns:
- true if queuecontains the given block
 
- 
addAdd the given block toqueue. Adds unconditionally: does not check containment first.- Parameters:
- block- the block to add to- queue
 
- 
pollSeePriorityQueue.poll().- Returns:
- the head of queue
- See Also:
 
- 
toString
 
-