Implementation of Type Checking
Language
When Type-Checking Performed
Type-checking Implemented Using
Compiled
Mostly Static
Symbol Table
Interpreted
Dynamic
Dynamic Descriptor for each Variable
Symbol Table
Constructed for an entire program
Declaration Statement: (Variable, Type) entered into Symbol Table
Assignment/Reference Statement: Variable verified for correct type
When Compilation exits Scope: Variable entry deleted from Symbol Table
Dynamic Descriptor
Maintained for each variable
Upon Assignment: (
Name
, Type, Value) entered into Descriptor
Upon Reference: Variable verified for correct type
Upon exiting Scope/Deallocation: Descriptor discarded