Lab for Automated Reasoning and Analysis LARA

Lecture 06a: Simple Semantic Analysis

Scopes of Symbols

Implementation: Symbol Tables and Error Reporting

Type Checking Rules for a Simple Language

Type Rules: local rules that say how types should agree on each syntax tree node. Can be used to derive type checking algorithms:

  • bottom-up: constants have types, variables have types (from declarations), so propagate through operators
  • top-down: resulting expressions have types, deduce the types of argument operators
  • combination

Rules are declarative specifications, they do not directly say in which direction to propagate


cc10/lecture_06a.txt · Last modified: 2010/10/27 12:30 by vkuncak
© EPFL 2018 - Legal notice