 |
Risorsa bibliografica obbligatoria |
 |
Risorsa bibliografica facoltativa |
|
Anno Accademico
|
2015/2016
|
Scuola
|
Scuola di Ingegneria Industriale e dell'Informazione |
Insegnamento
|
089182 - FORMAL LANGUAGES AND COMPILERS
|
Docente |
Breveglieri Luca Oddone
|
Cfu |
5.00
|
Tipo insegnamento
|
Monodisciplinare
|
Corso di Studi |
Codice Piano di Studio preventivamente approvato |
Da (compreso) |
A (escluso) |
Insegnamento |
Ing Ind - Inf (Mag.)(ord. 270) - MI (481) COMPUTER SCIENCE AND ENGINEERING - INGEGNERIA INFORMATICA | * | A | M | 089182 - FORMAL LANGUAGES AND COMPILERS |
Programma dettagliato e risultati di apprendimento attesi |
Course target
The final objective of the course consists of learning the concepts, the algorithms and the automated tools that are used to define artificial languages and to translate them into other languages, that is, used for compilation.
Detailed programme of lecture classes
-
Definition of language, theory of formal languages, regular expressions, context-free grammars, ambiguity, grammars of regular (rational) languages, syntax trees, properties of the families of regular (rational) and context-free languages, main syntactic structures and limitations of the context-free languages.
-
Analysis and recognition (parsing) of phrases, phrase recognition algorithms (parsing algorithms) and automata, finite deterministic and non-deterministic automata, pushdown automata, deterministic languages, ascending and recursive descending syntactic analysis, and Early parsing algorithm.
-
Syntax-driven translation, direct and inverse translation, language homomorphim and substitution, syntactic translation schemata, transducer automata, and syntactic analysis and translation.
-
Semantic translation driven by syntax, semantic functions and attribute grammars, hints to compiler structure and design, examples of sematic check and translation, one-pass and multiple-pass computation of the attributes.
-
Static flow analysis of programs.
Detailed programme of exercise classes
-
Modelisation of the lexicon and the syntax of a simple programming language (C-like).
-
Design of a compiler for translation into an intemediate executable machine language (a register-based processor, M68000-like).
-
Use of the automated programming tools Flex and Bison for the construction of syntax-driven lexical and syntactic analysers and translators.
Course prequisites
- Notions of theoretical computer science: theory of automata, predicate calculus (order zero and one),
recursion theory and decidability, computational complexity.
- Notions of algorithm and data structure theory.
- Notions of programming and knowledge of the C language (some skill is required in writing a new program
and in extending an existing one).
|
Note Sulla Modalità di valutazione |
The exam consists of a written proof, divided in two parts (theory and exercise - see above). On the course website (on the BeeP platform) there are samples of exam proofs with solutions. An oral proof, optional, is reserved, at the discretion of the teacher, for the candidates who have obtained a high grade in the written proof, or in cases when issues concerning the written exam need to be clarified. The written proof is open-book (textbook and personal notes allowed).
|
Stefano Crespi Reghizzi, Luca Breveglieri, Angelo Morzenti, Formal Languages and Compilation, Editore: Spinger, Anno edizione: 2013, ISBN: 978-1-4471-5514-0 http://www.springer.com/computer/theoretical+computer+science/book/978-1-4471-5513-3
Stefano Crespi Reghizzi, Luca Breveglieri, Angelo Morzenti, Linguaggi formali e compilazione Nuova edizione 2015, Editore: Esculapio, Anno edizione: 2015, ISBN: 978-88-7488-875-7 Note:Italian version of the English textbook by the same authors
|
Nessun software richiesto |
Tipo Forma Didattica
|
Ore didattiche |
lezione
|
34.0
|
esercitazione
|
18.0
|
laboratorio informatico
|
0.0
|
laboratorio sperimentale
|
0.0
|
progetto
|
0.0
|
laboratorio di progetto
|
0.0
|
Informazioni in lingua inglese a supporto dell'internazionalizzazione |
Insegnamento erogato in lingua

Inglese
|
Disponibilità di materiale didattico/slides in lingua inglese
|
Disponibilità di libri di testo/bibliografia in lingua inglese
|
Possibilità di sostenere l'esame in lingua inglese
|
Disponibilità di supporto didattico in lingua inglese
|
|