scale.score.pred
Class ExportCFG

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

public class ExportCFG
extends Export

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

$Id: ExportCFG.java,v 1.78 2007-10-04 19:58:34 burrill Exp $

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

Each predicate builds a term representation appropriate for input to the DisplayGraph visualization tool.


Field Summary
 
Fields inherited from class scale.score.pred.Export
da
 
Constructor Summary
ExportCFG(DisplayGraph da, Scribble scribble, int displayFlags)
          Display the CFG graphically.
 
Method Summary
 void traverse(Chord start)
          Traverse the CFG to actually build the display.
 void traverseDom(Chord start)
          Treverse the dominator tree and construct the edges.
 void traversePDom(Chord start)
          Treverse the dominator tree and construct the edges.
 void visitCallExpr(CallExpr e)
           
 void visitChord(Chord c)
           
 void visitExpr(Expr e)
           
 void visitExprChord(ExprChord c)
           
 void visitIfThenElseChord(IfThenElseChord c)
           
 void visitLiteralExpr(LiteralExpr e)
           
 void visitLoadExpr(LoadExpr e)
           
 void visitLoopHeaderChord(LoopHeaderChord c)
           
 
Methods inherited from class scale.score.pred.Export
addAnnotationEdge, addBadEdge, addCfgEdge, addCfgEdges, addClefEdge, addDataEdge, addDataEdges, addDefUseEdge, addDomEdge, addFalseCfgEdge, addGraphNodeEdge, addMayDefEdge, addMayUseEdge, addTrueCfgEdge, addUseDefEdge
 
Methods inherited from class scale.score.pred.Supertype
visitAbsoluteValueExpr, visitAdditionExpr, visitAllocateExpr, visitAndExpr, visitArrayIndexExpr, visitBeginChord, visitBinaryExpr, visitBitAndExpr, visitBitComplementExpr, visitBitOrExpr, visitBitShiftExpr, visitBitXorExpr, visitBranchChord, visitCallFunctionExpr, visitCallMethodExpr, visitCompareExpr, visitComplexValueExpr, visitConditionalExpr, visitConversionExpr, visitDecisionChord, visitDivisionExpr, visitDualExpr, visitEndChord, visitEqualityExpr, visitExitChord, visitExponentiationExpr, visitExprPhiExpr, visitFieldExpr, visitGotoChord, visitGreaterEqualExpr, visitGreaterExpr, visitLeaveChord, visitLessEqualExpr, visitLessExpr, visitLoadDeclAddressExpr, visitLoadDeclValueExpr, visitLoadFieldAddressExpr, visitLoadFieldValueExpr, visitLoadValueIndirectExpr, visitLoopExitChord, 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
 

Constructor Detail

ExportCFG

public ExportCFG(DisplayGraph da,
                 Scribble scribble,
                 int displayFlags)
Display the CFG graphically.

Parameters:
da - the display graph object
displayFlags - specify what should be displayed
See Also:
DisplayNode
Method Detail

traverse

public void traverse(Chord start)
Traverse the CFG to actually build the display.

Note - this method uses nextVisit().

Specified by:
traverse in class Export
Parameters:
start - is the first node to traverse

traverseDom

public void traverseDom(Chord start)
Treverse the dominator tree and construct the edges.


traversePDom

public void traversePDom(Chord start)
Treverse the dominator tree and construct the edges.


visitExpr

public void visitExpr(Expr e)
Overrides:
visitExpr in class Supertype

visitLoadExpr

public void visitLoadExpr(LoadExpr e)
Overrides:
visitLoadExpr in class Supertype

visitLiteralExpr

public void visitLiteralExpr(LiteralExpr e)
Specified by:
visitLiteralExpr in interface Predicate
Overrides:
visitLiteralExpr in class Supertype

visitExprChord

public void visitExprChord(ExprChord c)
Specified by:
visitExprChord in interface Predicate
Overrides:
visitExprChord in class Supertype

visitCallExpr

public void visitCallExpr(CallExpr e)
Overrides:
visitCallExpr in class Supertype

visitChord

public void visitChord(Chord c)
Overrides:
visitChord in class Supertype

visitLoopHeaderChord

public void visitLoopHeaderChord(LoopHeaderChord c)
Specified by:
visitLoopHeaderChord in interface Predicate
Overrides:
visitLoopHeaderChord in class Supertype

visitIfThenElseChord

public void visitIfThenElseChord(IfThenElseChord c)
Specified by:
visitIfThenElseChord in interface Predicate
Overrides:
visitIfThenElseChord in class Supertype