81941 - COMPILATORI E INTERPRETI

Academic Year 2017/2018

  • Docente: Cosimo Laneve
  • Credits: 6
  • SSD: INF/01
  • Language: Italian
  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: Second cycle degree programme (LM) in Computer Science (cod. 8028)

Learning outcomes

This course aims at teaching the techniques underlying the construction of compilers and interpreters. We will address the problems for designing high-level programming languages, as well as the tools used to perform syntax-directed translation and to implement execution environments of low-level codes. The techniques that will be described are nowadays used in several areas, whenever it is necessary a syntax-direct analysis of symbolic expressions, of (semi) structured documents, of domain-specific languages, and their translation into more low-level descriptions. Possible applications range from person-computer interaction to advanced techniques of software engineering, including also the analysis and verification of programs. Furthermore, discussing the issues related to tenvironments where high-level code is translated and executed, we will addressspecific aspects related to programming languages such as types and the object-oriented programming.

Course contents

Introduction (compilers and interpreters). ANTLR. Lesson Analysis. Syntactic Analysis (recursive descent parser, LL parser, LR). Semantic analysis (symbol table, type checking). Intermediate code generation. Virtual Machine and Interpreter.

Readings/Bibliography

  • Grune-Jacobs: Parsing Techniques — A Practical Guide. 2008. Downloadable from https://dickgrune.com/Books/PTAPG_1st_Edition/
  • Gabbrielli-Martini: Linguaggi di Programmazione, Principi e Paradigmi, 2011
  • Terence Parr: Language Implementation Patterns. 2010
  • material on the e-learning website

Teaching methods

Lectures, computing laboratory

Assessment methods

Written examination and/or home project.

Teaching tools

Projector, blackboard, laptop, computing laboratory

Links to further information

https://www.unibo.it/sitoweb/cosimo.laneve/teachings

Office hours

See the website of Cosimo Laneve