示例#1
0
void visitorTraversal::analyzePath(std::vector<VertexID>& pathR) {
    std::vector<string> path;
   for (unsigned int j = 0; j < pathR.size(); j++) {
       SgGraphNode* R = getGraphNode[pathR[j]];
      CFGNode cf = cfg->toCFGNode(R);
       string str = cf.toString();str.erase(std::remove(str.begin(), str.end(), '\n'), str.end());
       path.push_back(str);
    }
    paths.push_back(path);
   // ROSE_ASSERT(sssv.find(path) != sssv.end());
}
示例#2
0
void visitorTraversal::analyzePath(std::vector<VertexID>& pathR) {
    std::vector<SgGraphNode*> exprPath;
    std::vector<string> path;
    //ss << "vector<string> sss;\n";
    for (unsigned int j = 0; j < pathR.size(); j++) {
       SgGraphNode* R = getGraphNode[pathR[j]];
      CFGNode cf = cfg->toCFGNode(R);
   //    path.push_back(R->get_name());
      string str = cf.toString();
      str.erase(std::remove(str.begin(), str.end(), '\n'), str.end());
       //ss << "string str = \"" << str << "\";\n";
       ss << "sss.push_back(\"" << str << "\");\n";
    }
    ss << "sssv.insert(sss);\n";
    ss << "sss.clear();\n";
   // paths.insert(path);
    
}