09-02: Scope

09-03: Symbol Tables

09-04: Types

  1. The goal of type checking is to ensure that operations are used only with the correct types;
  2. Three kinds of languages:
    • Statically typed: All or almost all checking of types is done as part of compilation;
    • Dynamically typed: Almost all checking of types is done as part of program execution;
    • Untyped: No type checking.

09-05: Type Checking

09-06: Type Environments

  1. A type environment gives types for free variables:
    • A type environment is a function from ObjectIdentifiers to Types;
    • A variable is free in an expression if it not defines within the expression.