0% found this document useful (0 votes)
28 views7 pages

Dcit408 - Compilers Course Outline 2024 - 2025

The document outlines the Compilers course (DCIT 408) offered at the University of Ghana, detailing the course objectives, learning outcomes, and a comprehensive lecture plan covering topics such as lexical and syntax analysis, automata theory, and intermediate code generation. It emphasizes the importance of analytical and abstract thinking, as well as programming language theory, while also providing guidelines for assessments, attendance, and plagiarism policies. Key readings and grading criteria are specified to support students in their learning journey.

Uploaded by

danyalhamzah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views7 pages

Dcit408 - Compilers Course Outline 2024 - 2025

The document outlines the Compilers course (DCIT 408) offered at the University of Ghana, detailing the course objectives, learning outcomes, and a comprehensive lecture plan covering topics such as lexical and syntax analysis, automata theory, and intermediate code generation. It emphasizes the importance of analytical and abstract thinking, as well as programming language theory, while also providing guidelines for assessments, attendance, and plagiarism policies. Key readings and grading criteria are specified to support students in their learning journey.

Uploaded by

danyalhamzah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIVERSITY OF GHANA

(All rights reserved)

DEPARTMENT OF COMPUTER SCIENCE


SCHOOL OF PHYSICAL AND MATHEMATICAL SCIENCES
SEMESTER II - 2024/2025
DCIT 408: COMPILERS (3 CREDITS)

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

Cognitive and Subject Specific Skills

●​ Analytical Thinking: Understanding and constructing compilers requires analyzing


language syntax, semantics, and the underlying machine architecture. This enhances the
ability to think critically and solve complex problems
●​ Abstract Thinking: Compilers require an understanding of abstract concepts such as
finite automata, context-free grammars, and parse trees, promoting abstract reasoning
skills.
●​ Automata Theory and Formal Languages: This includes learning about finite
automata, regular expressions, and context-free grammars, which are not only
fundamental in compilers but also in various other computer science domains
●​ Programming Language Theory: Students learn the foundational concepts of how
programming languages are designed, including syntax, semantics, and pragmatics.
●​ Interdisciplinary Knowledge: Compilers integrate knowledge from different areas of
computer science, such as algorithms, data structures, discrete mathematics, and
computer architecture, offering a comprehensive learning experience.
●​ Skill with Tools: Students gain experience using tools that are fundamental to software
engineering, such as debuggers, interpreters, and the compilers themselves.

Course Delivery Plan


●​ This course will involve lectures for theoretical understanding and online tutorial
sessions for hands-on application. Self-directed study and extensive research are
essential components
●​ Proactive learning is encouraged; students are expected to prepare ahead of class.
This preparatory work will be evaluated through periodic quizzes administered
before each session.
Lecture Plan
The following plan gives details of the broad topics that will be covered with
appropriate references where applicable. Resources would be shared with students,
including video lessons on the broad issues.

Week Broad Topics Subtopics

Week 1 Introduction to Compilers(History, ●​ From assembly languages to high-level languages


Overview, ●​ Evolution of compiler technology over the decades
●​ Definition and Role of Compilers
Architecture) ●​ Types of Compilers
●​ Compilers in High-Level vs. Low-Level Languages
●​ Phases of a Compiler
●​ Data Structures Used

●​ 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 4 Lexical Analysis (Deterministic & ●​ NFA to DFA


●​ DFA Minimization
Non-Deterministic Finite Automata ●​ Lex Tool
Lexical Analyzer Generator Lex) 2

Week 5 Introduction to Syntax Analysis and ●​ Purpose of syntax analysis


●​ Process of syntax analysis
Context-Free Grammars ●​ Definition and key terms (context-free grammars).
●​ Components of context free grammars
●​ Usage of context free grammars.

Week 6 Syntax Analysis 2 ●​ Derivation: Process of generating strings from the


start symbol using production rules.
●​ Operator Precedence: Rules defining the order of
operations to guide the parsing process.

Week 7 Syntax Analysis 3 ●​ Predictive Parsing: Non-backtracking, top-down


parsing approach using a lookahead.
●​ LL(1) Parsing: A specific type of predictive
parser that uses one token of lookahead to make
parsing decisions.

Week 8 Syntax Analysis 4 ●​ SLR Parsing: Simple LR parsing method for


constructing a parsing table using states derived from
the grammar's items.

Week 9 Syntax Analysis 5 ●​ LR-parser Generators: Tools that automate the


creation of LR parsers, efficiently handling even
complex grammars.
Week 10 Scopes and Symbol Tables ●​ Implementation of Symbol Tables
●​ Persistent Symbol Tables
●​ Imperative Symbol Tables

Week 11 Type Checking ●​ Purpose of type checking


●​ Process of type checking.

Week 12 Intermediate Code Generation 1 ●​ Definition of intermediate code


●​ Techniques for generating intermediate code.
Including ;
○​ three-address codes,
○​ abstract syntax trees,
○​ quadruples.

Week 13 Intermediate Code Generation 2 ●​ Optimizing the intermediate code for better
performance.
●​ Specifics of the target machine architecture in code
generation.

Key Reading List


Michael Sipser (2013) Sipser Introduction to the Theory of Computation(3rd Edition)

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.

Mak, R. (2009). Writing Compilers and Interpreters: A Software Engineering Approach.


New York: Wiley. ISBN-10: 0470177071, ISBN-13: 978-0470177075.

Mozgovoy, M. (2009). Algorithms, Languages, Automata, & Compilers: A Practical


Approach. Sudbury, MA: Jones and Bartlett Publishers, Inc.; ISBN-10: 0763776270,
ISBN-13: 978-0763776275.

Louden, K. C. (1997).Compiler Construction: Principles and Practice. Boston: PWS


Pub Co. ISBN-10: 0534939724, ISBN-13: 978-0534939724.

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.

Quizzes, Class Assignments Mid-Semester Exam: Individual and group take-home


and in-class group assignments will be periodically given to students. Unannounced
quizzes may be given during the semester. No make-up quizzes will be given to those
who miss classes. A mid-semester exam shall be organized between the 6-8th weeks.

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 Criteria of Final Assessment

Grading Factors:

Main Exams 40%

Interim Assessment 20%


Quiz, Assignments, Labs 40%

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:

1) Death of an immediate family member.


2) Personal illness requiring attention by a physician.
3) Illness of an immediate family requiring your personal attention.
4) Unplanned holidays/interruptions by other college activities.
5) Travel out-of-town required by your employer (with proof).
6) An emergency and/or situation at the discretion of the instructor.

Attendance: Regular class attendance is expected. If a student misses class, the student is
responsible for obtaining class notes from other students.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy