Handling Errors in DeclarationsTopAnnouncementsType Checking

Type Checking

  1. Type checking is basically the enforcement of a set of rules designed to ensure that only valid operands are provided to the various operations that can be invoked within a program.

  2. To make the enforcement of such rules possible within a compiler, the compiler must have an encoding that can be used to represent the types associated with expressions by the rules of the type system.

  3. Structured types are not really "described" by any single structure. Instead, the descriptors for structured types act as the roots of trees of descriptors that represent the full structure of the type.

  4. One aspect of the type rules of a language that determines the degree to which the trees/graphs representing types must be traversed is the language's definition of type compatibility or "matching"

  5. No matter how type equivalence is defined, there are usually lots of things to check.

  6. Semantic processing routines often return values that summarize the properties of the sub-phrases to which they were applied.

Computer Science 434
Department of Computer Science
Williams College

Handling Errors in DeclarationsTopAnnouncementsType Checking