Advanced Programming [AP-18]

Code 301AA - 9 Credits


Andrea Corradini <>

Matteo Busi <>
Timetable Monday 11-13, Room Fib A1
Tuesday 9-11, Room Fib C1
Thursday 16-18, Room Fib L1
Office hours Click here
To fix a date, send an email to <>

Course description


Exam dates

Students can take the exam during exam sessions, but there are no fixed date. Please contact the lecturer by email to fix a date for the exam. Before the oral exam, students must have filled out the evaluation questionnaire accessible at page


The final grade is based on the evaluation of the programming assignments that will be proposed along the course, and on a final oral exam. During the oral exam the lecturer may ask questions about any of the topics presented during the course. The topic of the first part of the oral exam can be proposed by the student: precise instructions will be published at the end of the course.


In order to take full advantage of the course and of being able to pass the final exam in a reasonable time, students are required to have an undergraduate level knowledge of at least one object-oriented programming language (like Java, C++, C# or others) and of at least one functional programming language (like Haskell, OCaml, Scheme or others). Students having a weak background on such topics are strongly encouraged to review by themselves the core notions of Object-Oriented and Functional Programming at the beginning of the course, possibly exploiting the following online material:

For Functional Programming:

For Object-Oriented programming:

Reading material:

Reference documentation:

To be completed...

Course Schedule

Sep. 17, 2018
Presentation of the course Slides: AP-2018-01.pdf
Sep. 18, 2018
Languages and Abstract Machines
Compilation and interpretation schemes
Slides: AP-2018-03.pdf Suggested readings: Chapter 1 of Programming Languages: Principles and Paradigms by Maurizio Gabbrielli and Simone Martini
Sep. 20, 2018
Compilation and interpretation schemes
Entry test
Slides: AP-2018-03.pdf The entry test is intented to evaluate if students have the necessary prerequisites of the course, namely knowledge of concepts of Object-Oriented and Functional programming.
Sep. 24, 2018
Runtime Systems and Introduction to the JVM
Slides: AP-2018-04.pdf Suggested readings: JVM Internals, by James D. Bloom
Chapter 7: Run-time Enviroments Section 7.1, 7.2 and 7.4.1-2 of "The Dragon Book"
Reference documentation:
The Java Virtual Machine Specification, Java SE 8 Edition
The Java Language Specification, Java SE 8 Edition
Sep. 25, 2018
JVM internals
Slides: AP-2018-05.pdf
Sep. 27, 2018
The JVM Instruction Set
Slides: AP-2018-06.pdf Suggested readings: Chapter 2 of The Java Virtual Machine Specification, Java SE 8 Edition
Java Code To Byte Code - Part One, by James D. Bloom,
A First Taste of InvokeDynamic, by Charles Nutter,
Oct. 1, 2018
Room A1
Exercises: Inspecting the JVM
Students are invited to bring their own laptop.
Instructions: exercises_1.html
Software needed for the exercises:
Oct. 2, 2018
Software Components: an introduction Slides: AP-2018-07.pdf Suggested readings:
Chapters 1 and 4 of [COMP], Software Components: Beyond Object-Oriented Programming. C. Szyperski, D. Gruntz, S. Murer, Addison-Wesley, 2002.
Oct. 4, 2018
Software Components: the Sun approach, JavaBeans Slides: AP-2018-08.pdf Suggested readings:
Oct. 8, 2018
Reflection in Java Slides: AP-2018-09.pdf Suggested readings:
The Java Tutorial on Reflection API, excluding Arrays and Enumerated Types.
Oct. 9, 2018
Software Components: the Microsoft way Slides: AP-2018-10.pdf, till page 29 Suggested readings:
Chapter 15 of [COMP], sections 15.1, 15.2, 15.4, 15.11, and 15.12.
Oct. 11, 2018
Software Components: the Microsoft way (cont.) Slides: AP-2018-10.pdf, all.
Reflection in CLR and C#: optional reading.
Oct. 15, 2018
Room A1
Exercises: JavaBeans and Reflection in Java
  • Students are invited to bring their own laptop.
  • To optimize the lab activity, students may read the Oracle JavaBeans Tutorial
Instructions: exercises_2.html
Software needed for the exercises:
Oct. 16, 2018
Frameworks and Inversion of Control Slides: AP-2018-11.pdf Suggested readings: