use of org.checkerframework.dataflow.constantpropagation.ConstantPropagationStore in project bazel by bazelbuild.
the class ConstantPropagationPlayground method main.
/**
* Run constant propagation for a specific file and create a PDF of the CFG
* in the end.
*/
public static void main(String[] args) {
/* Configuration: change as appropriate */
// input file name and path
String inputFile = "cfg-input.java";
// output file name and path (without
String outputFileName = "cfg";
// extension)
// name of the method to analyze
String method = "test";
// name of the class to consider
String clazz = "Test";
// run the analysis and create a PDF file
ConstantPropagationTransfer transfer = new ConstantPropagationTransfer();
// TODO: correct processing environment
Analysis<Constant, ConstantPropagationStore, ConstantPropagationTransfer> analysis = new Analysis<>(null, transfer);
JavaSource2CFGDOT.generateDOTofCFG(inputFile, outputFileName, method, clazz, true, analysis);
}
Aggregations