at.dms.kjc.sir.linear
Class LinearDot

java.lang.Object
  extended by at.dms.kjc.StreamItDot
      extended by at.dms.kjc.sir.linear.LinearDot
All Implemented Interfaces:
AttributeStreamVisitor
Direct Known Subclasses:
LinearDotSimple

public class LinearDot
extends StreamItDot

This class extends the main StreamIt dot (graph) printer to annotate the dot graphs with linear analysis information. It colors linear nodes blue, linear nodes with a constant component violet red and linear structures pink.

It also adds linear redundancy information


Nested Class Summary
 
Nested classes/interfaces inherited from class at.dms.kjc.StreamItDot
StreamItDot.NamePair
 
Constructor Summary
LinearDot(PrintStream outputstream, LinearAnalyzer anal, LinearRedundancyAnalyzer lra)
          Make a LinearDot printer that prints out the dot graph using information from the linear filter analyzer to annotate the graph (eg color it silly).
 
Method Summary
 String getClusterString(SIRStream self)
          Override the string used to create a new subgraph, to color it if we have a linear rep for it.
 boolean hasRedundancyInformation()
          returns true if we have redundancy information.
 String makeRedundancyString(SIRStream str)
          Creates a string that represents the linear redundancy of this str.
static void printGraph(SIRStream str, String filename, LinearAnalyzer lfa)
          Prints dot graph of to , using LinearAnalyzer lfa.
static void printGraph(SIRStream str, String filename, LinearAnalyzer lfa, LinearRedundancyAnalyzer lra)
          Prints dot graph of to , using LinearAnalyzer lfa and LinearRedundancyAnalyzer lra.
 Object visitFilter(SIRFilter self, JFieldDeclaration[] fields, JMethodDeclaration[] methods, JMethodDeclaration init, JMethodDeclaration work, CType inputType, CType outputType)
          Override visitFilter to color filters that compute linear functions.
 
Methods inherited from class at.dms.kjc.StreamItDot
compile, getName, makeFilterLabel, makeLabelledNode, print, printGraph, printGraph, processWorkFunction, visitFeedbackLoop, visitJoiner, visitPhasedFilter, visitPipeline, visitSplitJoin, visitSplitter, visitStructure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearDot

public LinearDot(PrintStream outputstream,
                 LinearAnalyzer anal,
                 LinearRedundancyAnalyzer lra)
Make a LinearDot printer that prints out the dot graph using information from the linear filter analyzer to annotate the graph (eg color it silly). Also include redundancy information.

Method Detail

hasRedundancyInformation

public boolean hasRedundancyInformation()
returns true if we have redundancy information. (eg if we are going to include redundancy percentages in the titles.


makeRedundancyString

public String makeRedundancyString(SIRStream str)
Creates a string that represents the linear redundancy of this str. If no redundancy information is present in this LinearDot or if there is no information about str, then a blank string is returned.


visitFilter

public Object visitFilter(SIRFilter self,
                          JFieldDeclaration[] fields,
                          JMethodDeclaration[] methods,
                          JMethodDeclaration init,
                          JMethodDeclaration work,
                          CType inputType,
                          CType outputType)
Override visitFilter to color filters that compute linear functions.

Specified by:
visitFilter in interface AttributeStreamVisitor
Overrides:
visitFilter in class StreamItDot

getClusterString

public String getClusterString(SIRStream self)
Override the string used to create a new subgraph, to color it if we have a linear rep for it.

Overrides:
getClusterString in class StreamItDot

printGraph

public static void printGraph(SIRStream str,
                              String filename,
                              LinearAnalyzer lfa,
                              LinearRedundancyAnalyzer lra)
Prints dot graph of to , using LinearAnalyzer lfa and LinearRedundancyAnalyzer lra.


printGraph

public static void printGraph(SIRStream str,
                              String filename,
                              LinearAnalyzer lfa)
Prints dot graph of to , using LinearAnalyzer lfa.