scale.callGraph
Class ClefCalls

java.lang.Object
  extended by scale.clef.DescendPredicate
      extended by scale.callGraph.ClefCalls
All Implemented Interfaces:
DeclPredicate, ExprPredicate, Predicate, StmtPredicate, TypePredicate

public class ClefCalls
extends DescendPredicate

This class is used to build the call graph from a Clef AST.

$Id: ClefCalls.java,v 1.33 2007-10-04 19:58:02 burrill Exp $

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


Constructor Summary
ClefCalls(CallGraph cg)
          Generate the call graph by scanning the Clef AST.
 
Method Summary
 void visitAddressLiteral(AddressLiteral al)
           
 void visitAggregationElements(AggregationElements ag)
           
 void visitCallOp(CallOp fun)
           
 void visitDeclaration(Declaration n)
           
 void visitFileDecl(FileDecl f)
           
 void visitIdReferenceOp(IdReferenceOp id)
           
 void visitRoutineDecl(RoutineDecl rd)
           
 void visitType(Type n)
           
 void visitValueDecl(ValueDecl vd)
           
 
Methods inherited from class scale.clef.DescendPredicate
visitAbsoluteValueOp, visitAdditionAssignmentOp, visitAdditionOp, visitAddressOp, visitAggregateOp, visitAggregateType, visitAllocArrayType, visitAllocatePlacementOp, visitAllocateSettingFieldsOp, visitAltCase, visitAndConditionalOp, visitAndOp, visitArithmeticIfStmt, visitArrayType, visitAssignedGotoStmt, visitAssignLabelStmt, visitAssignmentOp, visitAssignSimpleOp, visitAtomicType, visitBitAndAssignmentOp, visitBitAndOp, visitBitComplementOp, visitBitOrAssignmentOp, visitBitOrOp, visitBitShiftAssignmentOp, visitBitShiftOp, visitBitXorAssignmentOp, visitBitXorOp, visitBlockStmt, visitBooleanLiteral, visitBooleanType, visitBound, visitBreakStmt, visitCallFunctionOp, visitCaseLabelDecl, visitCaseStmt, visitCharacterType, visitCharLiteral, visitChildren, visitComplexLiteral, visitComplexOp, visitComplexType, visitCompositeType, visitCompoundAssignmentOp, visitComputedGotoStmt, visitContinueStmt, visitDeclStmt, visitDefOp, visitDeleteArrayOp, visitDeleteOp, visitDereferenceOp, visitDivisionAssignmentOp, visitDivisionOp, visitDoLoopStmt, visitDyadicOp, visitEnumElementDecl, visitEnumerationType, visitEqualityOp, visitEquivalenceDecl, visitEvalStmt, visitExceptionDecl, visitExitStmt, visitExponentiationOp, visitExpression, visitExpressionIfOp, visitFieldDecl, visitFixedArrayType, visitFloatArrayLiteral, visitFloatLiteral, visitFloatType, visitForLoopStmt, visitFormalDecl, visitFortranCharType, visitForwardProcedureDecl, visitGotoStmt, visitGreaterEqualOp, visitGreaterOp, visitHeapOp, visitIdAddressOp, visitIdValueOp, visitIfStmt, visitIfThenElseStmt, visitIncompleteType, visitIncrementOp, visitIntArrayLiteral, visitIntegerType, visitIntLiteral, visitLabelDecl, visitLabelStmt, visitLessEqualOp, visitLessOp, visitLiteral, visitLoopStmt, visitMaximumOp, visitMinimumOp, visitModulusOp, visitMonadicOp, visitMultiBranchStmt, visitMultiplicationAssignmentOp, visitMultiplicationOp, visitNegativeOp, visitNilOp, visitNode, visitNotEqualOp, visitNotOp, visitNullStmt, visitNumericType, visitOrConditionalOp, visitOrOp, visitParenthesesOp, visitPointerType, visitPositiveOp, visitPostDecrementOp, visitPostIncrementOp, visitPreDecrementOp, visitPreIncrementOp, visitProcedureDecl, visitProcedureType, visitRaise, visitRaiseWithObject, visitRaiseWithType, visitRealType, visitRecordType, visitRefType, visitRemainderAssignmentOp, visitRemainderOp, visitRenamedVariableDecl, visitRepeatUntilLoopStmt, visitRepeatWhileLoopStmt, visitReturnStmt, visitSelectIndirectOp, visitSelectOp, visitSeriesOp, visitSignedIntegerType, visitSizeofLiteral, visitStatement, visitStatementOp, visitStringLiteral, visitSubscriptAddressOp, visitSubscriptOp, visitSubscriptValueOp, visitSubstringOp, visitSubtractionAssignmentOp, visitSubtractionOp, visitSwitchStmt, visitTernaryOp, visitTestLoopStmt, visitThisOp, visitTranscendental2Op, visitTranscendentalOp, visitTypeConversionOp, visitTypeDecl, visitTypeName, visitUnionType, visitUnknownFormals, visitUnsignedIntegerType, visitVaArgOp, visitVaCopyOp, visitVaEndOp, visitVarArgOp, visitVariableDecl, visitVaStartOp, visitVoidType, visitWhileLoopStmt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClefCalls

public ClefCalls(CallGraph cg)
Generate the call graph by scanning the Clef AST. Create a call graph of call nodes.

Parameters:
cg - the call graph which will be constructed
See Also:
CallGraph
Method Detail

visitDeclaration

public void visitDeclaration(Declaration n)
Specified by:
visitDeclaration in interface DeclPredicate
Overrides:
visitDeclaration in class DescendPredicate

visitFileDecl

public void visitFileDecl(FileDecl f)
Specified by:
visitFileDecl in interface DeclPredicate
Overrides:
visitFileDecl in class DescendPredicate

visitType

public void visitType(Type n)
Specified by:
visitType in interface TypePredicate
Overrides:
visitType in class DescendPredicate

visitRoutineDecl

public void visitRoutineDecl(RoutineDecl rd)
Specified by:
visitRoutineDecl in interface DeclPredicate
Overrides:
visitRoutineDecl in class DescendPredicate

visitIdReferenceOp

public void visitIdReferenceOp(IdReferenceOp id)
Specified by:
visitIdReferenceOp in interface ExprPredicate
Overrides:
visitIdReferenceOp in class DescendPredicate

visitCallOp

public void visitCallOp(CallOp fun)
Specified by:
visitCallOp in interface ExprPredicate
Overrides:
visitCallOp in class DescendPredicate

visitValueDecl

public void visitValueDecl(ValueDecl vd)
Specified by:
visitValueDecl in interface DeclPredicate
Overrides:
visitValueDecl in class DescendPredicate

visitAggregationElements

public void visitAggregationElements(AggregationElements ag)
Specified by:
visitAggregationElements in interface ExprPredicate
Overrides:
visitAggregationElements in class DescendPredicate

visitAddressLiteral

public void visitAddressLiteral(AddressLiteral al)
Specified by:
visitAddressLiteral in interface ExprPredicate
Overrides:
visitAddressLiteral in class DescendPredicate