public interface CFGVisualizer<A extends AbstractValue<A>,S extends Store<S>,T extends TransferFunction<A,S>>
| Modifier and Type | Method and Description |
|---|---|
void |
init(Map<String,Object> args)
Initialization method guaranteed to be called once before the
first invocation of
visualize. |
void |
shutdown()
Shutdown method called once from the shutdown hook of the
BaseTypeChecker. |
@Nullable Map<String,Object> |
visualize(ControlFlowGraph cfg,
Block entry,
@Nullable Analysis<A,S,T> analysis)
Output a visualization representing the control flow graph starting
at
entry. |
void |
visualizeBlock(Block bb,
@Nullable Analysis<A,S,T> analysis)
Visualize a block based on the analysis.
|
void |
visualizeBlockNode(Node t,
@Nullable Analysis<A,S,T> analysis)
Visualize a Node based on the analysis.
|
void |
visualizeBlockTransferInput(Block bb,
Analysis<A,S,T> analysis)
Visualize the transferInput of a Block based on the analysis.
|
void |
visualizeSpecialBlock(SpecialBlock sbb)
Visualize a SpecialBlock.
|
void |
visualizeStore(S store)
Delegate the visualization responsibility
to the passed
Store instance, which will call back to this
visualizer instance for sub-components. |
void |
visualizeStoreArrayVal(FlowExpressions.ArrayAccess arrayValue,
A value)
Called by
CFAbstractStore#internalVisualize() to visualize
the value of arrays collected by this Store. |
void |
visualizeStoreClassVals(FlowExpressions.ClassName className,
A value)
Called by
CFAbstractStore#internalVisualize() to visualize
the value of class names collected by this Store. |
void |
visualizeStoreFieldVals(FlowExpressions.FieldAccess fieldAccess,
A value)
Called by
CFAbstractStore#internalVisualize() to visualize
the value of fields collected by this Store. |
void |
visualizeStoreFooter()
Called by
CFAbstractStore to visualize
any information after the invocation of CFAbstractStore#internalVisualize(). |
void |
visualizeStoreHeader(String classCanonicalName)
Called by a
CFAbstractStore to visualize
the class name before calling the
CFAbstractStore#internalVisualize() method. |
void |
visualizeStoreKeyVal(String keyName,
Object value)
Called by
CFAbstractStore#internalVisualize() to visualize
the specific information collected according to the specific kind of Store. |
void |
visualizeStoreLocalVar(FlowExpressions.LocalVariable localVar,
A value)
Called by
CFAbstractStore#internalVisualize() to visualize
a local variable. |
void |
visualizeStoreMethodVals(FlowExpressions.MethodCall methodCall,
A value)
Called by
CFAbstractStore#internalVisualize() to visualize
the value of pure method calls collected by this Store. |
void |
visualizeStoreThisVal(A value)
Called by
CFAbstractStore#internalVisualize() to visualize
the value of the current object this in this Store. |
void init(Map<String,Object> args)
visualize.args - Implementation-dependent options.@Nullable Map<String,Object> visualize(ControlFlowGraph cfg, Block entry, @Nullable Analysis<A,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 visualize.entry - The entry node of the control flow graph to be represented.analysis - An analysis containing information about the program
represented by the CFG. The information includes Stores
that are valid at the beginning of basic blocks reachable
from entry and per-node information for value
producing Nodes. Can also be null to
indicate that this information should not be output.void visualizeStore(S store)
Store instance, which will call back to this
visualizer instance for sub-components.store - The store to visualize.void visualizeStoreHeader(String classCanonicalName)
CFAbstractStore to visualize
the class name before calling the
CFAbstractStore#internalVisualize() method.classCanonicalName - The canonical name of the class.void visualizeStoreLocalVar(FlowExpressions.LocalVariable localVar, A value)
CFAbstractStore#internalVisualize() to visualize
a local variable.localVar - The local variable.value - The value of the local variable.void visualizeStoreThisVal(A value)
CFAbstractStore#internalVisualize() to visualize
the value of the current object this in this Store.value - The value of the current object this.void visualizeStoreFieldVals(FlowExpressions.FieldAccess fieldAccess, A value)
CFAbstractStore#internalVisualize() to visualize
the value of fields collected by this Store.fieldAccess - The field.value - The value of the field.void visualizeStoreArrayVal(FlowExpressions.ArrayAccess arrayValue, A value)
CFAbstractStore#internalVisualize() to visualize
the value of arrays collected by this Store.arrayValue - The array.value - The value of the array.void visualizeStoreMethodVals(FlowExpressions.MethodCall methodCall, A value)
CFAbstractStore#internalVisualize() to visualize
the value of pure method calls collected by this Store.methodCall - The pure method call.value - The value of the pure method call.void visualizeStoreClassVals(FlowExpressions.ClassName className, A value)
CFAbstractStore#internalVisualize() to visualize
the value of class names collected by this Store.className - The class name.value - The value of the class name.void 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 visualized.value - The value of the specific information to be visualized.void visualizeStoreFooter()
CFAbstractStore to visualize
any information after the invocation of CFAbstractStore#internalVisualize().void visualizeBlock(Block bb, @Nullable Analysis<A,S,T> analysis)
bb - The block.analysis - The current analysis.void visualizeSpecialBlock(SpecialBlock sbb)
sbb - The special block.void visualizeBlockTransferInput(Block bb, Analysis<A,S,T> analysis)
bb - The block.analysis - The current analysis.void visualizeBlockNode(Node t, @Nullable Analysis<A,S,T> analysis)
t - The node.analysis - The current analysis.void shutdown()
BaseTypeChecker.