当前位置: 首页>>代码示例>>C++>>正文


C++ SgProject::numberOfNodesInSubtree方法代码示例

本文整理汇总了C++中SgProject::numberOfNodesInSubtree方法的典型用法代码示例。如果您正苦于以下问题:C++ SgProject::numberOfNodesInSubtree方法的具体用法?C++ SgProject::numberOfNodesInSubtree怎么用?C++ SgProject::numberOfNodesInSubtree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SgProject的用法示例。


在下文中一共展示了SgProject::numberOfNodesInSubtree方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........
    }
    if (args.count("csv-at-analysis")) {
      csvAddressTakenResultFileName=args["csv-at-analysis"].as<string>().c_str();
      option_at_analysis=true;
    }
    if (args.count("csv-stable")) {
      option_csv_stable=true;
    }
    if (args.count("no-topological-sort")) {
      option_no_topological_sort=true;
    }

    // clean up string-options in argv
    for (int i=1; i<argc; ++i) {
      if (string(argv[i]) == "--prefix" 
       || string(argv[i]) == "--csv-fi-constanalysis"
       || string(argv[i]) == "--csv-at-analysis"
       || string(argv[i]) == "--csv-deadcode-unreachable"
       || string(argv[i]) == "--csv-deadcode-deadstore"
      ) {
        // do not confuse ROSE frontend
        argv[i] = strdup("");
        assert(i+1<argc);
        argv[i+1] = strdup("");
      }
    }

    cout << "INIT: Parsing and creating AST."<<endl;
    boolOptions.registerOption("semantic-fold",false); // temporary
    boolOptions.registerOption("post-semantic-fold",false); // temporary
    SgProject* root = frontend(argc,argv);

    if(option_trace) {
      cout << "TRACE: AST node count: " << root->numberOfNodesInSubtree() << endl;
    }
    //  AstTests::runAllTests(root);

   if(option_stats) {
      SPRAY::ProgramStatistics::printBasicCodeInfo(root);
    }

  cout<<"STATUS: computing variableid mapping"<<endl;
  ProgramAbstractionLayer* programAbstractionLayer=new ProgramAbstractionLayer();
  programAbstractionLayer->initialize(root);
  if (args.count("print-varid-mapping-array")) {
    programAbstractionLayer->getVariableIdMapping()->setModeVariableIdForEachArrayElement(true);
  }

#if 0
  IOLabeler* iolabeler=new IOLabeler(root,&variableIdMapping);
  //cout<<"IOLabelling:\n"<<iolabeler->toString()<<endl;
#endif

  if (args.count("print-varid-mapping")||args.count("print-varid-mapping-array")) {
    programAbstractionLayer->getVariableIdMapping()->toStream(cout);
    return 0;
  }

  if(args.count("print-label-mapping")) {
    cout<<(programAbstractionLayer->getLabeler()->toString());
    return 0;
  }

  if(args.count("icfg-dot")) {
    CFAnalysis* cfAnalysis=new CFAnalysis(programAbstractionLayer->getLabeler());
    Flow flow=cfAnalysis->flow(root);
开发者ID:ian-bertolacci,项目名称:rose-develop,代码行数:67,代码来源:analyterix.C


注:本文中的SgProject::numberOfNodesInSubtree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。