本文整理匯總了Java中org.checkerframework.dataflow.constantpropagation.ConstantPropagationTransfer類的典型用法代碼示例。如果您正苦於以下問題:Java ConstantPropagationTransfer類的具體用法?Java ConstantPropagationTransfer怎麽用?Java ConstantPropagationTransfer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ConstantPropagationTransfer類屬於org.checkerframework.dataflow.constantpropagation包,在下文中一共展示了ConstantPropagationTransfer類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import org.checkerframework.dataflow.constantpropagation.ConstantPropagationTransfer; //導入依賴的package包/類
/**
* 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 */
String inputFile = "cfg-input.java"; // input file name and path
String outputFileName = "cfg"; // output file name and path (without
// extension)
String method = "test"; // name of the method to analyze
String clazz = "Test"; // name of the class to consider
// 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);
}
示例2: main
import org.checkerframework.dataflow.constantpropagation.ConstantPropagationTransfer; //導入依賴的package包/類
/** 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 */
String inputFile = "cfg-input.java"; // input file name and path
String outputDir = "cfg"; // output directory
String method = "test"; // name of the method to analyze
String clazz = "Test"; // name of the class to consider
// 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, outputDir, method, clazz, true, analysis);
}