LARA Lecture 06: Semantic Analysis Intro Scopes of Symbols Identifiers vs Symbols Example Simple Language with Local Variables Scoping Rules Affect Program Meaning Notation for Maps Type Checking Rules for a Simple Language Idea of Type Rules Type Rules using Environment Type Rules for Statements and Expressions Type Rule for Block Statement Example for Type Checking Implementation: Symbol Tables and Error Reporting Symbol Table Contents Functional versus Imperative Maps An Efficient Imperative Map Functional Maps To read at home: Efficient Comparison for Identifiers Notion of Hash-Consing Reporting Errors Based on Syntax Tree Continued in Lecture 07 References Tiger book, Chapters 4, 5 Name Analysis from Compilation'07 Type Analysis from Compilation'07 Types and Programming Languages Book