org.overturetool.vdmj.typechecker
Class ModuleEnvironment

java.lang.Object
  extended by org.overturetool.vdmj.typechecker.Environment
      extended by org.overturetool.vdmj.typechecker.ModuleEnvironment

public class ModuleEnvironment
extends Environment

Define the type checking environment for a modular specification.


Field Summary
 
Fields inherited from class org.overturetool.vdmj.typechecker.Environment
funcDefinition, outer
 
Constructor Summary
ModuleEnvironment(Module module)
           
 
Method Summary
 ClassDefinition findClassDefinition()
          Find the enclosing class definition, if any.
 DefinitionSet findMatches(LexNameToken name)
          Find functions and operations of the given basic name.
 Definition findName(LexNameToken name, NameScope scope)
          Find a name in the environment of the given scope.
 StateDefinition findStateDefinition()
          Find the state defined in the environment, if any.
 Definition findType(LexNameToken name)
          Find a type in the environment.
 boolean isStatic()
          True if the calling context is a static function or operation.
 boolean isSystem()
          True if this is a VDM-RT "system" environment.
 boolean isVDMPP()
          True if this is a VDM++ environment.
 java.lang.String toString()
           
 void unusedCheck()
          Check whether any definitions in the environment were unused.
 
Methods inherited from class org.overturetool.vdmj.typechecker.Environment
dupHideCheck, getFuncDefinition, listAlternatives, setFuncDefinition, unusedCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleEnvironment

public ModuleEnvironment(Module module)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

findName

public Definition findName(LexNameToken name,
                           NameScope scope)
Description copied from class: Environment
Find a name in the environment of the given scope.

Specified by:
findName in class Environment

findType

public Definition findType(LexNameToken name)
Description copied from class: Environment
Find a type in the environment.

Specified by:
findType in class Environment

findMatches

public DefinitionSet findMatches(LexNameToken name)
Description copied from class: Environment
Find functions and operations of the given basic name.

Specified by:
findMatches in class Environment

unusedCheck

public void unusedCheck()
Description copied from class: Environment
Check whether any definitions in the environment were unused.

Specified by:
unusedCheck in class Environment

findStateDefinition

public StateDefinition findStateDefinition()
Description copied from class: Environment
Find the state defined in the environment, if any.

Specified by:
findStateDefinition in class Environment

isVDMPP

public boolean isVDMPP()
Description copied from class: Environment
True if this is a VDM++ environment.

Specified by:
isVDMPP in class Environment

isSystem

public boolean isSystem()
Description copied from class: Environment
True if this is a VDM-RT "system" environment.

Specified by:
isSystem in class Environment

findClassDefinition

public ClassDefinition findClassDefinition()
Description copied from class: Environment
Find the enclosing class definition, if any.

Specified by:
findClassDefinition in class Environment

isStatic

public boolean isStatic()
Description copied from class: Environment
True if the calling context is a static function or operation.

Specified by:
isStatic in class Environment


Copyright © 2009. All Rights Reserved.