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

IGR dot parser. More...

Functions

def subGraphHeader
 Add the attributes of the subgraph. More...
 
def subGraphFooter
 "close" the subgraph. More...
 
def compoundHeader
 
def compoundFooter
 
def portString
 Get a representation for a port. More...
 
def ports
 String representation of a port list. More...
 
def inputList
 Get the portlist for the inputs of a node. More...
 
def outputList
 Get the portlist for the outputs of a node. More...
 
def nodeIdentifier
 Identifier of the node. More...
 
def edgeStr
 Convert a connection to a string. More...
 
def nodeLabel
 Add the label of the node to the buffer. More...
 
def nodeLinks
 Add all the outgoing edges of a node to the buffer. More...
 
def node
 Write the information of a node to the buffer. More...
 
def dotHeader
 Write general dot information. More...
 
def dotFooter
 Close the dot graph. More...
 
def getDot
 Create the dot string. More...
 
def dotToFile
 Get the dot representation and write it to a file. More...
 
def dot
 Convert the IGR graph to dot, save it, and run dot on this file. More...
 

Variables

tuple log = logging.getLogger(__name__)
 

Detailed Description

IGR dot parser.

This module can return a dot version of the graph. Mainly useful for debugging the compilation process.

Function Documentation

def IGR.dot.subGraphHeader (   buffer,
  subGraph 
)

Add the attributes of the subgraph.

def IGR.dot.subGraphFooter (   buffer,
  subGraph 
)

"close" the subgraph.

def IGR.dot.compoundHeader (   buffer,
  node 
)
def IGR.dot.compoundFooter (   buffer,
  node 
)
def IGR.dot.portString (   port,
  preFix = "" 
)

Get a representation for a port.

Returns
Return the value of the literal, if this port accepts a literal. * if this port is connected to another port. Returns the empty string if this port is not connected to anything
def IGR.dot.ports (   portLst,
  prefix = "" 
)

String representation of a port list.

Parameters
portLstThe list with ports, should not be None
Returns
Returns a string that will show the values of all the ports in a horizontal line when parsed by dot. Returns the empty string if the portLst is None
def IGR.dot.inputList (   node)

Get the portlist for the inputs of a node.

def IGR.dot.outputList (   node)

Get the portlist for the outputs of a node.

def IGR.dot.nodeIdentifier (   node)

Identifier of the node.

def IGR.dot.edgeStr (   srcNode,
  scrPort,
  dstNode,
  dstPort 
)

Convert a connection to a string.

def IGR.dot.nodeLabel (   buffer,
  node 
)

Add the label of the node to the buffer.

def IGR.dot.nodeLinks (   buffer,
  node 
)

Add all the outgoing edges of a node to the buffer.

def IGR.dot.node (   buffer,
  node 
)

Write the information of a node to the buffer.

def IGR.dot.dotHeader (   buffer)

Write general dot information.

def IGR.dot.dotFooter (   buffer)

Close the dot graph.

def IGR.dot.getDot (   skipCompound)

Create the dot string.

def IGR.dot.dotToFile (   path,
  skipCompound = True 
)

Get the dot representation and write it to a file.

def IGR.dot.dot (   dotpath = "dot",
  path = "igr.dot",
  format = "png",
  output = "",
  other = [],
  skipCompound = True 
)

Convert the IGR graph to dot, save it, and run dot on this file.

This function should be call with keyword arguments. The default arguments will cause the following behaviour:

  • dot is assumed to be in your PATH.
  • the dot file will be saved in igr.dot
  • the output will be in png format.
  • dot will decide where to store the output. With the default settings this would be in igr.dot.png
Parameters
dotpathThe path of the dot executable, in case it's not in your PATH
pathThe location where the dot file will be stored.
formatThe output format of the graph dot creates from the dot file.
outputThe location where we store the output of dot. Leaving this blank will pass the -O option. The -O option let's dot choose the path.
otherAny other options you want to pass to doth. These options should be passed as a list of strings.
skipCompoundTrue if you do not want to display the compound nodes.

Variable Documentation

tuple IGR.dot.log = logging.getLogger(__name__)