- Docente: Roberto Gorrieri
- Credits: 12
- SSD: INF/01
- Language: Italian
- Moduli: Roberto Gorrieri (Modulo 1) Maurizio Gabbrielli (Modulo 2) Saverio Giallorenzo (Modulo 3)
- Teaching Mode: Traditional lectures (Modulo 1) Traditional lectures (Modulo 2) Traditional lectures (Modulo 3)
- Campus: Bologna
- Corso: First cycle degree programme (L) in Computer Science (cod. 8009)
-
from Sep 22, 2025 to Dec 16, 2025
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: Roberto Gorrieri
http://www.cs.unibo.it/~gorrieri/
The evolution of programming languages. From assembly to higher level languages. Abstract machines, intepreters and compilers. 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.
Second module, second semester; instructors: Maurizio Gabbrielli and Saverio Giallorenzo
http://www.unibo.it/SitoWebDocente/default.htm?UPN=maurizio.gabbrielli%40unibo.it
https://www.unibo.it/sitoweb/saverio.giallorenzo2
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).
Readings/Bibliography
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 new English edition:
Maurizio Gabbrielli, Simone Martini, Saverio Giallorenzo. Programming Languages: Principles and Paradigms [http://www.springer.com/computer/book/978-3031341434]. Springer, 2023. ISBN 978-3031341434 .
Teaching methods
Lectures
Assessment methods
Written and oral examinations.
The written exam is composed of 8 exercises on various subjects of the course. The written exam is evaluated with a grade up to 32, where each exercise contributes up to 4. During the written examination, that lasts 120 minutes, the student cannot consult textbooks or handnotes.
Written exams, limited to one or more modules of the course, may be offered; if these are passed, then there is no need to pass the written exam.
The validity of a written exam is limited within a session, for a total of three: summer, autumn and winter sessions. The oral exam follows the written exam and can be taken only if the written exam is evaluated with a grade of 16/30, in the same session.
During the oral exam, that lasts about 20-30 minutes, the student will be asked to answer questions about all the topics of the course. The oral exam is evaluated with a mark up to 30. The mark is decided depending on the preparation with respect to the topics included on the programme of the course, the critical capability to analyze them, the proficiency about the specific terminology and the ability to link the various subjects of the course.
The final grade, up to 30, is computed as the average of the grades of the written and oral examinations.
Teaching tools
https://virtuale.unibo.it/course/view.php?id=35781
http://www.cs.unibo.it/~gorrieri/LP/lp.html (login:esame password:linguaggi)
http://www.cs.unibo.it/~gabbri/corsi/linguaggi.html
Links to further information
https://virtuale.unibo.it/course/view.php?id=35781
Office hours
See the website of Roberto Gorrieri
See the website of Maurizio Gabbrielli
See the website of Saverio Giallorenzo
SDGs


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