You are on page 1of 7

[Department of Computer Science]

Catholic University in Erbil

[Compiler Design II]

Course Book – (3rd year)


Lecturers name [Asst.Prof.Dr.Raghad Zuhair yousif]
Academic Year: 2019-2020 Spring Semester

Course Book

1. Course name Compiler design II


2. Lecturer in charge Asst.Prof.Dr.Raghad Zuhair Yousif
3. Department/ College Computer Science
4. Contact Raghad.yousif@cue.edu.krd
5. Time (in hours) per week Theory: 2 h
Practical: 2h
6. Office hours Saturday 8:30-4:30
7. Course code
8. Teacher's academic profile was born in Baghdad 1975 .He Received a BSc in
Electronic and Communication engineering from college
of Engineering Baghdad university Department of
Electronic and Communication Eng. in 1998,MSc in
Electronic and Communication Engineering form
department of Electrical engineering Al-Mustansriyha
university –Baghdad in 2001 ,then he received a PhD
degree in communication Engineering from Baghdad
university of Technology Department of Electronics and
Electrical engineering in 2005 .He is currently a
Assistance Professor in Department of IT-catholic
university in Erbil; His Fields of interest are Network
Coding Medical Imaging Swarms, Wireless. He is a
supervisor of many MSc thesis and PhD thesis he was
also a member of examination committee of many MSc
and PhD theses.
9. Keywords Lexical analysis, parsing, intermediate code, DFA
10. Course overview:
“Theoretical aspects of compiler design, including parsing context free languages, lexical analysis, translation
specification and machine-independent code generation. Programming projects to demonstrate design topics.”

11. Course objective:


This course will concentrate on practical aspects of compiler construction, programming language
design, and engineering a large, complex software application.
• Compiler construction and language design. Design and build a working compiler for a programming
language that you invented. Write sample programs in your language and then compile them into
executable machine code that you can run.
• Software engineering. Employ the best practices of object-oriented design and team-based software
engineering. A compiler is a large, complex program! Managing the development of such a program
requires learning critical job skills that are highly desired by employers.
12. Student's obligation
No exam will be given after the scheduled date/time without appropriate medical documents.
Missed exams will be graded (0) unless prior arrangements are made with the teacher. Overall passing
grades must be attained in all exams to pass the course.
Professionalism:
You should be able to demonstrate a professional attitude and behavior towards your work,
your fellow-students and your teacher: this includes reliability, respect for and cooperation with
colleagues, willingness to work calmly and courteously under difficult conditions, determination to
achieve first-class work while meeting deadlines, respect for equipment and systems, and constructive
response to criticism.
Cheating and Plagiarism:
All forms of cheating, including plagiarism, are a serious offense. The teacher has the right to
assign a grade of "0" on the examination or assignment, or, at the teacher's discretion.

Attendance:
Attendance is mandatory. Students are responsible to ensure that all work, including
assignments, is completed. If, due to some unforeseen event, classes are missed, students must ensure
that they keep current with their work (including assignments).

13. Forms of teaching


“Teacher-Centred Approach to Learning”
teacher is the main authority figure in a teacher-cantered instruction model. Students are
viewed as “empty vessels” External link  who passively receive knowledge from their teachers through
lectures and direct instruction, with an end goal of positive results from testing and assessment.
14.Assessment scheme

Two or Three examinations 30 %


For each chapter one Quiz and Homework 10%
Final examination 60%

15.Student learning outcome:


Upon successful completion of this course, students will be able to:
CLO 1: Develop a scanner and a parser for a programming language.
CLO 2: Perform syntactic and semantic analyses of source programs.
CLO 3: Generate symbol tables and intermediate code for source programs.
CLO 4: Develop an interpreter that executes a source program in a suitable runtime environment.
CLO 5: Design the grammar for a programming language and feed it into a compiler-compiler.
CLO 6: Develop a compiler that translates a source program into executable machine code.
16.Course Reading List and References‌:

Text Book(s) and Supporting Materials:


Text book(s):
Mark Allen Weiss, Data Structures and Algorithm Analysis in C++, Addison-Wesley, 2004.In
addition to the above, the students will be provided with handouts by the lecturer.
References:
Students will be expected to give the same attention to these references as given to the Module
textbook(s)

1. Compilers: Principles, Techniques and Tools, Aho, Sethi, and Ullman, Addison-
Wesley, 1986.

Extra references:

1. A Retargetable C Compiler: Design and Implementation Fraser and Hansen,


Benjamin-Cummings, 1995.
2. Advanced Compiler Design and Implementation, Muchnick, Morgan and Kaufmann,
1998.
3. Crafting a Compiler, Fischer and LeBlanc, Benjamin-Cummings, 1988.
4. Introduction to Compiler Construction with UNIX, Schreiner and Friedman, Prentice-
Hall, 1985. (on reserve)
5. Compiler Design in C, Holub, Prentice-Hall, 1990.

17. The Topics:


Date Topic Details LAB

Week 1 Introduction Introduction to compiler and interpreters C++ &JAVA

Week 2 Lexical Analysis I Formal Languages. C++ &JAVA

Week 3 Lexical Analysis II implementation with Finite State Machines C++ &JAVA

Week 4 Lexical Analysis III Lexical Tables C++ &JAVA

Week 5 Syntax Analysis I Grammars, Languages, and Pushdown Machines. C++ &JAVA

Week 6 Syntax Analysis II Ambiguities in Programming Languages. C++ &JAVA

Week 7 Syntax Analysis III The Parsing Problem. C++ &JAVA

Week 8 Top Down Parsing I Relations and Closure, Simple Grammars. C++ &JAVA
Quasi-Simple Grammars.

Week 9 Top Down Parsing II  LL(1) Grammars. C++ &JAVA


 Parsing Arithmetic Expressions Top
Down.

Week 10 Top Down Parsing III  Syntax-Directed Translation. C++ &JAVA


 Attributed Grammars.
 An Attributed Translation Grammar for
Expressions.

Week 11 Bottom Up Parsing I Shift Reduce Parsing. C++ &JAVA

Week 12 Bottom Up Parsing II LR Parsing With Tables C++ &JAVA

Week 13 Code Generation I  Introduction to Code Generation. C++ &JAVA


 Converting Atoms to Instruction.
Week 14 Code Generation II  Single Pass vs. Multiple Passes. C++ &JAVA
 Register Allocation.

Week 15 Optimization I Introduction and View of Optimization. C++ &JAVA

Week 16 Optimization II  Global Optimization. C++ &JAVA


Local Optimization.

Week 17
Lecturer's name for Asst.Prof.Dr.Eng.Raghad zuhair Yousif
all lectures

19. Examinations:
solution :

You might also like