Class CFGVisualizeLauncher
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.visualize.CFGVisualizeLauncher
-
public final class CFGVisualizeLauncher extends java.lang.Object
Launcher to generate the DOT or String representation of the control flow graph of a given method in a given class.Usage: Directly run it as the main class to generate the DOT representation of the control flow graph of a given method in a given class. See
ConstantPropagationPlayground
for another way to use it.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
The main entry point of CFGVisualizeLauncher.static <V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>>
voidperformAnalysis(CFGVisualizeOptions config, @Nullable Analysis<V,S,T> analysis)
Generate a visualization of the CFG of a method, with an optional analysis.static void
writeStringOfCFG(java.lang.String inputFile, java.lang.String method, java.lang.String clas, java.lang.String outputFile, Analysis<?,?,?> analysis)
Write generated String representation of the CFG for a method to a file.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
The main entry point of CFGVisualizeLauncher.- Parameters:
args
- command-line arguments
-
performAnalysis
public static <V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>> void performAnalysis(CFGVisualizeOptions config, @Nullable Analysis<V,S,T> analysis)
Generate a visualization of the CFG of a method, with an optional analysis.- Type Parameters:
V
- the abstract value type of the analysisS
- the store type of the analysisT
- the transfer function type of the analysis- Parameters:
config
- CFGVisualizeOptions that includes input file, output directory, method name, and class nameanalysis
- analysis to perform before the visualization (ornull
if no analysis is to be performed)
-
writeStringOfCFG
public static void writeStringOfCFG(java.lang.String inputFile, java.lang.String method, java.lang.String clas, java.lang.String outputFile, Analysis<?,?,?> analysis)
Write generated String representation of the CFG for a method to a file.- Parameters:
inputFile
- a Java source file, used as inputmethod
- name of the method to generate the CFG forclas
- name of the class which includes the method to generate the CFG foroutputFile
- source output fileanalysis
- instance of forward or backward analysis from specific dataflow test case
-
-