public class CFGVisualizeLauncher extends Object
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.
Constructor and Description |
---|
CFGVisualizeLauncher() |
Modifier and Type | Method and Description |
---|---|
<V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>> |
generateDOTofCFG(String inputFile,
String outputDir,
String method,
String clas,
boolean pdf,
boolean verbose,
@Nullable Analysis<V,S,T> analysis)
Generate the DOT representation of the CFG for a method.
|
protected void |
generateDOTofCFGWithoutAnalysis(String inputFile,
String outputDir,
String method,
String clas,
boolean pdf,
boolean verbose)
Generate the DOT representation of the CFG for a method, only.
|
protected ControlFlowGraph |
generateMethodCFG(String file,
String clas,
String method)
Generate the control flow graph of a method in a class.
|
<V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>> |
generateStringOfCFG(String inputFile,
String method,
String clas,
boolean verbose,
@Nullable Analysis<V,S,T> analysis)
Generate the String representation of the CFG for a method.
|
protected String |
generateStringOfCFGWithoutAnalysis(String inputFile,
String method,
String clas,
boolean verbose)
Generate the String representation of the CFG for a method, only.
|
static void |
main(String[] args)
The main entry point of CFGVisualizeLauncher.
|
protected void |
printError(@Nullable String string)
Print error message.
|
protected void |
printUsage()
Print usage information.
|
protected void |
producePDF(String file)
Invoke "dot" command to generate a PDF.
|
public static void main(String[] args)
args
- the passed arguments, see printUsage()
for the usageprotected void generateDOTofCFGWithoutAnalysis(String inputFile, String outputDir, String method, String clas, boolean pdf, boolean verbose)
inputFile
- java source input fileoutputDir
- output directorymethod
- name of the method to generate the CFG forclas
- name of the class which includes the method to generate the CFG forpdf
- also generate a PDFverbose
- show verbose information in CFGprotected String generateStringOfCFGWithoutAnalysis(String inputFile, String method, String clas, boolean verbose)
inputFile
- java source input filemethod
- name of the method to generate the CFG forclas
- name of the class which includes the method to generate the CFG forverbose
- show verbose information in CFGpublic <V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>> void generateDOTofCFG(String inputFile, String outputDir, String method, String clas, boolean pdf, boolean verbose, @Nullable Analysis<V,S,T> analysis)
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 approximated runtime behaviorinputFile
- java source input fileoutputDir
- source output directorymethod
- name of the method to generate the CFG forclas
- name of the class which includes the method to generate the CFG forpdf
- also generate a PDFverbose
- show verbose information in CFGanalysis
- analysis to perform before the visualization (or null
if no analysis is
to be performed)protected ControlFlowGraph generateMethodCFG(String file, String clas, String method)
file
- java source input fileclas
- name of the class which includes the method to generate the CFG formethod
- name of the method to generate the CFG forprotected void producePDF(String file)
file
- name of the dot filepublic <V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>> @Nullable Map<String,Object> generateStringOfCFG(String inputFile, String method, String clas, boolean verbose, @Nullable Analysis<V,S,T> analysis)
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 approximated runtime behaviorinputFile
- java source input filemethod
- name of the method to generate the CFG forclas
- name of the class which includes the method to generate the CFG forverbose
- show verbose information in CFGanalysis
- analysis to perform before the visualization (or null
if no analysis is
to be performed)protected void printUsage()