Skip to main content
CIT445Sciences3 Unitsintermediate

Principles And Techniques Of Compilers

This course introduces the principles and techniques of compiler construction. It covers the key techniques in modern compiler construction, preparing students for industry demands. Students will understand programme analysis and optimisation techniques, improving their programming skills. The course builds a foundation for research in compiler, programme analysis, modelling, and operating systems. Topics include lexical analysis, syntax analysis, code generation, and optimisation.

Transform this course into personalized study materials with AI

200h
Study Time
13
Weeks
15h
Per Week
intermediate
Math Level
Course Keywords
Compiler DesignLexical AnalysisSyntax AnalysisCode GenerationOptimisation

Course Overview

Everything you need to know about this course

Course Difficulty

Intermediate Level
Builds on foundational knowledge
65%
intermediate
📊
Math Level
Moderate Math
🔬
Learning Type
Hands-on Practice

Course Topics

Key areas covered in this course

1

Formal Grammars

2

Lexical Analysis

3

Syntax Analysis

4

Code Generation

5

Code Optimisation

6

Error Handling

Total Topics6 topics

Requirements

Knowledge and skills recommended for success

CIT342

💡 Don't have all requirements? Don't worry! Many students successfully complete this course with basic preparation and dedication.

Assessment Methods

How your progress will be evaluated (3 methods)

Assignments

Comprehensive evaluation of course material understanding

Written Assessment

Tutor-Marked Assignments

Comprehensive evaluation of course material understanding

Written Assessment

Final Examination

Comprehensive evaluation of course material understanding

Written Assessment

Career Opportunities

Explore the career paths this course opens up for you

Compiler Engineer

Apply your skills in this growing field

Software Developer

Apply your skills in this growing field

Systems Programmer

Apply your skills in this growing field

Language Designer

Apply your skills in this growing field

Performance Analyst

Apply your skills in this growing field

Industry Applications

Real-world sectors where you can apply your knowledge

Software DevelopmentOperating SystemsGame DevelopmentEmbedded SystemsCybersecurity

Study Schedule Beta

A structured 13-week journey through the course content

Week
1

Module 1: Introduction to Compilers

5h

Unit 1: Review of Grammars, Languages and Automata

5 study hours
  • Read the introduction to grammars, languages, and automata.
  • Understand the syntax and semantics of grammars.
  • Define alphabet, words, and strings.
  • Identify strings generated by a particular grammar.
Week
2

Module 1: Introduction to Compilers

10h

Unit 2: What is a Compiler?

5 study hours
  • Define compiler and its importance in programming.
  • Distinguish between a translator, compiler, and interpreter.
  • Discuss challenges in building compilers.
  • State qualities of compilers.
  • Describe the architecture of a compiler.

Unit 3: The Structure of a Compiler

5 study hours
  • List the components of a compiler.
  • Describe activities at each compilation phase.
  • Explain cross compilation.
  • Analyse hand implementation.
Week
3

Module 2: Lexical Analysis

10h

Unit 1: The Scanner

5 study hours
  • State the role of a lexical analyser.
  • State the need for a compiler.
  • Define the scanner.
  • State the functions of the scanner.

Unit 2: Hand Implementation of Lexical Analyser

5 study hours
  • List the methods of constructing a lexical analyser.
  • Describe the input buffering method.
  • Explain the transition diagram method.
  • Construct transition diagrams to handle keywords, identifiers, and delimiters.
Week
4

Module 2: Lexical Analysis

10h

Unit 3: Automatic Generation of Lexical Analyser

5 study hours
  • Define regular expressions (REs).
  • Define terms like tokens, patterns, lexemes, and attributes.
  • Distinguish between normal and Lex regular expressions.
  • Construct Lex-style regular expressions for patterns.
  • Describe tools for generating lexical analysers.

Unit 4: Implementing a Lexical Analyser

5 study hours
  • Define finite automata.
  • Convert REs to NFA.
  • Convert NFA to DFA.
Week
5

Module 3: Syntax Analysis

5h

Unit 1: Context-Free Grammars

