Dataflow Software Stack  032db78
Master Thesis of Mathijs Saey at the VUB
 All Classes Namespaces Files Functions Variables Pages
Functions
IGR.traverse Namespace Reference

IGR Traversals. More...

Functions

def traverse
 Traverse all the nodes in the program. More...
 

Detailed Description

IGR Traversals.

This module defines the various functions that allow us to traverse and transform the IGR graph.

Function Documentation

def IGR.traverse.traverse (   nodeProc,
  subGraphStart,
  subGraphStop,
  skipCompound,
  compoundStart,
  compoundStop,
  subGraphs = graph.getSubGraphs() 
)

Traverse all the nodes in the program.

We traverse over a copy so it's safe to modify the IGR structure while traversing over the graph.

Parameters
nodeProcThe function that is called when we encounter a node. node is passed as an argument to this function.
subGraphStartThe function that is called when we enter a new subgraph. The subgraph is passed as an argument.
subGraphStopThe function that is called when we exit a subgraph. The subgraph is passed as an argument.
skipCompoundShould be true is you want to treat compounds as normal nodes. If this value is false, the subgraphs of any compound node will be traversed.
compoundStartThe function that is called when we start parsing a compound node. The node is passed as an argument to this function. Remember that we have already called nodeProc on this node!
comoundEndThe function that is called when we exit a compound node. The node in question is passed to the function.
subGraphsThe subgraphs to traverse. Parses the entire program by default.