edu.ksu.cis.projects.bogor.ast.checker
Class LegalInitialValueChecker

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.ast.ASTVisitor
      extended by edu.ksu.cis.projects.bogor.ast.checker.LegalInitialValueChecker

public final class LegalInitialValueChecker
extends ASTVisitor

Type description here.

Version:
CVS $Revision: 1.1 $ $Date: 2005/02/06 09:15:30 $
Author:
Matt Hoosier

Method Summary
static boolean isConst(Exp e, SymbolTable st)
           Determine if the expression is a legal initial value for a variable.
protected  void visitApplyExp(ApplyExp node)
           
protected  void visitArrayAccessExp(ArrayAccessExp node)
           
protected  void visitAtomicExp(AtomicExp node)
           
protected  void visitBinaryExp(BinaryExp node)
           
protected  void visitCastExp(CastExp node)
           
protected  void visitConditionalExp(ConditionalExp node)
           
protected  void visitExtExp(ExtExp node)
           
protected  void visitFieldAccessExp(FieldAccessExp node)
           
protected  void visitIdExp(IdExp node)
           
protected  void visitInstanceofExp(InstanceofExp node)
           
protected  void visitInvokeExp(InvokeExp node)
           
protected  void visitKindofExp(KindofExp node)
           
protected  void visitLetExp(LetExp node)
           
protected  void visitLiteralExp(LiteralExp node)
           
protected  void visitLockTestExp(LockTestExp node)
           
protected  void visitNewArrayExp(NewArrayExp node)
           
protected  void visitNewLockExp(NewLockExp node)
           
protected  void visitNewRecordExp(NewRecordExp node)
           
protected  void visitParenExp(ParenExp node)
           
protected  void visitStartThreadExp(StartThreadExp node)
           
protected  void visitThreadTestExp(ThreadTestExp node)
           
protected  void visitUnaryExp(UnaryExp node)
           
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.ASTVisitor
visitActionExtension, visitActionStatement, visitAssertAction, visitAssignAction, visitAssumeAction, visitASTArrayType, visitASTBooleanType, visitASTDoubleType, visitASTExtType, visitASTFloatType, visitASTFunType, visitASTIntRangeType, visitASTIntType, visitASTLockType, visitASTLongRangeType, visitASTLongType, visitASTStringType, visitASTThreadIdType, visitAtomicActionStatement, visitAtomicStatement, visitBlockStatement, visitBlockTransformation, visitBooleanConstant, visitBooleanLiteral, visitCatch, visitChooseStatement, visitConstantDefinition, visitDoubleConstant, visitDoubleLiteral, visitEnumDefinition, visitExitThreadAction, visitExpAction, visitExpExtension, visitExtensionDefinition, visitField, visitFloatConstant, visitFloatLiteral, visitFSM, visitFun, visitGlobal, visitGotoNextState, visitIdPrintArg, visitIdType, visitIfStatement, visitInitialValue, visitIntConstant, visitIntLiteral, visitInvokeAction, visitInvokeTransformation, visitLiveSet, visitLocal, visitLocation, visitLockAction, visitLongConstant, visitLongLiteral, visitNullLiteral, visitParam, visitPrintAction, visitRecordDefinition, visitReturnNextState, visitReturnStatement, visitSkipStatement, visitStringConstant, visitStringLiteral, visitStringPrintArg, visitSystem, visitThrowAction, visitTryCatchStatement, visitTypeAliasDefinition, visitTypedId, visitTypeExtension, visitVirtualTableDefinition, visitWhileStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isConst

public static boolean isConst(Exp e,
                              SymbolTable st)

Determine if the expression is a legal initial value for a variable.

Numeric and string literals, const references, enumerated type elements, and the null object literal are allowed.


visitApplyExp

protected void visitApplyExp(ApplyExp node)
Overrides:
visitApplyExp in class ASTVisitor

visitArrayAccessExp

protected void visitArrayAccessExp(ArrayAccessExp node)
Overrides:
visitArrayAccessExp in class ASTVisitor

visitAtomicExp

protected void visitAtomicExp(AtomicExp node)
Overrides:
visitAtomicExp in class ASTVisitor

visitBinaryExp

protected void visitBinaryExp(BinaryExp node)
Overrides:
visitBinaryExp in class ASTVisitor

visitCastExp

protected void visitCastExp(CastExp node)
Overrides:
visitCastExp in class ASTVisitor

visitConditionalExp

protected void visitConditionalExp(ConditionalExp node)
Overrides:
visitConditionalExp in class ASTVisitor

visitExtExp

protected void visitExtExp(ExtExp node)
Overrides:
visitExtExp in class ASTVisitor

visitFieldAccessExp

protected void visitFieldAccessExp(FieldAccessExp node)
Overrides:
visitFieldAccessExp in class ASTVisitor

visitIdExp

protected void visitIdExp(IdExp node)
Overrides:
visitIdExp in class ASTVisitor

visitInstanceofExp

protected void visitInstanceofExp(InstanceofExp node)
Overrides:
visitInstanceofExp in class ASTVisitor

visitInvokeExp

protected void visitInvokeExp(InvokeExp node)
Overrides:
visitInvokeExp in class ASTVisitor

visitKindofExp

protected void visitKindofExp(KindofExp node)
Overrides:
visitKindofExp in class ASTVisitor

visitLetExp

protected void visitLetExp(LetExp node)
Overrides:
visitLetExp in class ASTVisitor

visitLiteralExp

protected void visitLiteralExp(LiteralExp node)
Overrides:
visitLiteralExp in class ASTVisitor

visitLockTestExp

protected void visitLockTestExp(LockTestExp node)
Overrides:
visitLockTestExp in class ASTVisitor

visitNewArrayExp

protected void visitNewArrayExp(NewArrayExp node)
Overrides:
visitNewArrayExp in class ASTVisitor

visitNewLockExp

protected void visitNewLockExp(NewLockExp node)
Overrides:
visitNewLockExp in class ASTVisitor

visitNewRecordExp

protected void visitNewRecordExp(NewRecordExp node)
Overrides:
visitNewRecordExp in class ASTVisitor

visitParenExp

protected void visitParenExp(ParenExp node)
Overrides:
visitParenExp in class ASTVisitor

visitStartThreadExp

protected void visitStartThreadExp(StartThreadExp node)
Overrides:
visitStartThreadExp in class ASTVisitor

visitThreadTestExp

protected void visitThreadTestExp(ThreadTestExp node)
Overrides:
visitThreadTestExp in class ASTVisitor

visitUnaryExp

protected void visitUnaryExp(UnaryExp node)
Overrides:
visitUnaryExp in class ASTVisitor