UIMOIBK016 Compilers

Faculty of Philosophy and Science in Opava
Winter 2023
Extent and Intensity
0/0/0. 6 credit(s). Type of Completion: zk (examination).
Teacher(s)
RNDr. Šárka Vavrečková, Ph.D. (lecturer)
RNDr. Šárka Vavrečková, Ph.D. (seminar tutor)
Guaranteed by
RNDr. Šárka Vavrečková, Ph.D.
Institute of Computer Science – Faculty of Philosophy and Science in Opava
Course Enrolment Limitations
The course is also offered to the students of the fields other than those the course is directly associated with.
fields of study / plans the course is directly associated with
Course objectives
This subject concentrates on practical usage of theoretical computer science in programming with a focus on the compilation of text strings, including files. Knowledge of theory of computing (formal languages, finite and pushdown automata) and programming is required. Students learn basic methods of representation of the lexical and syntactic structure of a programming language using some types of formal grammars, programming lexical and syntactic analyzer according to these structures, and continue with the other phases of compiler programming. Students create the own simple compiler (interpreter) of an arbitrary language, involving working with mathematical expressions.
Learning outcomes
Students will be able to:
- describe basic procedures for creating of the lexical and syntactic structure of a programming language using some types of formal grammars,
- design the lexical analyzer and syntactic parser according to these structures,
- program the own simple compiler.
Syllabus
  • 1. Compiler structure.
  • 2. Lexical analysis. Methods of lexical analysis and their implementation.
  • 3.–5. Syntactic analysis, LL(1), strong LL(k) grammars, their use and implementation.
  • 6.–7. Syntactic analysis using strong LR(k) grammars, implementation.
  • 8. Semantic analysis. Symbol table and its implementation. Intermediate code.
  • 9.–10. Syntax-Directed Compilation.
  • 11.–12. Attribute-directed compilation and its implementation.
  • 13. Programming more advanced language constructs.
Literature
    required literature
  • VAVREČKOVÁ, Šárka. Programování překladačů (rozpracovaná nová verze). Slezská univerzita v Opavě, 2023.
  • VAVREČKOVÁ, Š. Programování překladačů. Opava: Slezská univerzita v Opavě, 2008. ISBN 978-80-7248-493-5. info
    recommended literature
  • PRATA, Stephen. Mistrovství v C++. Computer Press, 2013, dotisk 2023. ISBN 978-80-251-3828-1.
  • THAIN, Douglas. Introduction to Compilers and Language Design. Second edition. University of Notre Dame, 2020, revision date: 2023. ISBN 979-8-655-18026-0. Dostupné na: https://www3.nd.edu/~dthain/compilerbook/compilerbook.pdf
  • COOPER, Keith D. a Linda TORCZON. Engineering a compiler. 2nd ed. Boston: Elsevier/Morgan Kaufmann, 2012. ISBN 978-0-12-088478-0. info
  • MOZGOVOY, Maxim. Algorithms, languages, automata, and compilers: a practical approach. Sudbury, Mass.: Jones and Bartlett Publishers, 2010. ISBN 978-0-7637-7627-5. info
Teaching methods
Interactive lecture
Lecture with a discussion
Exercises
Project
Assessment methods
Credit:
- Compulsory attendance at seminars min. 75 %.
- Two tests, min. 50 % points from each.
- Programming: lexical analysis of simple compiler.
Exam:
- Written, a list of questions is on the web of the subject.
- Programming own interpreter in the selected programming language.
Language of instruction
Czech
Further comments (probably available only in Czech)
Study Materials
The course can also be completed outside the examination period.
Information on the extent and intensity of the course: 12 hod/sem.
The course is also listed under the following terms Winter 2020, Winter 2021, Winter 2022.
  • Enrolment Statistics (recent)
  • Permalink: https://is.slu.cz/course/fpf/winter2023/UIMOIBK016