LECTURER | Andrea Corradini <andrea@di.unipi.it> |
Timetable (second semester) | Tuesday 9-11, Room Fib L1 Friday 11-13, Room Fib A1 |
Office hours | Click here |
N. |
DATE |
Topics |
Slides |
Notes |
1 |
Nov. 10, 2014 |
Introduction |
|
[GM], Chapter 1; [Scott], Chapter 1 (section 1-4 to 1-6). |
2 |
Nov. 13, 2014 |
Structure of Compilers |
|
[ALSU], Chapter 2. |
3 |
Nov. 17, 2014 |
Structure of Compilers |
|
[ALSU], Chapter 2. |
4 |
Nov. 20, 2014 |
Lexical analysis |
|
[ALSU], Chapter 3. |
5 |
Nov. 24, 2014 |
Lexical analysis |
|
[ALSU], Chapter 3. |
6 |
Nov. 27, 2014 |
From Regular Expression to DFA, directly |
|
[ALSU], Chapter 3. |
7 |
Dec. 1, 2014 |
Exercises on Lexical analysis |
Proposed exercises: ES-PLP-2014-01-lexer.pdf |
See the (non-marked) exercises proposed in [ALSU], Chapter 3, concerning the topics presented in class. |
8 |
Dec. 4, 2014 |
Top-Down Parsing |
|
[ALSU], Chapter 4. |
9 |
Dec. 11, 2014 |
Bottom-Up Parsing |
|
[ALSU], Chapter 4. |
10 |
Dec. 15, 2014 |
LR parsing: Ambiguous grammars and Error detection; Exercises on parsing |
|
[ALSU], Chapter 4. |
11 |
Dec. 18, 2014 |
First Midterm Exam The text of the exam is published on the Moodle platform |
Where? Room A |
It is necessary to register at URL https://esami.unipi.it/esami/studentportal.php before Dec. 12, 2014. The exam will be about the material presented during the lessons and covered by Chapter 1 of [GM], Chapter 1 (sec. 1-4 to 1-6) of [Scott], and Chapters 2, 3 and 4 of [ALSU], with the exception of Sections 4.7.5, 4.7.6 and 4.9. |
12 |
Tue, Feb. 24, 2015 |
Syntax-Directed Translation I |
|
[ALSU], Chapter 5. |
13 |
Fri, Feb. 27, 2015 |
Syntax-Directed Translation II |
|
[ALSU], Chapter 5. |
14 |
Tue, Mar. 3, 2015 |
Intermediate Code Generation I Intermediate representations; Three address statements and their implementations; Syntax-directed translation to three address statements; Handling local names and scopes with symbol tables. |
|
[ALSU], Chapter 6. |
15 |
Tue, Mar. 10, 2015 |
Intermediate Code Generation II Declarations of (multi-dimensional) arrays; Access to elements of arrays; Logical and relational expressions; Flow-of-control statements with backpatching lists. |
|
[ALSU], Chapter 6. |
16 |
Wed, Mar. 11, 2015 |
Static Analysis Checking Static versus Dynamic Checking; Type checking; Type conversion and coercion. |
|
[ALSU], Chapter 6. |
17 |
Fri, Mar. 13, 2015 |
Exercises on Syntax-Directed Definitions and Translation Schemes |
Proposed exercises: ES-PLP-2014-02-syntax-directed.pdf |
[ALSU], Chapters 5 and 6. |
18 |
Tue, Mar. 17, 2015 |
Code Generation I
|
|
[ALSU], Chapter 8. Command line calculator with Flex/Lex and Yacc/Bison - Lex specification: calc.l; Yacc specification: calc.y; Dot representation of the parser FSA: parser.dot; Simple makefile: Makefile; dot can be found at http://www.graphviz.org/. |
19 |
Fri, Mar. 20, 2015 |
Code Generation II
|
|
[ALSU], Chapters 8 and part of 9.
|
20 |
Tue, Mar. 24, 2015 |
Concepts of Programming Languages: An Introduction
|
|
[Scott] Chapter 1, Sections 1-1 to 1-3.
|
21 |
Fri, Mar. 27, 2015 |
Bootstrapping, Names and Binding Times
|
|
[Scott] Chapter 3, [GM] Chapter 4.
|
22 |
Tue, Mar. 31, 2015 |
Object allocation and Scoping rules
|
|
[Scott] Chapter 3, [GM] Chapters 4 and 5.
|
23 |
Thu, Apr. 16, 2015 |
More on scopes, their implementation and closures
|
|
[Scott] Chapter 3, [GM] Chapters 4 and 5.
|
24 |
Fri, Apr. 17, 2015 |
Control flow: Expression evaluation, Structured flow, Selection statements
|
|
[Scott] Chapter 6, [GM] Chapter 6.
|
25 |
Tue, Apr. 21, 2015 |
Control flow: Iteration, Iterators and Recursion
|
PLP-22.pdf, up to page 32.
|
[Scott] Chapter 6, [GM] Chapter 6.
|
26 |
Fri, Apr. 24, 2015 |
Continuation-passing style
|
PLP-22.pdf, pages 33-36,
|
[Scott] Chapter 7, [GM] Chapter 8. Type systems; Type safety; Type checking [Equivalence, compatibility and coercion]; Primitive and composite types [Discrete and scalar types; tuples and records] |
27 |
Tue, Apr. 28, 2015 |
Composite types
|
PLP-24.pdf, up to page 36.
|
[Scott] Chapter 7, [GM] Chapter 8. Composite Types: Arrays, Unions, Pointers. Value model vs. reference model of variables.
|
28 |
Wed, Apr. 29, 2015 |
Composite types
|
PLP-24.pdf, pages 36-43
|
[Mitchell] Chapter 6: pages 118-136 (Type inference)
|
29 |
Tue, May 5, 2015 |
Parameter Passing
|
PLP-26.pdf
|
[Scott] Section 8.3 (Parameter Passing)
The GHC compiler for Haskell can be downloaded at http://www.haskell.org/platform |
30 |
Thu, May 7, 2015 |
Introduction to Haskell
|
PLP-27.pdf
|
[Mitchell] Chapter 7 (Type classes in Haskell)
|
31 |
Tue, May 12, 2015 |
Type classes in Haskell
|
PLP-28.pdf
|
[Mitchell] Chapter 7 (Type classes in Haskell)
|
32 |
Fri, May 15, 2015 |
The IO Monad of Haskell
|
|
Reading material about Haskell Monads: A list of tutorials on Monads: https://wiki.haskell.org/Monad_tutorials_timeline
|
33 |
Tue, May 19, 2015 |
Lambda expressions and Stream API in Java 8
|
|
Reading material:
|
34 |
Fri, May 22, 2015 |
Exercises
|
Proposed exercises: ES-PLP-2014-03-ProgLang-Various.pdf
|
|
35 |
Tue, May 26, 2015 |
Exercises
|
Proposed exercises: ES-PLP-2014-04-ProgLang-Various.pdf
|
|
36 |
May 29, 2015 |
Second Midterm Exam The text of the exam is published on the Moodle platform |
Where? Room Fib-C |
It is necessary to register at URL https://esami.unipi.it/esami/studentportal.php before May 27, 2015. The midterm exam will be about the material presented during the lessons of the second semester, and covered by the following chapters:
|
|
|
|
|
|