SubjectsSubjects(version: 945)
Course, academic year 2023/2024
   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 2023 to 2023
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
Teaching methods: full-time
Additional information: https://www.ksi.mff.cuni.cz/teaching/nswi098-web
Guarantor: RNDr. Jakub Yaghob, Ph.D.
Class: Informatika Bc.
Informatika Mgr. - Softwarové systémy
Classification: Informatics > Software Engineering
Annotation -
Last update: T_KSI (24.05.2005)
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.
Course completion requirements -
Last update: RNDr. Jakub Yaghob, Ph.D. (26.07.2022)

There will be 5 home assignments which are designed to incrementally build a compiler for simplified C language (called Cecko).

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

Furthermore, 350 points are required to receive a credit for the seminar (which is also required). If you are not satisfied with your mark, but you have at least 350 points (and thus the credit), you may request a written examination where your mark will be determined. Once subscribing for the exam, your mark received from the assignments is no longer valid — i.e., you may fail the exam even if you have enough points from the assignments.

Each assignment has a strict deadline. Once the deadline is reached, all assignments are collected and graded. You may submit your solution after the deadline and ask for (re)evaluation, but you will receive penalty 10 points per day for late submission, which is additionally subtracted from points obtained for the assignment.

Literature - Czech
Last update: T_KSI (24.05.2005)

Aho, Sethi, Ullman: Compilers - Principles, Techniques and Tools, Addison-Wesley 1986

Chytil M.: Automaty a gramatiky, SNTL 1984

Melichar B.: Konstrukce překladačů. ČVUT 1999

Grune, Bal, Jacobs, Langendoen: Modern Compiler Design, Wiley 2000

Syllabus -
Last update: RNDr. Jakub Yaghob, Ph.D. (22.04.2016)
  • 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

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

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.

 
Charles University | Information system of Charles University | http://www.cuni.cz/UKEN-329.html