當前位置: 首頁>>代碼示例>>Java>>正文


Java ConstantPropagationTransfer類代碼示例

本文整理匯總了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);
}
 
開發者ID:reprogrammer,項目名稱:checker-framework,代碼行數:22,代碼來源:ConstantPropagationPlayground.java

示例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);
}
 
開發者ID:bazelbuild,項目名稱:bazel,代碼行數:17,代碼來源:ConstantPropagationPlayground.java


注:本文中的org.checkerframework.dataflow.constantpropagation.ConstantPropagationTransfer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。