ΓραμματείαSecretariat: 2410 684574 | ΦοιτητικάStudents: 2410 684387 g-ds@uth.gr

Compilers

Module ID

Ε508

Semester

5

Hours/Week - ECTS

4 – 5

Learning Outcomes

  • a better understanding of programming languages ​​through the process of syntactic analysis,
  • practical study of algorithms and data structures through the implementation of each compilation phase,
  • perception of the actual code running on a processor in relation to high-level programmed code,
  • a better understanding of the architecture of the computer that executes the code through the study of the execution mechanisms of the final code,
  • practical study of the concept of Instruction Set Architecture through optimizations and final code generation,
  • developing the ability to design and implement a complete compiler, from the first to the last phase, and even in groups, to develop the ability to collaborate

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 ++