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

dot generator More...

Functions

def generateIdentifier
 Generate a unique idea for a chunk/key pair. More...
 
def generateInstIdentifier
 Generate a unique identifier for an instruction. More...
 
def generateTupleIdentifier
 Generate a unique identifier for a chunk, key pair. More...
 
def processSink
 
def processOp
 
def processConst
 
def processSplit
 
def processContChange
 
def processContRestore
 
def processSwitch
 
def processStop
 
def getAttributes
 
def addInst
 
def destMapLinks
 
def destListLinks
 
def addContextChangeLinks
 
def addSplitLinks
 
def addSwitchLinks
 
def addLinks
 
def dotHeader
 
def dotFooter
 
def dotString
 Generate a dot string from the instruction memory. More...
 
def dotFile
 Write the dot string to a file. More...
 
def dot
 Convert the instruction memory to dot, save it and run dot on this file. More...
 

Variables

tuple log = logging.getLogger(__name__)
 
dictionary attributes
 

Detailed Description

dot generator

This module defines a tool that allows us to generate graphs from the instruction memory.

Function Documentation

def dot.generateIdentifier (   chunk,
  key 
)

Generate a unique idea for a chunk/key pair.

def dot.generateInstIdentifier (   inst)

Generate a unique identifier for an instruction.

def dot.generateTupleIdentifier (   tup)

Generate a unique identifier for a chunk, key pair.

def dot.processSink (   inst)
def dot.processOp (   inst)
def dot.processConst (   inst)
def dot.processSplit (   inst)
def dot.processContChange (   inst)
def dot.processContRestore (   inst)
def dot.processSwitch (   inst)
def dot.processStop (   inst)
def dot.getAttributes (   inst)
def dot.addInst (   buffer,
  inst 
)
def dot.destMapLinks (   buffer,
  inst 
)
def dot.destListLinks (   buffer,
  inst 
)
def dot.addContextChangeLinks (   buffer,
  inst 
)
def dot.addSplitLinks (   buffer,
  inst 
)
def dot.addSwitchLinks (   buffer,
  inst 
)
def dot.addLinks (   buffer,
  inst 
)
def dot.dotHeader (   buffer)
def dot.dotFooter (   buffer)
def dot.dotString ( )

Generate a dot string from the instruction memory.

def dot.dotFile (   path)

Write the dot string to a file.

def dot.dot (   dotpath = "dot",
  path = "dis.dot",
  format = "png",
  output = "",
  other = [] 
)

Convert the instruction memory 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 dis.dot
  • the output will be in png format.
  • dot will decide where to store the output. With the default settings this would be in dis.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.

Variable Documentation

tuple dot.log = logging.getLogger(__name__)
dictionary dot.attributes
Initial value:
1 = {
3  core.instruction.Constant : processConst,
4  core.instruction.Sink : processSink,
5  core.instruction.Split : processSplit,
6  core.instruction.ContextChange : processContChange,
7  core.instruction.ContextRestore : processContRestore,
8  core.instruction.Switch : processSwitch,
10 }
Represents the restoration of context.
Definition: instruction.py:324
An operation instruction defines a single operation on all of it's inputs.
Definition: instruction.py:183
Represents an instruction that will dynamically determine the destination of it's tokens at runtime...
Definition: instruction.py:345
Represents the end of the program.
Definition: instruction.py:423
Constant instruction.
Definition: instruction.py:239
Split instruction.
Definition: instruction.py:386
Represents a context change in the program.
Definition: instruction.py:276
Sink instruction.
Definition: instruction.py:258