V
- the abstract value type to be tracked by the analysisS
- the store type used in the analysisT
- the transfer function type that is used to approximate runtime behaviorpublic interface CFGVisualizer<V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>>
Modifier and Type | Method and Description |
---|---|
String |
getSeparator()
Returns the separator for lines within a node's representation.
|
void |
init(Map<String,Object> args)
Initialization method guaranteed to be called once before the first invocation of
visualize(org.checkerframework.dataflow.cfg.ControlFlowGraph, org.checkerframework.dataflow.cfg.block.Block, org.checkerframework.dataflow.analysis.Analysis<V, S, T>) . |
void |
shutdown()
Shutdown method called once from the shutdown hook of the
BaseTypeChecker . |
@Nullable Map<String,Object> |
visualize(ControlFlowGraph cfg,
Block entry,
@Nullable Analysis<V,S,T> analysis)
Output a visualization representing the control flow graph starting at
entry . |
String |
visualizeBlock(Block bb,
@Nullable Analysis<V,S,T> analysis)
Visualize a block based on the analysis.
|
String |
visualizeBlockNode(Node t,
@Nullable Analysis<V,S,T> analysis)
Visualize a Node based on the analysis.
|
String |
visualizeBlockTransferInputAfter(Block bb,
Analysis<V,S,T> analysis)
Visualize the transferInput after a Block based on the analysis.
|
String |
visualizeBlockTransferInputBefore(Block bb,
Analysis<V,S,T> analysis)
Visualize the transferInput before a Block based on the analysis.
|
String |
visualizeConditionalBlock(ConditionalBlock cbb)
Visualize a ConditionalBlock.
|
String |
visualizeSpecialBlock(SpecialBlock sbb)
Visualize a SpecialBlock.
|
String |
visualizeStore(S store)
Delegate the visualization responsibility to the passed
Store instance, which will call
back to this visualizer instance for sub-components. |
String |
visualizeStoreArrayVal(ArrayAccess arrayValue,
V value)
Called by
CFAbstractStore#internalVisualize() to visualize the value of one array
collected by this Store. |
String |
visualizeStoreClassVals(ClassName className,
V value)
Called by
CFAbstractStore#internalVisualize() to visualize the value of class names
collected by this Store. |
String |
visualizeStoreFieldVal(FieldAccess fieldAccess,
V value)
Called by
CFAbstractStore#internalVisualize() to visualize the value of one field
collected by this Store. |
String |
visualizeStoreKeyVal(String keyName,
Object value)
Called by
CFAbstractStore#internalVisualize() to visualize the specific information
collected according to the specific kind of Store. |
String |
visualizeStoreLocalVar(LocalVariable localVar,
V value)
Called by
CFAbstractStore#internalVisualize() to visualize a local variable. |
String |
visualizeStoreMethodVals(MethodCall methodCall,
V value)
Called by
CFAbstractStore#internalVisualize() to visualize the value of pure method
calls collected by this Store. |
String |
visualizeStoreThisVal(V value)
Called by
CFAbstractStore#internalVisualize() to visualize the value of the current
object this in this Store. |
void init(Map<String,Object> args)
visualize(org.checkerframework.dataflow.cfg.ControlFlowGraph, org.checkerframework.dataflow.cfg.block.Block, org.checkerframework.dataflow.analysis.Analysis<V, S, T>)
.args
- implementation-dependent optionsString getSeparator()
@Nullable Map<String,Object> visualize(ControlFlowGraph cfg, Block entry, @Nullable Analysis<V,S,T> analysis)
entry
. The
concrete actions are implementation dependent.
An invocation visualize(cfg, entry, null);
does not output stores at the beginning
of basic blocks.
cfg
- the CFG to visualizeentry
- the entry node of the control flow graph to be representedanalysis
- an analysis containing information about the program represented by the CFG.
The information includes Store
s that are valid at the beginning of basic blocks
reachable from entry
and per-node information for value producing Node
s.
Can also be null
to indicate that this information should not be output.DOTCFGVisualizer
) or a String
representation of the CFG (StringCFGVisualizer
)String visualizeStore(S store)
Store
instance, which will call
back to this visualizer instance for sub-components.store
- the store to visualizeString visualizeStoreLocalVar(LocalVariable localVar, V value)
CFAbstractStore#internalVisualize()
to visualize a local variable.localVar
- the local variablevalue
- the value of the local variableString visualizeStoreThisVal(V value)
CFAbstractStore#internalVisualize()
to visualize the value of the current
object this
in this Store.value
- the value of the current object this
this
String visualizeStoreFieldVal(FieldAccess fieldAccess, V value)
CFAbstractStore#internalVisualize()
to visualize the value of one field
collected by this Store.fieldAccess
- the fieldvalue
- the value of the fieldString visualizeStoreArrayVal(ArrayAccess arrayValue, V value)
CFAbstractStore#internalVisualize()
to visualize the value of one array
collected by this Store.arrayValue
- the arrayvalue
- the value of the arrayString visualizeStoreMethodVals(MethodCall methodCall, V value)
CFAbstractStore#internalVisualize()
to visualize the value of pure method
calls collected by this Store.methodCall
- the pure method callvalue
- the value of the pure method callString visualizeStoreClassVals(ClassName className, V value)
CFAbstractStore#internalVisualize()
to visualize the value of class names
collected by this Store.className
- the class namevalue
- the value of the class nameString visualizeStoreKeyVal(String keyName, Object value)
CFAbstractStore#internalVisualize()
to visualize the specific information
collected according to the specific kind of Store. Currently, these Stores call this method:
LockStore
, NullnessStore
, and InitializationStore
to visualize
additional information.keyName
- the name of the specific information to be visualizedvalue
- the value of the specific information to be visualizedString visualizeBlock(Block bb, @Nullable Analysis<V,S,T> analysis)
bb
- the blockanalysis
- the current analysisString visualizeSpecialBlock(SpecialBlock sbb)
sbb
- the special blocksbb
: entry, exit, or
exceptional-exitString visualizeConditionalBlock(ConditionalBlock cbb)
cbb
- the conditional blockString visualizeBlockTransferInputBefore(Block bb, Analysis<V,S,T> analysis)
bb
- the blockanalysis
- the current analysisString visualizeBlockTransferInputAfter(Block bb, Analysis<V,S,T> analysis)
bb
- the blockanalysis
- the current analysisString visualizeBlockNode(Node t, @Nullable Analysis<V,S,T> analysis)
t
- the nodeanalysis
- the current analysisvoid shutdown()
BaseTypeChecker
.