SubjectsSubjects(version: 964)
Course, academic year 2024/2025
   Login via CAS
Compiler Principles - NSWI098
Title: Principy překladačů
Guaranteed by: Department of Software Engineering (32-KSI)
Faculty: Faculty of Mathematics and Physics
Actual: from 2024
Semester: winter
E-Credits: 6
Hours per week, examination: winter s.:2/2, MC [HT]
Capacity: unlimited
Min. number of students: unlimited
4EU+: no
Virtual mobility / capacity: no
State of the course: taught
Language: Czech
Teaching methods: full-time
Additional information: https://www.ksi.mff.cuni.cz/teaching/nswi098-web
Guarantor: RNDr. David Bednárek, Ph.D.
Teacher(s): RNDr. David Bednárek, Ph.D.
Class: Informatika Bc.
Informatika Mgr. - Softwarové systémy
Classification: Informatics > Software Engineering
Pre-requisite : NTIN071
Annotation -
Introductory compiler course concentrates primarily on theoretical and practical principles of fore-end compiler construction. Exercises emphasise elementary using of tools for compiler construction. A student will be capable to construct his/her own compiler into an intermediate code or an another language after finishing this course.
Last update: T_KSI (24.05.2005)
Course completion requirements -

There will be 5 home assignments which are designed to incrementally build a compiler for a subset of the C language.

You may receive up to 100 points for assignments #1 and #2 and up to 150 points for assignments #3-#5. The sum of your points will determine your final mark as follows:

600 or more - 1 (excellent)

450-599 - 2 (well done)

350-449 - 3 (OK)

349 or less - failed

Each assignment has a deadline, the penalty for late submission is 10 points per day.

Last update: Bednárek David, RNDr., Ph.D. (27.09.2024)
Literature - Czech
  • Thain, Introduction to Compilers and Language Design, 2nd edition, 2020, ISBN: 979-8-655-18026-0
  • Aho, Lam, Sethi, Ullman: Compilers - Principles, Techniques and Tools, 2nd Edition, Pearson Education 2006, ISBN 0-201-10088-6
  • Grune, Bal, Jacobs, Langendoen: Modern Compiler Design, Wiley 2000
  • Aho, Sethi, Ullman: Compilers - Principles, Techniques and Tools, Addison-Wesley 1986

Last update: Bednárek David, RNDr., Ph.D. (27.09.2024)
Syllabus -
  • Typical compiler structure for procedural languages
  • Intermediate codes; internal representation of a compiled program
  • Lexical and syntax analyses; top-down analysis: LL(k) grammars, implementation by recursive-descent; bottom-up analysis: LR(1) grammars and parsers, modified construction SLR{1), LALR(1); Flex, Bison
  • Semantic analysis; link with syntax analysis; attributes; basic tasks of semantic analysis for procedural languages
  • Intermediate code generation
  • High-level optimizations, e.g. constant folding, common subexpression elimination, algebraic transformations; basic block, control flow, data flow, live-range analysis, other analysis techniques
  • Modern processor architectures and their impact on compilers; fundamental units of code generator
  • Interpreted languages
  • Runtime support; memory organization for procedural languages

Last update: Yaghob Jakub, RNDr., Ph.D. (22.04.2016)
Entry requirements -

Important parts of the course are home assignments in C++. Required language features are covered by the course NPRG041. It is possible to visit the course NSWI098 simultaneously with the course NPRG041.

The course TIN071 Automata and Grammars is necessary to master the theory of the course and without theory it is impossible to master the practical exercises of the course.

Last update: Yaghob Jakub, RNDr., Ph.D. (26.07.2022)
 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html