scale.score.pred
Class Export

java.lang.Object
  extended by scale.score.pred.Supertype
      extended by scale.score.pred.Export
All Implemented Interfaces:
Predicate
Direct Known Subclasses:
ExportCFG

public abstract class Export
extends Supertype

This predicate class exports a Scribble graph so that it can be visualized.

$Id: Export.java,v 1.58 2006-02-28 16:37:17 burrill Exp $

Copyright 2007 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

The primary difference in the different edges is the color and/or type of line used to represent it.


Field Summary
protected  DisplayGraph da
          The display graph object.
 
Constructor Summary
protected Export(DisplayGraph da)
           
 
Method Summary
protected  void addAnnotationEdge(Annotation n2, Note n1)
          Create an edge from a node to an annotation.
protected  void addBadEdge(Note n1, Note n2)
          Create an edge from n1 to n2 where the link is not correct.
protected  void addCfgEdge(Chord n1, Chord n2)
          Create a CFG edge from n1 to n2.
protected  void addCfgEdges(Chord n)
          Add the out-going CFG edges of the node to the graph.
protected  void addClefEdge(Node n1, Note n2)
          Create an AST edge from n1 to n2.
protected  void addDataEdge(Note n1, Note n2)
          Display an "data" edge between the two objects.
protected  void addDataEdges(Note n)
          Add the out-going data edges of the node to the graph.
protected  void addDefUseEdge(Note n1, Note n2)
          Add a regular use-def edge in the graph.
protected  void addDomEdge(Note n2, Note n1)
          Create a "dominance" edge from n1 to n2.
protected  void addFalseCfgEdge(Chord n1, Chord n2)
          Used for if-then-else constructs to create an edge from n1 to n2.
protected  void addGraphNodeEdge(Note n1, MayDef mayDef)
          Add an edge representing a May Def graph node link.
protected  void addMayDefEdge(Note n1, MayDef mayDef)
          Add an edge representing a May Def.
protected  void addMayUseEdge(Note n1, MayUse mayUse)
          Add an edge representing a May Use.
protected  void addTrueCfgEdge(Chord n1, Chord n2)
          Used for if-then-else constructs to create an edge from n1 to n2.
protected  void addUseDefEdge(Note n1, Note n2)
          Add a regular use-def edge in the graph.
abstract  void traverse(Chord start)
          Perform the traversal of the nodes.
 
Methods inherited from class scale.score.pred.Supertype
visitAbsoluteValueExpr, visitAdditionExpr, visitAllocateExpr, visitAndExpr, visitArrayIndexExpr, visitBeginChord, visitBinaryExpr, visitBitAndExpr, visitBitComplementExpr, visitBitOrExpr, visitBitShiftExpr, visitBitXorExpr, visitBranchChord, visitCallExpr, visitCallFunctionExpr, visitCallMethodExpr, visitChord, visitCompareExpr, visitComplexValueExpr, visitConditionalExpr, visitConversionExpr, visitDecisionChord, visitDivisionExpr, visitDualExpr, visitEndChord, visitEqualityExpr, visitExitChord, visitExponentiationExpr, visitExpr, visitExprChord, visitExprPhiExpr, visitFieldExpr, visitGotoChord, visitGreaterEqualExpr, visitGreaterExpr, visitIfThenElseChord, visitLeaveChord, visitLessEqualExpr, visitLessExpr, visitLiteralExpr, visitLoadDeclAddressExpr, visitLoadDeclValueExpr, visitLoadExpr, visitLoadFieldAddressExpr, visitLoadFieldValueExpr, visitLoadValueIndirectExpr, visitLoopExitChord, visitLoopHeaderChord, visitLoopInitChord, visitLoopPreHeaderChord, visitLoopTailChord, visitMarkerChord, visitMaxExpr, visitMinExpr, visitMultiplicationExpr, visitNaryExpr, visitNegativeExpr, visitNilExpr, visitNote, visitNotEqualExpr, visitNotExpr, visitNullChord, visitOrExpr, visitPhiExpr, visitPhiExprChord, visitRemainderExpr, visitReturnChord, visitSequentialChord, visitSubscriptExpr, visitSubtractionExpr, visitSwitchChord, visitTernaryExpr, visitTranscendental2Expr, visitTranscendentalExpr, visitUnaryExpr, visitVaArgExpr, visitVaEndExpr, visitValueExpr, visitVarArgExpr, visitVaStartExpr, visitVectorExpr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

da

protected DisplayGraph da
The display graph object.

Constructor Detail

Export

protected Export(DisplayGraph da)
Parameters:
da - is the display graph object
Method Detail

traverse

public abstract void traverse(Chord start)
Perform the traversal of the nodes.

Parameters:
start - is the first node to traverse

addDataEdges

protected void addDataEdges(Note n)
Add the out-going data edges of the node to the graph.


addCfgEdges

protected void addCfgEdges(Chord n)
Add the out-going CFG edges of the node to the graph.


addUseDefEdge

protected void addUseDefEdge(Note n1,
                             Note n2)
Add a regular use-def edge in the graph.

Parameters:
n1 - the use node
n2 - the def node

addDefUseEdge

protected void addDefUseEdge(Note n1,
                             Note n2)
Add a regular use-def edge in the graph.

Parameters:
n1 - the use node
n2 - the def node

addMayUseEdge

protected void addMayUseEdge(Note n1,
                             MayUse mayUse)
Add an edge representing a May Use.

Parameters:
n1 - the node reprsenting the use
mayUse - the node containing info on the potential definition
See Also:
MayUse

addMayDefEdge

protected void addMayDefEdge(Note n1,
                             MayDef mayDef)
Add an edge representing a May Def.

Parameters:
n1 - the node causing the may definition.
mayDef - a node that representing the previous definition.
See Also:
MayDef

addGraphNodeEdge

protected void addGraphNodeEdge(Note n1,
                                MayDef mayDef)
Add an edge representing a May Def graph node link.

Parameters:
n1 - the node causing the may definition.
mayDef - a node that representing the previous definition.
See Also:
MayDef

addCfgEdge

protected void addCfgEdge(Chord n1,
                          Chord n2)
Create a CFG edge from n1 to n2.


addTrueCfgEdge

protected void addTrueCfgEdge(Chord n1,
                              Chord n2)
Used for if-then-else constructs to create an edge from n1 to n2.


addFalseCfgEdge

protected void addFalseCfgEdge(Chord n1,
                               Chord n2)
Used for if-then-else constructs to create an edge from n1 to n2.


addDataEdge

protected void addDataEdge(Note n1,
                           Note n2)
Display an "data" edge between the two objects.


addDomEdge

protected void addDomEdge(Note n2,
                          Note n1)
Create a "dominance" edge from n1 to n2.


addAnnotationEdge

protected void addAnnotationEdge(Annotation n2,
                                 Note n1)
Create an edge from a node to an annotation.


addClefEdge

protected void addClefEdge(Node n1,
                           Note n2)
Create an AST edge from n1 to n2.


addBadEdge

protected void addBadEdge(Note n1,
                          Note n2)
Create an edge from n1 to n2 where the link is not correct.