| Academic Unit: |
Faculty of Engineering and NAtural Sciences |
| Mode of Delivery: |
Face to face |
| Prerequisites: |
None |
| Language of Instruction: |
English |
| Level of Course Unit: |
Undergraduate |
| Course Coordinator: |
Rahim DEHKHARGHANİ & Taner ARSAN |
| Course Objectives: |
Introduction to compiler organization and implementation, including formal specifications and algorithms for lexical and syntactic analysis, internal representation of the source program, semantic analysis, run-time environment issues and code generation. Students will write a compiler for a reasonably large subset of a contemporary language, targeted to a virtual machine. |
| Course Contents: |
The phases of compilation, lexical analysis, parsing, type checking, JVM code generation, survey of famous Java compilers and discussion of modern compiler issues. |
| Learning Outcomes of the Course Unit (LO): |
- 1- To be able to write parsers and produce an abstract syntax tree.
- 2- To be able to analyze and generate code for a programming construct represented by an abstract syntax tree.
- 3- To be able to document your work with program comments and narratives about design choices, problems and their fixes.
|
| Planned Learning Activities and Teaching Methods: |
Classroom discussion and in-class learning. |
| Week | Subjects | Related Preperation |
LO |
| 1 |
Introduction: compilers vs. interpreters, compiler structure. |
Lecture notes. |
1,2 |
| 2 |
The Java Virtual Machine and its run-time environment. |
Lecture notes. |
1,2 |
| 3 |
A map of the j-- compiler. |
Lecture notes. |
1,2 |
| 4 |
Lexical analysis (scanning). Regular expressions, FSA and DFA. |
Lecture notes. |
1,3 |
| 5 |
Context-free grammars and parsing |
Lecture notes. |
1 |
| 6 |
Top-down parsing. LL(1) parsing. |
Lecture notes. |
1,3 |
| 7 |
Top-down parsing. Recursive descent. |
Lecture notes. |
1,3 |
| 8 |
Using a parser generator. JavaCC |
Lecture notes. |
1,3 |
| 9 |
Midterm Exam |
Lecture notes. |
3,4 |
| 10 |
Semantic analysis. |
Lecture notes. |
2,3 |
| 11 |
Semantic analysis. JVM Code generation. |
Lecture notes. |
2,3 |
| 12 |
JVM Code generation. |
Lecture notes. |
2,3 |
| 13 |
Introduction to Optimization |
Lecture notes. |
2 |
| 14 |
Celebrity compilers |
Lecture notes. |
1,2 |
At Kadir Has University, a Semester is 14 weeks; The weeks 15 and 16 are reserved for final exams.
THE RELATIONSHIP BETWEEN COURSE LEARNING OUTCOMES (LO) AND PROGRAM QUALIFICATIONS (PQ)
| # |
PQ1 |
PQ2 |
PQ3 |
PQ4 |
PQ5 |
PQ6 |
PQ7 |
PQ8 |
PQ9 |
| LO1 |
|
|
|
|
|
|
|
|
|
| LO2 |
|
|
|
|
|
|
|
|
|
| LO3 |
|
|
|
|
|
|
|
|
|
Contribution: 1 Low, 2 Average, 3 High