Compiler Construction, 6 credits
Kompilatorkonstruktion, 6 hp
TDDB44
Main field of study
Information Technology Computer Science and Engineering Computer ScienceCourse level
Second cycleCourse type
Programme courseExaminer
Peter FritzonDirector of studies or equivalent
Ahmed RezineEducation components
Preliminary scheduled hours: 48 hRecommended self-study hours: 112 h
Available for exchange students
YesMain field of study
Information Technology, Computer Science and Engineering, Computer ScienceCourse level
Second cycleAdvancement level
A1XCourse offered for
- Computer Science, Master's Programme
- Computer Science and Engineering, M Sc in Engineering
- Industrial Engineering and Management - International, M Sc in Engineering
- Industrial Engineering and Management, M Sc in Engineering
- Information Technology, M Sc in Engineering
- Computer Science and Software Engineering, M Sc in Engineering
- Computer Science, Master's programme
Specific information
Overlapping course contents: TDDD55
Entry requirements
Note: Admission requirements for non-programme students usually also include admission requirements for the programme and threshold requirements for progression within the programme, or corresponding.
Prerequisites
Data Structures and Algorithms. Formal Languages and Automata Theory, either via that course or studying selected material (check with lecturer). Some knowledge of C++.
Intended learning outcomes
The aim of this course is to give a comprehensive introduction to the theoretical and practical issues underlying the design and implementation of compilers. After the completion of the course you should be able to:
- explain and apply fundamental principles and techniques of compiler design
- explain and use methods for lexical analysis, top-down and bottom-up parsing
- explain and use methods for semantic analysis, syntax-directed translation, code optimization
- explain methods and theory for construction of lexer and parser generators, code generator generators
- explain methods for generation and optimization of code for RISC-based architectures
- construct and implement a top-down parser and a bottom-up parser for a given context-free grammar
- use lexer and parser generators to build a lexical analyzer and a parser for a real compiler
- explain and use methods for machine code generation
- design and implement a complete compiler including: lexer, parser, memory management, semantic analysis, optimization, and machine code generation
Course content
Different types of translators such as compilers and preprocessors. Methods for lexical analysis and syntax analysis. Management of declarations. Different types of internal representations. Memory management and run-time organization. Code generation and code optimization, especially with regards to RISC processors. Methods for handling errors. Compiler construction and compiler generation tools. Language design. A complete compiler for a Pascal-like language is constructed during the laboratory sessions. Certain modules of this compiler will be automatically generated using compiler generation tools, whereas other parts will be implemented by hand in C++.
Teaching and working methods
The theory is presented in the lectures. The seminars prepare for the laboratory assignments, where a complete compiler for a small Pascal-like language is implemented.
Examination
LAB1 | Laboratory Work | 3 credits | U, G |
TEN1 | Written examination | 3 credits | U, 3, 4, 5 |
UPG1 | 0 credits | U, G |
The questions in the written exam check how well the student has fulfilled the learning goals of the course. For passing the exam, deficits in fulfilling certain partial goals can be balanced by a better fulfilling of other partial goals.
Grades
Alternative-grade scale, LiU, U, 3, 4, 5Course literature
Aho, Lam, Sethi, Ullman: Compilers Principles, techniques, and tools, Second edition, Addison-Wesley, 2006.
Department
Institutionen för datavetenskapDirector of Studies or equivalent
Ahmed RezineExaminer
Peter FritzonCourse website and other links
http://www.ida.liu.se/~TDDB44/Education components
Preliminary scheduled hours: 48 hRecommended self-study hours: 112 h
Course literature
Aho, Lam, Sethi, Ullman: Compilers Principles, techniques, and tools, Second edition, Addison-Wesley, 2006.Kompendier, utges av institutionen för datavetenskap.
Code | Name | Scope | Grading scale |
---|---|---|---|
LAB1 | Laboratory Work | 3 credits | U, G |
TEN1 | Written examination | 3 credits | U, 3, 4, 5 |
UPG1 | 0 credits | U, G |
The questions in the written exam check how well the student has fulfilled the learning goals of the course. For passing the exam, deficits in fulfilling certain partial goals can be balanced by a better fulfilling of other partial goals.
Regulations (apply to LiU in its entirety)
The university is a government agency whose operations are regulated by legislation and ordinances, which include the Higher Education Act and the Higher Education Ordinance. In addition to legislation and ordinances, operations are subject to several policy documents. The Linköping University rule book collects currently valid decisions of a regulatory nature taken by the university board, the vice-chancellor and faculty/department boards.
LiU’s rule book for education at first-cycle and second-cycle levels is available at http://styrdokument.liu.se/Regelsamling/Innehall/Utbildning_pa_grund-_och_avancerad_niva.
Note: The course matrix might contain more information in Swedish.
I | U | A | Modules | Comment | ||
---|---|---|---|---|---|---|
1. DISCIPLINARY KNOWLEDGE AND REASONING | ||||||
1.1 Knowledge of underlying mathematics and science (G1X level) |
|
|
|
|||
1.2 Fundamental engineering knowledge (G1X level) |
X
|
X
|
X
|
TEN1
UPG1
|
||
1.3 Further knowledge, methods, and tools in one or several subjects in engineering or natural science (G2X level) |
|
X
|
|
TEN1
UPG1
|
||
1.4 Advanced knowledge, methods, and tools in one or several subjects in engineering or natural sciences (A1X level) |
|
|
|
|||
1.5 Insight into current research and development work |
|
|
|
|||
2. PERSONAL AND PROFESSIONAL SKILLS AND ATTRIBUTES | ||||||
2.1 Analytical reasoning and problem solving |
X
|
|
|
|||
2.2 Experimentation, investigation, and knowledge discovery |
|
|
|
|||
2.3 System thinking |
|
|
|
|||
2.4 Attitudes, thought, and learning |
|
X
|
|
LAB1
|
||
2.5 Ethics, equity, and other responsibilities |
|
|
|
|||
3. INTERPERSONAL SKILLS: TEAMWORK AND COMMUNICATION | ||||||
3.1 Teamwork |
|
|
X
|
LAB1
|
||
3.2 Communications |
|
|
|
|||
3.3 Communication in foreign languages |
|
|
|
|||
4. CONCEIVING, DESIGNING, IMPLEMENTING AND OPERATING SYSTEMS IN THE ENTERPRISE, SOCIETAL AND ENVIRONMENTAL CONTEXT | ||||||
4.1 External, societal, and environmental context |
|
|
|
|||
4.2 Enterprise and business context |
|
|
|
|||
4.3 Conceiving, system engineering and management |
|
|
|
|||
4.4 Designing |
X
|
X
|
X
|
LAB1
|
||
4.5 Implementing |
X
|
X
|
X
|
LAB1
|
||
4.6 Operating |
|
|
|
|||
5. PLANNING, EXECUTION AND PRESENTATION OF RESEARCH DEVELOPMENT PROJECTS WITH RESPECT TO SCIENTIFIC AND SOCIETAL NEEDS AND REQUIREMENTS | ||||||
5.1 Societal conditions, including economic, social, and ecological aspects of sustainable development for knowledge development |
|
|
|
|||
5.2 Economic conditions for knowledge development |
|
|
|
|||
5.3 Identification of needs, structuring and planning of research or development projects |
|
|
|
|||
5.4 Execution of research or development projects |
|
|
|
|||
5.5 Presentation and evaluation of research or development projects |
|
|
|
This tab contains public material from the course room in Lisam. The information published here is not legally binding, such material can be found under the other tabs on this page.
There are no files available for this course.