Learning objectives
The course aims at providing students with the ability to understand the principles of programming languages and the modern programming techniques, according to the main different paradigms:
• Basics of language theories and compilers
• Object-oriented programming
• Generic programming
• Functional programming
The abilities to apply the listed knowledge elements regard mainly multi-paradigm development, fit for the context of distributed, heterogeneous and parallel systems:
• Handle correctly data and code in text form
• Acknowledge and use features shared by various languages
• Use static analysis to obtain robust and performant code
• Use polymorphism and metaprogramming to raise the level of abstraction
• Use functional programming for integrity and parallel computation
Prerequisites
No propedeutic courses. However, students are expected to possess good basic abilities in structured and object-oriented programming.
Course unit content
1. Introduction to formal languages
2. Object-oriented programming
3. Generic programming
4. Functional programming
5. Dynamic languages and metaprogramming
Full programme
1. Introduction to formal languages (12 hours in classroom and 4 in lab)
a. Chomsky classification
b. Regular expressions
c. Context free grammars
d. Syntactic analysis and parser generators
e. Syntax trees and code generation
2. Object-oriented programming (4 hours in classroom and 2 in lab)
. Introduction
a. Object-oriented programming in C++14
b. Comparison with other languages: Java, Python, Go
3. Generic programming (4 hours in classroom and 2 in lab)
. Introduction
a. C++ templates and STL
4. Functional programming paradigm (8 hours in classroom and 4 in lab)
. Introduction
a. Presentation of LISP
b. Programming in Haskell
c. Functional features of C++14
d. Parallel programming in C++14
5. Dynamic languages and metaprogramming (4 hours in classroom and 2 in lab)
. Introduction
a. Dynamic features of C++14
b. Dynamic and scripting languages
c. Metaprogramming in Python
Bibliography
• M. Gabbrielli, S. Martini (2011). Linguaggi di programmazione - Principi e paradigmi. 9788838665738.
• M. Lipovaca (2012). Learn You a Haskell for Great Good. 9781593272838. http://learnyouahaskell.com/
• S. B. Lippman, J. Lajole, B. E. Moo (2013). C++ Primer. 9780321714111
Teaching methods
Classroom lessons, using slides available to students in advance. Possibility to adopt the Flipped Classroom approach and seminars for some subjects. Programming exercises in laboratory.
Assessment methods and criteria
The exam consists of a written test, a programming test, which can also be performed during the lab exercitations, and the presentation of a final project, which should apply multi-paradigm development to a real case.
Other information
Alternative and supplementary texts
• J. E. Hopcroft (2009). Automi, linguaggi e calcolabilità. 9788871925523.
• A. V. Aho, M. S. Lam, R. Sethi, J. D. Ullman (2009). Compilatori - Principi, tecniche e strumenti. 9788871925592.
• B. Stroustrup (2015). C++ - Linguaggio, libreria standard, principi di programmazione. 9788865184486.
2030 agenda goals for sustainable development
- - -