Dcit408 - Compilers Course Outline 2024 - 2025
Dcit408 - Compilers Course Outline 2024 - 2025
Course Lecture
Lecturer: Michael Agbo Tettey Soli
Email: msoli@ug.edu.gh / agbotettey@gmail.com
Office Location: Room 010, Ground Floor, Statistics Building
Lecture Hours: Wednesdays 5:30pm-7:20pm & Thursdays 5:30pm-6:20pm
Course Overview
This course delves into compilers, the programs that translate human-readable source
code into machine-understandable computer instructions. You'll explore the fundamental
concepts and techniques behind compiler design, equipping you to tackle the challenges
of building compilers and gaining a deeper appreciation for how programming languages
work.
Objectives
This course is designed to achieve the following objectives
● Understand the core principles and theoretical foundations of compiler design.
● Analyze the capabilities and limitations of different languages and automata models.
● Apply formal methods and proofs to demonstrate the correctness and efficiency of
compiler algorithms.
● Design and implement basic compiler components like lexers and parsers.
● Develop a strong foundation for further exploration of advanced compiler topics.
Learning Outcomes
By the end of this course, you'll be able to:
● Explain the role and functionalities of compilers in the software development
process.
● Apply automata theory to recognize and manipulate regular languages using finite
automata and regular expressions.
● Analyze the strengths and weaknesses of deterministic and nondeterministic
automata.
● Design lexers to tokenize source code and parsers to analyze the structure of
programs.
● Employ formal proof techniques to verify the correctness of compiler algorithms.
● Discuss the importance of lexical and syntactic analysis in compiler design.
● Identify and understand the limitations of regular languages.
● Develop a foundation for further studies in compiler optimization, code
generation, and advanced parsing techniques.
Broad Topics
● Introduction to Compilers:
○ Overview of the compilation process
○ Role of compilers in software development
○ Historical perspective on compiler design
● Foundations of Compiler Design:
○ Mathematical concepts (sets, graphs, logic)
○ Automata Theory (finite automata, pushdown automata)
○ Formal proofs and verification techniques
● Lexical Analysis:
○ Introduction to lexers and tokenization
○ Regular expressions and their properties
○ Design and implementation of lexers
● Syntax Analysis:
○ Context-free grammars and parsing techniques
○ Top-down and bottom-up parsing algorithms
○ Parser generators and their applications
● Beyond Regular Languages:
○ Introduction to context-free languages
○ Limitations of regular expressions and automata
○ Scopes and Symbol Data
● Definition of interpreters
Week 2 Interpreters and Compiler Construction ● Types of interpreters
Tools ● Usage of interpreters
● Automating compiler development tasks using Tools
like;
● Lexical Analyzers.
● Parser Generators.
● IDEs and Debuggers
Week 3 Lexical Analysis (Regular Expressions, ● Regular Expressions: Define patterns for token
recognition
Deterministic & Non-Deterministic ● Deterministic Finite Automata (DFA): Uses a unique
Finite state for each input string.
● Non-Deterministic Finite Automata (NFA): Multiple
Automata) 1 possible states from a single input.
Week 13 Intermediate Code Generation 2 ● Optimizing the intermediate code for better
performance.
● Specifics of the target machine architecture in code
generation.
Aho, A. V., Sethi, R., Lam, M.S., & Ullman, J. D. (2006). Compilers: Principles,
Techniques and Tools (2nd ed.). Boston: Prentice Hall. ISBN-10: 0321486811,
ISBN-13: 978-0321486813.
Allen, R., & Kennedy, K. (2002). Optimizing Compilers for Modern Architectures: A
Dependence-based Approach. San Francisco, Calif.: Morgan Kaufmann. ISBN-10:
1558602860, ISBN-13: 978-1558602861.
Dos Reis, A. J. (2011). Compiler Construction Using Java, JavaCC, and Yacc. Los
Vaqueros Circle: Wiley-IEEE Computer Society Pr. SBN-10: 0470949597, ISBN-13:
978-0470949597.
Assessment Guide
To excel in the Compilers course and its assessments, it is crucial to adopt a proactive
and systematic approach to your studies;
● Begin by thoroughly reading and understanding the course materials, including
textbooks and any supplemental readings.
● Regularly review your class notes and clarify any doubts with your lecturer or
peers as soon as they arise.
● Practical assignments in compilers often require hands-on coding and
problem-solving; hence, regularly practice writing code and work through
previous compiler design problems to strengthen your grasp of key concepts.
● Engage actively in labs and group discussions, as these are excellent
opportunities to deepen your understanding and apply theoretical knowledge.
● Finally, manage your time effectively, especially when working on programming
assignments, ensuring you start early to allow ample time for debugging and
refinement.
Exams: Materials included in the exams will be taken from the text, class lecture and
discussions. Exams will be administered on the dates scheduled by the institution. The
tests will be multiple-choice, fill-in and short answers.
Plagiarism Policy
Plagiarism in any form is unacceptable at the University of Ghana and shall be treated as
a serious offense. Any assignment with a plagiarism score of 10%+ will be
automatically awarded a mark of zero. Appropriate sanctions as stipulated in the
university’s Plagiarism Policy, will be applied when students are found to be in violation.
Grading Factors:
Total 100%
Exceptions: Class Tests/Assignments are expected to be taken at the times scheduled, and
make-up work will be permitted only for the following reasons:
Attendance: Regular class attendance is expected. If a student misses class, the student is
responsible for obtaining class notes from other students.