5 study hours
  • Define context-free grammars (CFGs).
  • Define and state the roles of a parser.
  • Describe the concept of ambiguity.
  • Generate parse trees for sentences.
  • Verify grammars.
Week
6

Module 3: Syntax Analysis

5h

Unit 2: Bottom-Up Parsing Techniques

5 study hours
  • Define parsing techniques.
  • Distinguish between top-down and bottom-up parsing.
  • Describe shift-reduce parsing.
  • Define handle.
  • Analyse an input string using shift-reduce parsing.
Week
7

Module 3: Syntax Analysis

5h

Unit 3: Precedence Parsing

5 study hours
  • Define operator grammars and operator precedence grammars.
  • Explain methods of generating relationships between operators.
  • Describe operator precedence parsing.
  • Compute the Wirth-Weber precedence relationship table.
  • Parse input strings using the precedence relationship table.
Week
8

Module 3: Syntax Analysis

5h

Unit 4: Top-Down Parsing Techniques

5 study hours
  • Define top-down parsing.
  • State difficulties with top-down parsing.
  • Describe recursive descent parsing.
  • Define LL(k) grammars.
  • Describe nonrecursive predictive parsing.
  • Construct a predictive parser for LL(k) grammars.
  • Use the predictive parsing table to analyse input strings.
Week
9

Module 3: Syntax Analysis

5h

Unit 5: LR Parsers

5 study hours
  • Define LR(k) grammars.
  • State advantages and drawbacks of LR parsers.
  • Construct a simple LR parser.
  • Distinguish among LR parser types.
  • Compute LR(0) items.
  • Construct an NFA for LR(0) items.
  • Define functions like GOTO, CLOSURE.
Week
10

Module 4: Code Generation

5h

Unit 1: Error Handling

5 study hours
  • Classify errors based on occurrence stage.
  • Design a better error handling compiler.
  • Distinguish between runtime and compile-time errors.
  • Explain how error detection affects application performance.
Week
11

Module 4: Code Generation

5h

Unit 2: Symbol Tables

5 study hours
  • Define symbol tables.
  • State their uses in compilation.
  • List items entered into symbol tables.
  • Describe ways of organising the symbol table.
  • Construct symbol table for block-structured programs.
  • Describe collision resolution methods in hashing.
Week
12

Module 4: Code Generation

5h

Unit 3: Intermediate Code Generation

5 study hours
  • Define intermediate representation.
  • Define three-address code.
  • State types of three-address code.
  • Describe stack-based implementation.
  • Convert between three-address and stack-based code.
  • Generate intermediate code for Declarations, Expressions, Commands, and Procedures.
Week
13

Module 4: Code Generation

10h

Unit 4: Code Generation

5 study hours
  • Define code generation.
  • Explain code generation issues like input, output, memory management, instruction selection.
  • Describe runtime storage allocation.

Unit 5: Code Optimisation

5 study hours
  • Define code optimisation.
  • State criteria for code improving transformation.
  • List categories of optimisation.
  • State properties of optimising compilers.
  • List and describe common optimisation algorithms.

This study schedule is in beta and may not be accurate. Please use it as a guide and consult the course outline for the most accurate information.

Course PDF Material

Read the complete course material as provided by NOUN.

Access PDF Material

Study Tips & Exam Preparation

Expert tips to help you succeed in this course

1

Create concept maps linking Modules 2-4 compiler phases.

2

Practice converting regular expressions to DFAs from Units 2-4 weekly.

3

Implement parsing algorithms from Module 3 in a programming language.

4

Review symbol table organisation and usage from Unit 2.

5

Study code optimisation techniques from Unit 5 and apply them to sample code.

6

Focus on understanding the relationships between different compiler phases and their inputs/outputs.

7

Allocate equal time to studying each module, but prioritise areas where you feel less confident.

8

Form study groups to discuss complex concepts and solve practice problems together.

9

Review all TMAs and address any areas where you struggled.

10

Get enough rest and manage your time effectively during the exam period.

Related Courses

Other courses in Sciences that complement your learning