SubjectsSubjects(version: 996)
Course, academic year 2026/2027
   
Compiler Principles - NSWI098
Title: Principy překladačů
Form of teaching: lecture+practicals
Guaranteed by: Department of Software Engineering (32-KSI)
Faculty: Faculty of Mathematics and Physics
Actual: from 2026
Duration in semesters: 1
Semester: winter
E-Credits: 6
Hours per week, examination: winter s.:2/2, C+Ex [HT]
Capacity: unlimited
Maximum number of enrolled students: 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://teaching.mff.cuni.cz/nswi098-web
Repeated enrollment: 2 / 2 / 2 / 2
Guarantor: RNDr. David Bednárek, Ph.D.
Teacher(s): RNDr. David Bednárek, Ph.D.
RNDr. Miroslav Kratochvíl, Ph.D.
Class: Informatika Bc.
Informatika Mgr. - Softwarové systémy
Classification: Informatics > Software Engineering
Incompatibility : NUPA016
Interchangeability : NUPA016
Is incompatible with: NUPA016
Is interchangeable with: NUPA016
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 -

To get credit, students need to complete the exercises assigned in class and pass the credit test during the semester.

The exam is oral with a written preparation.

Last update: Bednárek David, RNDr., Ph.D. (24.08.2026)
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
  • Runtime support; memory organization for procedural languages; JIT compilation

Last update: Bednárek David, RNDr., Ph.D. (24.08.2026)
Course registration requirements -

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

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

Last update: Bednárek David, RNDr., Ph.D. (24.08.2026)
 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html