 |
Risorsa bibliografica obbligatoria |
 |
Risorsa bibliografica facoltativa |
|
Anno Accademico
|
2014/2015
|
Scuola
|
Scuola di Ingegneria Industriale e dell'Informazione |
Insegnamento
|
089182 - FORMAL LANGUAGES AND COMPILERS
|
Docente |
Morzenti Angelo Carlo
|
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 (434) INGEGNERIA INFORMATICA | * | A | ZZZZ | 072665 - LINGUAGGI FORMALI E COMPILATORI | M | ZZZZ | 089182 - FORMAL LANGUAGES AND COMPILERS | Ing Ind - Inf (Mag.)(ord. 270) - MI (481) COMPUTER SCIENCE AND ENGINEERING - INGEGNERIA INFORMATICA | * | M | ZZZZ | 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 (http://corsi.metid.polimi.it) there are samples of exam proofs with solutions. An oral proof, optional, is reserved for the candidates who have obtained a high grade in the written proof. The written proof is open-book (textbook and personal notes allowed).
|
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
|
|