Skip to content

AST_Graph::writeGraphOfAstSubGraphToFile

*** The functon void writeGraphOfAstSubGraphToFile(std::string filename, SgNode*,Functional1, Functional2, int, bool); will output a graph of the subgraph ofthe AST SgNode in the second argument into a file 'filename'. The thirdarguemtn is a custom functional on the form unary_function<std::pair<SgNode*,std:string>,bool > where the first template argument is a node and it's name while the secondtemplate argument is the return type (see defaultFilterUnary for an example). The fourth argument is a custom functional to filter edges on the form binary_function<SgNode*,std::pair<SgNode*,std:string>,bool > where the edge goes from the vertex in the first template argument to thevertex in the second template argument (see defaultFilterBinary for anexample).

Synopsis

Declared in <src/midend/astDump/astGraph.h>

template<
    typename Functional1,
    typename Functional2>
[[visibility]]
void
writeGraphOfAstSubGraphToFile(
    std::string filename,
    SgNode* node,
    AST_Graph::pointerHandling graphNullPointers,
    Functional1 addNode,
    Functional2 addEdge,
    int depth = ‐1);

Description

If the third argument is true a node and an edge is made to any NULL pointer.If the third argument is true the nodes and edges representing NULL pointersare filtered out (default).

Parameters

Name

Description

node

This class represents the base class for all IR nodes within Sage III.

Created with MrDocs