Global (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.design.kernel

## Class Global

- java.lang.Object
- - hlt.language.design.kernel.Expression
  - - hlt.language.design.kernel.ProtoExpression
    - - hlt.language.design.kernel.Global

- All Implemented Interfaces:
    Locatable

      public class Global
      extends ProtoExpression

- - ### Field Summary

    - ### Fields inherited from class hlt.language.design.kernel.Expression

      `VOID_ASSIGNMENTS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Global(Symbol symbol)`
    `Global(Tables tables, java.lang.String name)`
    `Global(Tables tables, java.lang.String name, Type type)`
    `Global(Tables tables, Symbol symbol)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CodeEntry` | `checkedCodeEntry()`
    `CodeEntry` | `codeEntry()`
    `void` | `compile(Compiler compiler)` This method compiles this expression in the context of the specified `Compiler`.
    `boolean` | `containsFreeName(java.lang.String name)` Returns `true` iff the specified name occurs free in this expression.
    `Expression` | `copy()` Returns a deep copy of this expression.
    `DefinedEntry` | `definedEntry()`
    `static Global` | `dummyCollection()`
    `static Global` | `dummyIndexable()`
    `static Global` | `dummyIndexSet()`
    `boolean` | `equals(java.lang.Object other)`
    `Type` | `filter()`
    `Global` | `globalConstant(Type type)`
    `Global` | `globalConstant(Type domain, Type range)`
    `boolean` | `isDefined()`
    `java.lang.String` | `name()`
    `void` | `resetCheckedType(Type type)`
    `void` | `setCheckedType()` This method sets the final unambiguously checked type of this expression, possibly along with other final information that may be needed by the compiler for generating code.
    `void` | `setCheckedType(Type type)` NB: this is not `final` because itis overridden in `Abstraction` and `Global`.
    `void` | `setCodeEntry(CodeEntry codeEntry)`
    `Type` | `sieve()`
    `Symbol` | `symbol()`
    `java.lang.String` | `toString()`
    `void` | `typeCheck(TypeChecker typeChecker)` This method type-checks this expression in the context of the specified `TypeChecker`.
    `void` | `typeCheck(Type type, TypeChecker typeChecker)` This method ascertains that this expression has the specified type in the context of the specified `TypeChecker`.
    `Expression` | `typedCopy()` Returns a deep copy of this expression this and all its subexpressions share the same type as their copy's counterparts.
    `ArrayList` | `viableTypes()`

    - ### Methods inherited from class hlt.language.design.kernel.ProtoExpression

      `checkedType, setType, type, typeRef`

    - ### Methods inherited from class hlt.language.design.kernel.Expression

      `addType, addTypes, boxSort, enclosingScope, extent, getEnd, getStart, isConstant, isEquality, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, numberOfSubexpressions, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, setSubexpression, shiftOffsets, shiftOffsets, sort, subexpression, substitute, typeCheck, typeCheckLocked`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Global

          public Global(Tables tables,
                java.lang.String name)

    - #### Global

          public Global(Tables tables,
                java.lang.String name,
                Type type)

    - #### Global

          public Global(Symbol symbol)

    - #### Global

          public Global(Tables tables,
                Symbol symbol)

  - ### Method Detail

    - #### copy

          public final Expression copy()

      Description copied from class: `Expression`
      Returns a deep copy of this expression. The types are not not copied. NB: This is a convenience for building expressions that should be used exclusively before any processing (in particular sanitizing), is done on this expression.
      Specified by:
        `copy` in class `Expression`

    - #### typedCopy

          public final Expression typedCopy()

      Description copied from class: `Expression`
      Returns a deep copy of this expression this and all its subexpressions share the same type as their copy's counterparts. NB: This is a convenience for building expressions that should be used exclusively before any processing (in particular sanitizing), is done on this expression.
      Specified by:
        `typedCopy` in class `Expression`

    - #### dummyIndexSet

          public static final Global dummyIndexSet()

    - #### dummyIndexable

          public static final Global dummyIndexable()

    - #### dummyCollection

          public static final Global dummyCollection()

    - #### globalConstant

          public final Global globalConstant(Type type)

    - #### globalConstant

          public final Global globalConstant(Type domain,
                              Type range)

    - #### filter

          public final Type filter()

    - #### sieve

          public final Type sieve()

    - #### name

          public final java.lang.String name()

    - #### containsFreeName

          public final boolean containsFreeName(java.lang.String name)

      Description copied from class: `Expression`
      Returns `true` iff the specified name occurs free in this expression.
      Overrides:
        `containsFreeName` in class `Expression`

    - #### definedEntry

          public final DefinedEntry definedEntry()

    - #### checkedCodeEntry

          public final CodeEntry checkedCodeEntry()

    - #### setCheckedType

          public final void setCheckedType()

      Description copied from class: `Expression`
      This method sets the final unambiguously checked type of this expression, possibly along with other final information that may be needed by the compiler for generating code.
      Specified by:
        `setCheckedType` in class `Expression`

    - #### setCheckedType

          public final void setCheckedType(Type type)

      Description copied from class: `ProtoExpression`
      NB: this is not `final` because itis overridden in `Abstraction` and `Global`.
      Overrides:
        `setCheckedType` in class `ProtoExpression`

    - #### resetCheckedType

          public final void resetCheckedType(Type type)

    - #### symbol

          public final Symbol symbol()

    - #### codeEntry

          public final CodeEntry codeEntry()

    - #### setCodeEntry

          public final void setCodeEntry(CodeEntry codeEntry)

    - #### isDefined

          public final boolean isDefined()

    - #### viableTypes

          public final ArrayList viableTypes()

    - #### typeCheck

          public final void typeCheck(TypeChecker typeChecker)
                               throws TypingErrorException

      Description copied from class: `Expression`
      This method type-checks this expression in the context of the specified `TypeChecker`.
      Specified by:
        `typeCheck` in class `Expression`
      Throws:
        `TypingErrorException`

    - #### typeCheck

          public final void typeCheck(Type type,
                       TypeChecker typeChecker)
                               throws TypingErrorException

      Description copied from class: `Expression`
      This method ascertains that this expression has the specified type in the context of the specified `TypeChecker`. It amounts to first type-checking this expression in the type-checker, then making sure the type found for it by the type-checker agrees (i.e.unifies) with the specified type.
      Overrides:
        `typeCheck` in class `Expression`
      Throws:
        `TypingErrorException`

    - #### compile

          public final void compile(Compiler compiler)

      Description copied from class: `Expression`
      This method compiles this expression in the context of the specified `Compiler`.
      Specified by:
        `compile` in class `Expression`

    - #### equals

          public final boolean equals(java.lang.Object other)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public final java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`