Subject: Semantic Analysis.
Text: Read Appel 5.1 (only pp.103–105), 5.3-5.4, pp.125–133 and pp.150–173. C does not have higher order functions, so you may skip p.126 when reading. Similarly, due to the lack of nested functions in C, you may ignore the parts on static links starting on p.133
Prerequisites: basic knowledge of C programming language
Comments: In this lecture we should study variable scopes, type checking and stack frames. The typechecking shall be illustrated using excerpts from the Appel's implementation and from the lcc compiler. Do not strive to understand all the details of the code fragments. The goal is to understand the essence of the type checking algorithm. The major part of this lecture is devoted to stack allocation discipline and calling conventions. We shall first approach the problem in general terms (using the explanation by Andrew Appel) and then make it very concrete for our architecture (using the TI documentation). We shall not describe the architecture in detail, yet. Only discuss properties of some registers.
Time: Monday, Feb 19, 8:30–10:00. Room NJV14 3-119
Tutorial: 10:15–12:00. Room your group office.
Resources: