Compilers
Module ID
Ε508
Semester
5
Hours/Week - ECTS
4 – 5
Konstantinos Kokkinos
Assistant Professor
Learning Outcomes
Upon completion of the course, students will be able to:
- understand programming languages through the process of syntactic analysis.
- study algorithms and data structures through the implementation of each compilation phase.
- understand the actual code running on a processor versus code being programmed at a higher level.
- understand the architecture of the computer that executes the code through the study of the execution mechanisms of the final code.
- study Instruction Set Architecture through optimizations and final code generation.
- design and implement a complete compiler, from its first to its last phase, and even as a team, so that the ability to collaborate is also developed.
Indicative Module Content
- theoretical background with the study of grammars, languages, automatons, and state machines, accompanied by the necessary repetition of special data structures, such as trees, graphs, and hash tables, as well as classical penetration and closure algorithms,
- lexical analysis of an initial program and its programming, both manually and automatically with the help of the tool “flex”,
- study of syntax analysis and construction of the syntax tree, both manually, where possible, and automatically with the help of the “bison” tool
- grammatical algorithms LL (1), LR (0), SLR (1), LR (k) and LALR (1),
- semantic analysis – checking formulas with the help of categorical grammars,
- intermediate code generation: illustration of abstract syntactic trees and quatrains,
- final code generation: command selection, binding of final architecture registrars,
- code optimizations,
- theoretical and laboratory exercises,
- programming work on the complete construction in C of a compiler of a programming language that is a simplified form of one of the languages FORTRAN, PASCAL, C ++