LECTURER
Tutor |
Andrea Corradini
<andrea@di.unipi.it>
Matteo Busi <matteo.busi@di.unipi.it> |
Timetable | Monday 11-13, Room Fib A1
Tuesday 9-11, Room Fib N1 Thursday 16-18, Room Fib N1 |
Office hours | Friday, 9-11.
Alternatively, to fix a date send an email to <andrea@di.unipi.it> |
For Functional Programming:
For Object-Oriented programming:
Presentation of the course |
Slides: AP-2019-01.pdf
AP-2019-02.pdf |
|||
Languages and Abstract Machines Compilation and interpretation schemes |
Slides: AP-2019-03.pdf | Suggested readings: Chapter 1 of Programming Languages: Principles and Paradigms by Maurizio Gabbrielli and Simone Martini | ||
Compilation and interpretation schemes (end), Runtime System (start). Entry test |
Slides: AP-2019-03.pdf AP-2019-04.pdf, till slide 9. |
Suggested readings: Chapter 7: Run-time Enviroments Section 7.1, 7.2 and 7.4.1-2 of "The Dragon Book" 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. |
||
The Java Virtual Machine, Runtime Data Areas, Multithreading, Dynamic Linking, ... |
Slides: AP-2019-04.pdf, till slide 35. |
Suggested readings: JVM Internals, by James D. Bloom http://blog.jamesdbloom.com/JVMInternals.html Chapters 1 and 2 of The Java Virtual Machine Specification, Java SE 13 Edition Reference documentation: The Java Language Specification, Java SE 13 Edition |
||
The JVM: linking and loading, verification, initialition and finalization. The JVM Instruction Set, start. |
Slides: AP-2019-04.pdf, all. AP-2019-06.pdf, till slide 5. |
Suggested readings: Finalization of Class Instances, Section 12.6 of The Java Language Specification, Java SE 13 Edition |
||
The JVM Instruction Set |
Slides: AP-2019-06.pdf, all. |
Suggested readings:
Section 2.11 and Chapter 3 of
The Java Virtual Machine Specification, Java SE 13 Edition Java Code To Byte Code - Part One, by James D. Bloom, http://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne.html |
||
Room A1 |
Exercises: Inspecting the JVM Students are invited to bring their own laptop. |
Instructions: exercises_1.html Files: javaSources_1.zip |
Software needed for the exercises:
|
|
Software Components: an introduction | Slides: AP-2019-07.pdf |
Suggested readings: Chapter 1 and Chapter 4 of [COMP], Component Software: Beyond Object-Oriented Programming. C. Szyperski, D. Gruntz, S. Murer, Addison-Wesley, 2002. |
||
Software Components: the Sun approach, JavaBeans | Slides: AP-2019-08.pdf |
Suggested readings:
|
||
Java Enterprise Edition (J2EE) and Enterprise Java Beans (EJB) Reflection in programming languages |
Slides:
AP-2019-08-EE.pdf AP-2019-09.pdf, till page 6. |
Suggested readings: |
||
Reflection in Java Annotations in Java |
Slides: AP-2019-09.pdf, till page 48 |
Suggested readings: The Java Tutorial on Reflection API, excluding Arrays and Enumerated Types. The Java Tutorial on Annotations. |
||
Annotations in Java Software Components: the Microsoft way |
Slides:
AP-2019-09.pdf, all. AP-2019-10.pdf, till page 28. |
Suggested readings: The Java Tutorial on Annotations. |
||
Room A1 |
Exercises: JavaBeans and Reflection in Java
|
Instructions: exercises_2.html Files: javaSources_2.zip |
Software needed for the exercises:
|
|
The .NET Framework, Delegates in C# |
Slides:
AP-2019-10.pdf, all. |
Suggested readings: |
||
Frameworks and Inversion of Control | Slides: AP-2019-11-Frameworks-IoC.pdf, till page 35. |
Suggested readings:
|
||
Room A1 |
Exercises: JavaBeans and Reflection in Java
|
We propose to continue the exercises of the last time, possibily addressing also the two new exercises added to the end. Instructions: exercises_3.html |
Software needed for the exercises:
|
|
On Designing Software Frameworks | Slides:
AP-2019-11-Frameworks-IoC.pdf, all AP-2019-12-DesigningFrameworks.pdf, till page 21. |
Suggested readings: |
||
On Designing Software Frameworks (cont.)
Polymorphism:
|
Slides: AP-2019-12-DesigningFrameworks.pdf, all AP-2019-13-Polymorphism.pdf (Polymorphism) AP-2019-14-Cpp-Templates.pdf (C++ templates), till page 7 |
Suggested readings:
|
||
Universal Parametric Polymorphism: C++ Templates and Java Generics
|
Slides:
AP-2019-14-Cpp-Templates.pdf (C++ templates) all AP-2019-15-JavaGenerics.pdf (Java Generics), till page 19. |
Suggested readings:
|
||
|
Slides:
AP-2019-15-JavaGenerics.pdf (Java Generics), all. AP-2019-16-STL.pdf (STL), till page 18. |
Suggested readings:
|
||
The Standard Template Library for C++ Introduction to Functional Programming
|
Slides:
AP-2019-16-STL.pdf (STL), all. AP-2019-17-Func.pdf, till page 12. |
Suggested readings:
|
||
|
Slides: AP-2019-17-Func.pdf, all. AP-2019-18-Lambda.pdf, till page 10. |
Suggested readings:
| ||
More on lambda-calculus and on Haskell
|
Slides:
AP-2019-18-Lambda.pdf, till page 16 AP-2019-19-MoreFunc.pdf, till page 16 |
Suggested readings: | ||
There will be no lesson on Thursday, November 7 | ||||
Aula A1 |
Exercises on Functional Programming in Haskell. Students are invited to bring their own laptop. |
Instructions: exercises_4.html |
If you are new to functional programming, or if you want to refresh the essence of it, I strongly recommend reading the blog
Mary Rose Cook,
A practical introduction to functional programming, if you did not yet.
Students are invited to install the Glasgow Haskell Compiler and Interpreter (GHCI) downloadable
from https://www.haskell.org/platform/ |
|
On efficiency in functional languages Tail recursion optimization Type classes in Haskell |
Slides: AP-2019-19-MoreFunc.pdf, pages 18-25 AP-2019-20-TypeClasses.pdf, till page 18. |
Suggested readings:
|
||
Presentation of programming assigments on NetBeans, JavaBeans and Reflection in Java. |
First programming assignment [Suggested deadline: November 30, 2019]
|
|
||
Type classes, Constructor Classes and Monads in Haskell |
Slides: AP-2019-21-Monads.pdf, till page 21. |
Suggested readings: |
||
Lesson canceled because of weather alert. | ||||
The IO Monad in Haskell Lambda expressions in Java 8 |
Slides:
AP-2019-21-Monads.pdf, all AP-2019-22-JavaLambdas.pdf, till page 6. |
Suggested readings:
|
||
Nov. 21, 2019 |
Lambda expressions in Java 8 The Stream API in Java 8 |
Slides:
AP-2019-22-JavaLambdas.pdf, all AP-2019-23-JavaStreams.pdf |
Suggested readings:
|
|
Nov. 22, 2019 - 16-18 Aula A1 |
Exercises on Functional Programming and Type Classes in Haskell. Students are invited to bring their own laptop. |
Old exercises: exercises_4.html New exercises: exercises_5.html |
An excellent tutorial on Haskell: http://learnyouahaskell.com | |
Nov. 25, 2019 Aula A1 |
Exercises on the Stream API and on partial functions in Java 8. |
Instructions: exercises_6.html Auxiliary file: people.csv |
Suggested readings: Use of Optional in Java, http://www.oracle.com/technetwork/articles/java/java8-optional-2175753.html |
|
Nov. 26, 2019 |
The RUST programming language | AP-2019-24-Rust.pdf |
Suggested readings: Reference documentation of Rust: |
|
Nov. 28, 2019 |
Scripting Languages | Slides: AP-2019-25-Scripting.pdf |
Suggested readings:
| |
Dec. 2, 2019 |
Exercises on the Stream API and on partial functions in Java 8 (cont.). |
Instructions: exercises_6.html Auxiliary file: people.csv |
Suggested readings: Use of Optional in Java, http://www.oracle.com/technetwork/articles/java/java8-optional-2175753.html |
|
Dec. 3, 2019 |
Introduction to Python
|
Slides: AP-2019-26-Python.pdf |
Suggested readings:
| |
Dec. 5, 2019 |
Lesson canceled | Students are strongly encouraged to take part to the event Theses presentation Event for StudEntS, see http://theses.di.unipi.it/ | ||
Dec. 9, 2019 |
Invited Lecture by Mario Fusco | Comparing different concurrency models on the JVM | Slides: https://www.slideshare.net/mariofusco/comparing-different-concurrency-models-on-the-jvm | |
Dec. 10, 2019 |
More about Python
|
Slides: AP-2019-27-Python-OOP.pdf, till page 31. |
| |
Dec. 12, 2019 |
|
AP-2019-27-Python-OOP.pdf, all. AP-2019-28-GIL-etAl.pdf |
| |
Dec. 13, 2019 Aula A1 - 16-18 |
Exercises on Python Students are invited to bring their own laptop. |
Instructions: exercises_6.html Auxiliary files: anagram.txt, people.csv
|
||
Dec. 16, 2019 |
Exercises on Python Students are invited to bring their own laptop. |
Instructions: exercises_6.html Auxiliary files: anagram.txt, people.csv
|
||
Second programming assignment [Suggested deadline: January 6, 2020] |
|