LECTURER | Andrea Corradini <andrea@di.unipi.it> |
Timetable | Monday 11-13, Room Fib C
Thursday 16-18, Room Fib C1 Friday 14-16, Room Fib L1 |
Office hours | Click here
To fix a date, send an email to <andrea@di.unipi.it> |
[NEXT ORAL EXAMS] Oral exams are scheduled for January 27, starting at 10:30 am and February 3, starting at 9 am. To register you must (1) send an email to the lecturer indicating the preferred date, and (2) register on https://esami.unipi.it/esami/studentportal.php for the written proof of February 12, indicating in the notes "Oral exam only". The latter is needed to guarantee that you filled in the evaluation of the course.
[ORAL EXAMS] Oral exams are scheduled for January 12, 20 and 21, starting at 9:30 (the place will be commmunicated later). To register you must (1) send an email to the lecturer indicating the preferred date, and (2) register on https://esami.unipi.it/esami/studentportal.php for the written proof of February 12, indicating in the notes "Oral exam only". The latter is needed to guarantee that you filled in the evaluation of the course.
[WRITTEN EXAMS] The next written exams are scheduled for January 14 and February 12. Registration on https://esami.unipi.it/esami/studentportal.php is mandatory.
The written exam will consist of exercises on the following topics only:
Presentation of the course
Abstract Machines Preliminary test |
Slides: PLP-2015-01.pdf | [GM], Chapter 1; | ||
Compilation and interpretation schemes Cross compilation and bootstrapping Structure of compilers |
Slides: PLP-2015-02.pdf | [Scott], Chapter 1 (sections 1-4 to 1-6). | ||
Overview of a syntax-directed compiler front-end (Context-Free) Grammars, Chomsky hierarchy; Parse trees; Ambiguity, associativity and precedence; Syntax-directed translation; Translation schemes; Predictive recursive descent parsing; Left factoring, elimination of left recursion. |
Slides: PLP-2015-03.pdf | [ALSU], Chapter 2. | ||
Overview of a syntax-directed compiler front-end Lexical analysis; Intermediate code generation; Static checking |
Slides: PLP-2015-04.pdf | [ALSU], Chapter 2. | ||
5 |
Oct. 2, 2015 |
Lexical analysis: Implementing critical parts of a scanner |
Slides: PLP-2015-05.pdf |
[ALSU], Chapter 3. |
6 |
Oct. 5, 2015 |
Towards generation of Lexical Analyzers |
Slides: PLP-2015-06.pdf |
[ALSU], Chapter 3. |
7 |
Oct. 8, 2015 |
Exercises on the topics presented so far, in particular on grammars and languages, Regular Expressions, Finite State Automata, Lexical Analysis. |
Proposed exercises: ES-PLP-2015-01-lexer.pdf |
You are invited to continue solving the exercises at home. If you have doubts about the text or want to discuss a solution with me, send me an email. |
8 |
Oct. 9, 2015 |
From DFAs to Regular Expressions and backwards
|
Slides: PLP-2015-07.pdf |
[ALSU], Chapter 3. |
9 |
Oct. 12, 2015 |
Introduction to Parsing |
Slides: PLP-2015-08.pdf |
[ALSU], Chapter 4. |
10 |
Oct. 15, 2015 |
Bottom-up Parsing |
Slides: PLP-2015-09.pdf |
[ALSU], Chapter 4. |
11 |
Oct. 16, 2015 |
Bottom-up Parsing |
Slides: PLP-2015-10.pdf |
[ALSU], Chapter 4. |
12 |
Oct. 19, 2015 |
Exercises on Parsing |
Proposed exercises: ES-PLP-2015-02-parser.pdf |
You are invited to continue solving the exercises at home. If you have doubts about the text or want to discuss a solution with me, send me an email. |
13 |
Oct. 22, 2015 |
Syntax-Directed Translation |
Slides: PLP-2015-11.pdf |
[ALSU], Chapter 5. |
14 |
Oct. 23, 2015 |
Programming Languages and Abstraction |
Slides: PLP-2015-12.pdf |
[Scott] Chapter 3, [GM] Chapter 4. |
15 |
Oct. 26, 2015 |
Static and dynamic scope; Modules |
Slides: PLP-2015-13.pdf, up to page 26. |
[Scott] Chapter 3, [GM] Chapter 4 and 5. |
16 |
Oct. 29, 2015 |
Implementation of static and dynamic scope |
Slides: PLP-2015-13.pdf, all |
[Scott] Chapter 3, [GM] Chapter 4 and 5. |
17 |
Oct. 30, 2015 |
Exercises |
|
|
18 |
Nov. 2, 2015 |
First Midterm Exam |
Where? Room A1 |
It is necessary to register at URL https://esami.unipi.it/esami/studentportal.php before Oct. 31, 2015. The exam will be about the material presented during the lectures up to and including Lesson 13 on "Syntax-Directed Translation". This is covered by Chapter 1 of [GM], Chapter 1 (sec. 1-4 to 1-6) of [Scott], and Chapters 2, 3, 4 and 5 of [ALSU], with the exception of Sections 4.7.5 and 4.7.6. |
19 |
Nov. 9, 2015 |
More on Denotationl Semantics |
Slides: PLP-2015-15.pdf |
[Scott] Chapter 3, [GM] Chapter 4 and 5. |
20 |
Nov. 12, 2015 |
Shallow and deep binding |
Slides: PLP-2015-16.pdf |
[Scott] Chapter 3 and 6.1, [GM] Chapter 7.2 and 6.1. |
21 |
Nov. 13, 2015 |
Value Model and Reference Model |
Slides: PLP-2015-18.pdf |
[Scott] Chapter 6.3-6.5, [GM] Chapter 6.2-6.4. |
22 |
Nov. 16, 2015 |
Logically- and Enumeration-Controlled Iteration |
Slides: PLP-2015-18.pdf |
[Scott] Chapter 6.5, [ALSU] Chapter 6. |
23 |
Nov. 19, 2015 |
Syntax-directed translation to Three Address Code |
Slides: PLP-2015-20.pdf |
[Scott] Chapter 6.5, [ALSU] Chapter 6. |
24 |
Nov. 20, 2015 |
Type systems, Type safety, Type checking |
Slides: PLP-2015-21.pdf |
[Scott] Chapter 7, [GM] Chapter 8, [ALSU] Chapter 6. |
25 |
Nov. 23, 2015 |
Array allocation and layout |
Slides: PLP-2015-22.pdf, up to page 40. |
[Scott] Chapter 7, [GM] Chapter 8, [ALSU] Chapter 6. |
26 |
Nov. 26, 2015 |
Pointers and Recursive Types; Pointers and Arrays in C. Control abstraction; Parameter Passing Modes and Mechanisms. |
Slides: PLP-2015-22.pdf, all. |
[Scott] Chapter 8, [GM] Chapter 7. |
27 |
Nov. 27, 2015 |
Data Abstraction; Obiect-Oriented Programming. |
Slides: PLP-2015-24.pdf |
[Scott] Chapter 9, [GM] Chapter 9-10. |
28 |
Nov. 30, 2015 |
Functional programming languages; Introduction to Haskell. |
Slides: PLP-2015-25.pdf |
[Scott] Chapter 10, [GM] Chapter 11, [Mitchell] Chapter 5 (Introduction to Haskell)
The GHC compiler for Haskell can be downloaded at http://www.haskell.org/platform |
29 |
Dec. 3, 2015 |
Type Classes in Haskel; Monads and the Maybe Monad. |
Slides: PLP-2015-26.pdf |
[Mitchell] Chapter 7 (Type classes in Haskell) |
30 |
Dec. 4, 2015 |
Monads as Containers and as Computations; the IO Monad; Recursion and Continuation Passing Style; Type inference in ML and Hskell. |
Slides: PLP-2015-27.pdf, all |
[Mitchell] Chapter 6: pages 118-136 (Type inference) |
31 |
Dec. 7, 2015 |
Scripting Languages |
Slides: PLP-2015-30.pdf |
[Scott] Chapter 13.
Students familiar with Java who are interested in the extensions to Java introduced in Java 8 may read the following slides about "Lambda expressions and Stream API in Java 8"
: |
32 |
Dec. 10, 2015 |
Code generation, Optimization. |
Slides: PLP-2015-31.pdf |
[ALSU] Chapter 8. |
33 |
Dec. 11, 2015 |
Code generation, Optimization (2). |
Slides: PLP-2015-32.pdf |
[ALSU] Chapter 8 and 9. |
34 |
Dec. 14, 2015 |
Data Flow Analysis and Machine Independent Optimization. |
Slides: PLP-2015-33.pdf |
[ALSU] Chapter 9. |