Türkçe | English
OF FACULTY of TECHNOLOGY / DEPARTMENT of SOFTWARE ENGINEERING

Course Catalog
http://www.ktu.edu.tr/ofyazilim
Phone: +90 0462 3778353
OFTF
OF FACULTY of TECHNOLOGY / DEPARTMENT of SOFTWARE ENGINEERING /
Katalog Ana Sayfa
  Katalog Ana Sayfa  KTÜ Ana Sayfa   Katalog Ana Sayfa
 
 

YZM3000Compiler Design2+0+0ECTS:4
Year / SemesterSpring Semester
Level of CourseFirst Cycle
Status Elective
DepartmentDEPARTMENT of SOFTWARE ENGINEERING
Prerequisites and co-requisitesNone
Mode of Delivery
Contact Hours14 weeks - 2 hours of lectures per week
LecturerÖğr. Gör. Dr Celal ATALAR
Co-Lecturer
Language of instructionTurkish
Professional practise ( internship ) None
 
The aim of the course:
The course's aim can be described the various stages of the compilation process such as lexical analysis, downward and upward parsing, abstract syntax trees, type checking, intermediate code conversion, basic blocks and code generation, and compiler-compiler tools such as JavaCC and JTB that generate source code in the Java programming language to teach them how to do it.
 
Learning OutcomesCTPOTOA
Upon successful completion of the course, the students will be able to :
LO - 1 : Understanding the phases of the compilation process.1,3,81,
LO - 2 : Able to write finite automata and grammars for programming language constructs.1,3,81,
LO - 3 : Able to write and execute scanner, parser and type checker for a simple programming language.1,3,81,
LO - 4 : Developing interpreters for simple programming language .1,3,81,
LO - 5 : Generating intermediate code for a simple programming language.1,3,81,
LO - 6 : Able to design and implement a new programming language.1,3,81,
CTPO : Contribution to programme outcomes, TOA :Type of assessment (1: written exam, 2: Oral exam, 3: Homework assignment, 4: Laboratory exercise/exam, 5: Seminar / presentation, 6: Term paper), LO : Learning Outcome

 
Contents of the Course
1. Compiler and Interpreter, Compile Phases 2. Tree Representation of Basic Straight A Program 3. Lexical Analysis 4. Regular Expression and Representation with Regular Expression of Tokens 5. Lookahead, Ambiguities and Error Handling 6. Compiler Compiler, JavaCC File Structure, Create Scanner with JavaCC 7. Syntax Analysis, Introduction to Parsing 8. Context- Free Grammer (CFG), Righmost and Leftmost Derivation 9. Parse Tree and Ambiguous Grammar 10. Recursive-Descent Parsing 11. First and Follow Sets and Left Factoring 12. LL and LR Parsing 13. Semantic Analysis, Visitor Pattern, instanceof Operator 14. Abstract Syntax Tree
 
Course Syllabus
 WeekSubjectRelated Notes / Files
 Week 1Compiler and Interpreter, Compile Phases
 Week 2Tree Representation of Basic Straight A Program
 Week 3Lexical Analysis
 Week 4Regular Expression and Representation with Regular Expression of Tokens
 Week 5Lookahead, Ambiguities and Error Handling
 Week 6Compiler Compiler, JavaCC File Structure, Create Scanner with JavaCC
 Week 7Syntax Analysis, Introduction to Parsing
 Week 8Context- Free Grammer (CFG), Righmost and Leftmost Derivation
 Week 9Midterm Exam
 Week 10Parse Tree and Ambiguous Grammar
 Week 11Recursive-Descent Parsing
 Week 12First and Follow Sets and Left Factoring
 Week 13LL and LR Parsing
 Week 14Semantic Analysis, Visitor Pattern, instanceof Operator
 Week 15Abstract Syntax Tree
 Week 16Final Exam
 
Textbook / Material
1Appel, A. W., 2002; Modern Compiler Implementation in Java, 2nd ed., Cambridge University Press, 501 p.
 
Recommended Reading
1Cooper, K., Torczon, L. 2003; Engineering a Compiler, 1st ed., Morgan Kaufmann, 801 p.
2Grune, D., Bal, H., Jacobs, C., Langendoen, K. 2000; Modern Compiler Design, Wiley, 736 p.
 
Method of Assessment
Type of assessmentWeek NoDate

Duration (hours)Weight (%)
Mid-term exam 9 1 50
End-of-term exam 16 2 50
 
Student Work Load and its Distribution
Type of workDuration (hours pw)

No of weeks / Number of activity

Hours in total per term
Yüz yüze eğitim 2 14 28
Sınıf dışı çalışma 3 12 36
Arasınav için hazırlık 2 8 16
Arasınav 1 1 1
Dönem sonu sınavı için hazırlık 3 8 24
Dönem sonu sınavı 2 1 2
Total work load107