04138 - Programming Languages

Course Unit Page


This teaching activity contributes to the achievement of the Sustainable Development Goals of the UN 2030 Agenda.

Gender equality Decent work and economic growth

Academic Year 2020/2021

Learning outcomes

At the end of the course, the student will know the principal techniques for defining the syntax and the semantics of the most common programming languages; they will also know how to implement the principal constructs.

Course contents

First module, first semester; instructor:


The evolution of programming languages. From assembly to higher level languages. Abstract machines, intepreters and compilers. Environment, scoping rules and their implementation. Stack of the activation records; heap. Memory management: garbage collection. Sequence control, procedures, recursion. Types and type checking. Parameters and parameter passing: by value, by reference, by result, by name. Functional parameters; closures. Exceptions. The object-oriented paradigm: classes and objects, initialization, inheritance and late-binding. Subtyping is not inheritance. The logical paradigm. The functional paradigm (Scala). The concurrent paradigm and service-oriented computing (Jolie).

Second module, second semester; instructor:Roberto Gorrieri


Description of a programming language: syntax, semantics, pragmatics and implementation. Syntax (BNF). Structured Operational Semantics (SOS). Regular grammars, regular expressions, and finite automata: equivalences and principal theorems (e.g., pumping lemma). Design of lexical analysers. Lex. Context free grammars and push-down automata: equivalences and principal theorems (e.g., pumping theorem). Deterministic context free grammars: algorithms for parsing; grammars LL(1), LR(0), SLR, LR(1), LALR(1). YACC.


Maurizio Gabbrielli, Simone Martini Linguaggi di programmazione: principi e paradigmi. Seconda edizione. McGraw-Hill Italia, 2010. ISBN 88-386-6573-8.
For the second module, one can use also the English translation of the first edition:
Maurizio Gabbrielli, Simone Martini. Programming Languages: Principles and Paradigms [http://www.springer.com/computer/book/978-1-84882-913-8]. Springer, April 2010. ISBN 978-1-84882-913-8. Series Undergraduate Topics in Computer Science, UTiCS [http://www.springer.com/series/7592] .

Teaching methods


Assessment methods

Written and oral examinations. The examination covers both modules.

Teaching tools



http://www.cs.unibo.it/~gorrieri/LP/lp.html (login:esame password:linguaggi)


Office hours

See the website of Roberto Gorrieri

See the website of Maurizio Gabbrielli