void PSIVisitor::visit_graph(IGraphStmt *graph) { if (graph->getStmtType() == IGraphStmt::GraphStmt_Block) { IGraphBlockStmt *b = static_cast<IGraphBlockStmt *>(graph); for (std::vector<IGraphStmt *>::const_iterator it=b->getStmts().begin(); it!=b->getStmts().end(); it++) { visit_graph_stmt(*it); } } else { visit_graph_stmt(graph); } }
void PSIVisitor::visit_graph(IGraphStmt *activity) { fprintf(stdout, "visit_graph: %d\n", activity->getStmtType()); fflush(stdout); if (activity->getStmtType() == IGraphStmt::GraphStmt_Block) { IGraphBlockStmt *b = dynamic_cast<IGraphBlockStmt *>(activity); push_graph(b); for (std::vector<IGraphStmt *>::const_iterator it=b->getStmts().begin(); it!=b->getStmts().end(); it++) { visit_graph_stmt(*it); } pop_graph(); } else { visit_graph_stmt(activity); } }