LECTURER
Tutor |
Andrea Corradini
<andrea.corradini@unipi.it>
Laura Bussi <laurabussi@live.it> |
Virtual classroom |
Advanced Programming Team
To be used only for the first lesson and in case of sanitary emergence. |
Timetable | Tuesday 9:00 - 11:00, Room L1
Wednesday 9:00 - 11:00, Room A1 Friday 16:00 - 18:00, Room L1 |
Office hours | By appointment sending an email to <andrea@di.unipi.it>. |
Presentation of the course |
Slides: AP-2022-01-CourseOverview.pdf
AP-2021-02-MotivationsIntro.pdf Video of first lesson |
This lesson will be given both in presence and in streaming on Teams. The next lessons will be offered in presence only. | ||
Students attending the course are asked to fill in this FORM, thanks! | ||||
Syntax, Semantics and Pragmatics Programming languages and Abstract Machines Compilation and interpretation schemes |
Slides: AP-2022-03-Compilation-Interpretation.pdf | Suggested readings: Chapter 1 of Programming Languages: Principles and Paradigms by Maurizio Gabbrielli and Simone Martini | ||
The Java Virtual Machine: architecture and runtime data areas. | Slides: AP-2022-04-Intro2JVM.pdf, till page 32. |
Suggested readings: Chapter 7: Run-time Enviroments Section 7.1, 7.2 and 7.4.1-2 of "The Dragon Book" |
||
The Java Virtual Machine: Initialization, Verification and Finalization. The JVM Instruction Set: properties, format and addressing modes. |
Slides: AP-2022-04-Intro2JVM.pdf, all. AP-2022-05-JVM-InstructionSet.pdf, till page 12. |
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 17 Edition Reference documentation: The Java Language Specification, Java SE 17 Edition |
||
The JVM Instruction Set, end. |
Slides: AP-2022-05-JVM-InstructionSet.pdf, all. |
Suggested readings:
Section 2.11 and Chapter 3 of The Java Virtual Machine Specification, Java SE 17 Edition Java Code To Byte Code - Part One, by James D. Bloom, http://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne.html |
||
Exercises: Inspecting Java bytecode and the JVM |
Proposed Exercises: Inspecting the JVMInstructions: exercises-1-2022.pdfOther files: GCstrange.java, WrongQueue.java |
For this lesson, please be sure to have installed:
|
||
Software Components: an introduction | Slides: AP-2022-06-SoftwareComponentsIntro.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-2022-07.JavaBeans.pdf |
Suggested readings:
|
||
Reflection in Java Annotations in Java |
Slides: AP-2022-08-Reflection.pdf. |
Suggested readings: The Java Tutorial on Reflection API, excluding Arrays and Enumerated Types. The Java Tutorial on Annotations. |
||
Polymorphism:
|
Slides: AP-2022-09-Polymorphism.pdf AP-2022-10-Templates.pdf, till page 10.
Compiler Explorer: https://godbolt.org/ |
Suggested readings:
|
||
Universal Parametric Polymorphism: C++ Templates and Java Generics
|
Slides:
AP-2022-10-Templates.pdf (C++ templates) all AP-2022-11-Generics.pdf (Java Generics), till page 16.
Compiler Explorer: https://godbolt.org/ |
Suggested readings: Java Generics tutorials: |
||
Exercises: Java Beans, Reflection and Annotations |
Instructions: exercises_2.html |
Suggested activity: To get ready for the exercises we will propose, practice with Netbeans and with the use/development of Java Beans reading the Oracle JavaBeans Tutorial You can send your solutions to the lecturer <andrea.corradini@unipi.it> and to Laura <laurabussi@live.it>, to get a feedback. |
||
Covariance of Arrays in Java Limitations of Generics. The Standard Template Library for C++ |
Slides:
AP-2022-11-Generics.pdf (Java Generics), all. AP-2022-12-STL.pdf (STL), till slide 15
|
Suggested readings: Covariance and Contravariance in C# https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/covariance-contravariance/ |
||
The Standard Template Library for C++ (cont.) Introduction to Functional Programming
|
Slides:
AP-2022-12-STL.pdf (STL), all AP-2022-13-FP.pdf (Functional Programming), till pag. 11. |
Suggested readings:
|
||
Core concepts on Haskell | Slides: AP-2022-13-FP.pdf (Functional Programming), all. |
Suggested readings: see previous lesson |
||
|
Slides: AP-2022-14-Lambda.pdf |
Suggested readings:
| ||
More on Haskell
|
Slides: AP-2022-15-Haskell2.pdf, till page 18. |
Suggested readings: | ||
Exercises on fuctional programming with Haskell |
Instructions: exercises_3.html | -->
Students are invited to install the Glasgow Haskell Compiler and Interpreter (GHCI) downloadable
from https://www.haskell.org/downloads/ |
||
Type classes in Haskell |
Slides: AP-2022-16-TypeClasses_inference.pdf, till page 37. |
Suggested readings:
|
||
Type inference Constructor Classes and Monads in Haskell |
Slides: AP-2022-16-TypeClasses_inference.pdf, all. AP-2022-17-Monads.pdf, till page 14. |
Suggested readings:
|
||
The lesson of Friday, November 4 is canceled because of unavailability of the lecturer | ||||
More on Constructor Classes and Monads in Haskell Input-Output in Hakell: the IO Monad Type (un)safety in Haskell: unsafePerformIO |
Slides: AP-2022-17-Monads.pdf, all. |
Suggested readings: |
||
Proposed exercises on Type Classes in Haskell |
Exercises on Type Classes in Haskell: exercises_4.html |
|||
Lambda expressions in Java 8 | Slides: AP-2022-18-JLambdas.pdf |
Suggested readings:
|
||
The Stream API in Java 8 | Slides: AP-2022-19-JStreams.pdf. |
Suggested readings:
|
||
Software Components: the Microsoft way (start) |
Slides: AP-2022-20-20-MS-Components.pdf, till page 44. |
Suggested readings:
|
||
This lesson will start at 4:30 PM, in Room L1 as usual. Software Components: the Microsoft way (end) |
Slides:
AP-2022-20-20-MS-Components.pdf, all. Short presentation of the programming assigments on JavaBeans and Reflection in Java. |
Suggested readings:
|
||
Programming assigments on JavaBeans and Reflection in Java. |
First programming assignment
[Suggested deadline: December 20, 2022] |
|||
Frameworks and Inversion of Control | Slides: AP-2021-22-IOC.pdf |
Suggested readings:
.NET Core and Microsoft Strategies Invited lesson by Prof. Antonio Cisternino held on Oct. 22, 2020 |
||
Proposed exercises on Java Stream API |
Exercises on Java Stream API: exercises_5.html Auxiliary file: people.csv |
|||
On Designing Software Frameworks | Slides: AP-2022-22-DesigningFrameworks.pdf |
Suggested readings: |
||
The RUST programming language: An introduction (Part 1) | Slides: AP-2022-23-RUST.pdf, till page 25. |
Suggested readings: Reference documentation on Rust: |
||
The RUST programming language: An introduction (Part 2) | Slides: AP-2022-23-RUST.pdf, till page 45. |
Suggested readings: Reference documentation on Rust: |
||
The RUST programming language: An introduction (Part 3) Introduction to Python |
Slides:
AP-2022-23-RUST.pdf, all. AP-2022-25-Python.pdf. |
Suggested readings:
| ||
An overview of Python concepts:
|
Slides: AP-2022-26-Python-OOP.pdf. |
Suggested readings:
|
||
Second programming assignment |