Programming Language Design and Implementation module (CS41005)

Learn how compilers and interpreters understand and analyse programming languages.

On this page
Credits

20

Module code

CS41005

Programming languages form a bridge between natural languages and machine code.

They allow developers to write programs and algorithms in a human-readable format, without the need for detailed knowledge of the computer's instructions. 
 

In order for these programs to run, they need to first be translated into machine code.

This is done by compilers and interpreters, which can understand a specific programming language and convert it into machine instructions that a computer can execute.

The development of a compiler or interpreter is a core part of designing a new programming language.

Understanding how these tools work does not only help in the development of programming language, but is also useful in working on language-specific tools or frameworks.

Furthermore, it can help you write more efficient and optimised code, and aid in troubleshooting and debugging of your programs.

What you will learn

In this module, you will:

  • study the Chomsky hierarchy and its relation to programming languages
  • learn about regular expressions and automata, and their relation to different types of parsers
  • explore the lexical, syntax, and semantic analysis of source code
  • study how compilers and interpreters convert source code into machine interpretable code

You will apply this knowledge to implement a language parser, as well as a syntactic and semantic analysis of source code.

By the end of this module, you will be able to:

  • demonstrate your understanding of how source code can be parsed and tokenised by different types of automata
  • explain the processes of lexical, syntax, and semantic analysis of source code
  • demonstrate your understanding of how compilers and interpreters work
  • implement a language parser
  • implement syntax and semantic analysis of source code languages

Assignments / assessment

  • lexical analysis and parsing (30%)
  • semantic and syntax analysis (30%)
  • written exam (40%)

Teaching methods / timetable

You will learn by taking a hands-on approach. This will involve taking part in seminars and practical sessions.

Seminars include presentations and activities on mechanisms used in source code parsing, compilation, and interpretation.

Learning material is provided through videos, review notes, examples, and tutorial questions.

Courses

This module is available on following courses: