ADVANCED PROGRAMMING LANGUAGES
- Academic year
- 2024/2025 Syllabus of previous years
- Official course title
- ADVANCED PROGRAMMING LANGUAGES
- Course code
- CM0632 (AF:513723 AR:286756)
- Modality
- On campus classes
- ECTS credits
- 6
- Degree level
- Master's Degree Programme (DM270)
- Educational sector code
- INF/01
- Period
- 1st Semester
- Course year
- 1
- Where
- VENEZIA
- Moodle
- Go to Moodle page
Contribution of the course to the overall degree programme goals
We will look at the principles underpinning the functional, object-oriented and concurrent paradigms and analyze their practice and implementation in mainstream programming languages. Most of the development will focus on Scala, but we will draw also from other statically typed languages such as ML, Java (and Rust?) as well as on dynamically typed languages like python.
Expected learning outcomes
To learn the foundational techniques for reasoning about programs and their correctness.
To understand the programming techniques associated with various language features. The study of programming languages is, in part, the study of conceptual frameworks for problem solving, software construction, and development.
Pre-requirements
Contents
- Evolution of programming languages design and implementation
- Introduction to functional programming and Scala.
Typing foundations of programming languages
- Applied Lambda Calculus. Syntax and operational semantics
- Typing: types, type systems, type safety (with TALC)
Functional data and function modeling in Scala
- Immutable non-encapsulated data structures in Scala
- Lists and trees: first-order, higher-order and polymorphic functions
Subtyping and subtype polymorphism
- The substitution principle and the subtype relation
- Typing and Subtyping: nominal vs structural
Object-Oriented data modeling (in Scala)
- Encapsulated data types: Scala’s traits, classes, and hierarchy of types,
Type parametrization
- Generics, variance and type bounds
- Collections
Ad hoc polymorphism
- From overloading to constrained parametric polymorphism (with F-bounded polymorphism)
- Qualified types and type classes
Strict vs Non-strict evaluation
- Evaluations strategies: foundations and implementation consequences
- Lazy evaluation at work: thunks, lazy lists and infinite data structures
Error handling
- Exceptions: strengths, weaknesses and alternatives.
- Options and Try computations in Scala
Monads and monadic programming
- Conceptual framework
- Applications
Referral texts
Artima Press. 2021.
[FP-Scala] Functional Programming in Scala. P. Chiusano, R. Bjarnason. Manning Press. 2015
Source code available at: https://github.com/fpinscala/fpinscala/
[TAPL] Types and Programming Languages. B.C. Pierce. The MIT Press. 2002.
Assessment methods
The written exam assesses the ability to apply the formal and programming techniques presented in class. The in-depth discussion evaluates the ability to understand how these techniques can be extended and/or adapted to other contexts.
The final grade is the result of the weighted sum of written test (80%) and discussion (20%).
Teaching methods
Teaching language
Further information
Companion courses (some of ...)
- Silvia Crafa at the University of Padua: https://elearning.unipd.it/math/course/view.php?id=886
- Uday Reddy at Bham: https://www.cs.bham.ac.uk/~udr/popl/
- Kathleen Fisher at Tufts: https://www.cs.tufts.edu/comp/150PLD/
Scala
- https://dotty.epfl.ch/
Python Typing:
- https://realpython.com/python-type-checking/
Asynchronous programming in Scala:
- https://alexn.org/blog/2017/01/30/asynchronous-programming-scala/
- https://www.packt.com/asynchronous-programming-futures-and-promises/
- https://blog.hgadgil.com/general-programming/asynchronous-programming-scala-future/
- https://docs.scala-lang.org/overviews/core/futures.html
Error Handling in Scala
- https://blog.rockthejvm.com/idiomatic-error-handling-in-scala/
- https://mauricio.github.io/2014/02/17/scala-either-try-and-the-m-word.html
Monads in Scala:
- https://medium.com/free-code-camp/demystifying-the-monad-in-scala-cc716bb6f534