Programming Languages and Compilers
Code | Completion | Credits | Range | Language |
---|---|---|---|---|
BI-PJP.21 | Z,ZK | 5 | 2P+1C | Czech |
- Garant předmětu:
- Lecturer:
- Tutor:
- Supervisor:
- Department of Theoretical Computer Science
- Synopsis:
-
Students learn basic compiling methods of programming languages. They are introduced to intermediate representations used in current compilers GNU and LLVM. They learn to create a specification of a translation of a text that conforms a given syntax, to a target code and also to create a compiler based on the specification. The compiler can translate not only a programming language but any text in a language generated by a given LL input grammar.
- Requirements:
-
The theory of automata and grammars, basic knowledge of programming (C and C++).
Theory of automata and grammars in the scope of BIE-AAG.21, basic knowledge of programming (C and C++).
A prerequisite for enrollment in BIE-PJP.21 is that the student has earned at least credit for BI-AAG.21 in a previous semester.
- Syllabus of lectures:
-
1. Structure of a compiler, lexical analysis.
2. Deterministic top-down parsing: LL parsing.
3. [2] Implementing LL parsing, properties of LL grammars.
5. Transformations to LL(1) grammars, error recovery during LL parsing.
6. Formalisms for syntax-directed translation and semantics: translation and attributed grammar.
7. One-pass attributed translation directed by LL parsing, L-attributed grammars, examples of simple translations.
8. Data structures of a compiler, intermediate representations.
9. Abstract syntax tree, three address code - intermediate representations of GNU compiler.
10. Intermediate representations of the LLVM compiler.
11. An example of a simple compiler.
12. Local code optimization.
13. Other variants of LL parsing.
- Syllabus of tutorials:
-
1. Lexer design and implementation.
2. Parser implementation using recursive descent.
3. Attribute translation grammars.
4. Compiling to a language of a stack machine.
5. Compiling to a syntax tree.
6. [2] Project consultations.
- Study Objective:
-
After completing the course, students will be able to formally specify a translation of a text that has a certain syntax into the target form and write a compiler based on such specification. The notion of compiler in this context is not limited to compilers of programming languages but extends to all other programs for parsing and processing text in a language defined by a LL(1) grammar.
- Study materials:
-
1. Aho A.V., Lam M.S., Sethi R., Ullman J.D. : Compilers: Principles, Techniques, and Tools (2nd Edition). Addison Wesley, 2006. ISBN 978-0321486813.
2. Crespi Reghizzi S., Breveglieri L., Morzenti A. : Formal Languages and Compilation (3rd Edition). Springer, 2019. ISBN 978-3-030-04878-5.
3. Scott M. L. : Programming Language Pragmatics (3rd Edition). Morgan Kaufmann, 2009. ISBN 978-8131222560.
4. Wilhelm R., Seidl H., Hack S. : Compiler Design - Syntactic and Semantic Analysis. Springer, 2013. ISBN 978-3642175398.
5. Fischer C. N., Cytron R. C., LeBlanc R. J. : Crafting A Compiler. Addison-Wesley, 2009. ISBN 978-0136067054.
- Note:
- Further information:
- https://courses.fit.cvut.cz/BI-PJP/
- No time-table has been prepared for this course
- The course is a part of the following study plans:
-
- Master specialization Computer Security, in Czech, 2020 (elective course)
- Master specialization Design and Programming of Embedded Systems, in Czech, 2020 (elective course)
- Master specialization Computer Systems and Networks, in Czech, 202 (elective course)
- Master specialization Management Informatics, in Czech, 2020 (elective course)
- Master specialization Software Engineering, in Czech, 2020 (elective course)
- Master specialization System Programming, in Czech, version from 2020 (elective course)
- Master specialization Web Engineering, in Czech, 2020 (elective course)
- Master specialization Knowledge Engineering, in Czech, 2020 (elective course)
- Master specialization Computer Science, in Czech, 2020 (elective course)
- Mgr. programme, for the phase of study without specialisation, ver. for 2020 and higher (elective course)
- Bachelor specialization Information Security, in Czech, 2021 (elective course)
- Bachelor specialization Management Informatics, in Czech, 2021 (elective course)
- Bachelor specialization Computer Graphics, in Czech, 2021 (elective course)
- Bachelor specialization Computer Engineering, in Czech, 2021 (compulsory elective course, elective course)
- Bachelor program, unspecified specialization, in Czech, 2021 (VO)
- Bachelor specialization Web Engineering, in Czech, 2021 (elective course)
- Bachelor specialization Artificial Intelligence, in Czech, 2021 (elective course)
- Bachelor specialization Computer Science, in Czech, 2021 (PS)
- Bachelor specialization Software Engineering, in Czech, 2021 (elective course)
- Bachelor specialization Computer Systems and Virtualization, in Czech, 2021 (elective course)
- Bachelor specialization Computer Networks and Internet, in Czech, 2021 (elective course)
- Study plan for Ukrainian refugees (elective course)
- Master specialization System Programming, in Czech, version from 2023 (elective course)
- Master specialization Computer Science, in Czech, 2023 (elective course)
- Bachelor specialization Information Security, in Czech, 2024 (elective course)
- Bachelor program, unspecified specialization, in Czech, 2024 (VO)
- Bachelor specialization Management Informatics, in Czech, 2024 (elective course)
- Bachelor specialization Computer Graphics, in Czech, 2024 (elective course)
- Bachelor specialization Software Engineering, in Czech, 2024 (elective course)
- Bachelor specialization Web Engineering, in Czech, 2024 (elective course)
- Bachelor specialization Computer Networks and Internet, in Czech, 2024 (elective course)
- Bachelor specialization Computer Engineering, in Czech, 2024 (compulsory elective course, elective course)
- Bachelor specialization Computer Systems and Virtualization, in Czech, 2024 (elective course)
- Bachelor specialization Artificial Intelligence, in Czech, 2024 (elective course)
- Bachelor specialization Computer Science, in Czech, 20214 (PS)