 | |  |  | Course module |  | NWI-IMC004 | Category |  | MA (Master) | Language of instruction |  | English | Offered by |  | Radboud University; Faculty of Science; Informatica en Informatiekunde; | Lecturer(s) |  | | | Academic year | | 2019 | | Period | | KW3-KW4 | (03/02/2020 to 30/08/2020) |
| Starting block | | KW3 |  |
| Course mode | | full-time |  |
| Remarks | | - | Registration using OSIRIS | | Yes | Course open to students from other faculties | | Yes | Pre-registration | | No | Waiting list | | No | Placement procedure | | - |
|  |  |  |  |  |
At the end of the course you can build a compiler for a small programming language in a well structured manner, and you know and can use the required algorithms and tools. You can create a grammar for a programming language, build a parser for it, perform static analysis, create an abstract syntax tree, and generate code.
|
|
It is important to know how compilers work because many applications actually act as a compiler: they translate input written in some language to output in some other. So, compiler construction is a basic discipline for any computer scientist.
The construction of a compiler is a natural meeting place of many computer science fields. You work with finite automata, grammars, parsers, tree structures and graphs, recursive algorithms, typing systems, code generation algorithms, to name a few.
In this course you will stepwise construct, in your own favourite language, a basic compiler for a small but representative language, SPL (Simple Programming Language). The main steps are 1) the construction of a parser for SPL which generates an abstract syntax tree; 2) the implementation of a type checker / type inferencing system for SPL; 3) a code generation for a simple stack machine.
As final project, you either choose to extend SPL with new features, or to generate code for some concrete machine architecture.
|
 |
| | Experience with imperative, object oriented, and functional programming languages. Language and automata theory. |
| Subsequent exercises of 3 main topics: parsing, typing, code generation, leading to a working compiler for a small programming language. Case-study to a self-selected extension of the compiler (paper, presentation, perhaps implementation). Individual oral exam covering all material, exercises, implementation, and case-study. |
| |
|
|
Compilers, grammars, parsers, abstract syntax treesStatic analysis - a.o. type checking, Code generation, basic blocks and traces, instruction selection, liveness analysis, register allocation |
Subsequent exercises of 3 main topics: parsing, typing, code generation, leading to a working compiler for a small programming language. Case-study to a self-selected extension of the compiler (paper, presentation, perhaps implementation). Individual oral exam covering all material, exercises, implementation, and case-study. |
Experience with imperative, object oriented, and functional programming languages. Language and automata theory. |
|  |  | Required materialsReaderLectures notes available from Blackboard |
 |
|
Recommended materialsBookAlfred Aho, Ravi Sethi, and Jeffrey Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986. |
 | BookAndrew Appel. Modern Compiler Implementation in Java. Cambridge University Press, 1998 |
 | BookBenjamin Pierce. Types and Programming Languages. MIT Press, 2002. • Michael Scott. Programming Language Pragmatics. Morgan Kauffman, 2009. |
 | BookDick Grune, Henri Bal, Ceriel Jacobs, and Koen Langedoen. Modern Compiler Design. John Wiley & Sons, 2000. |
 |
|
Instructional modes Course occurrence 
 | Exam Q4 
 | Lecture 
 | Resit Exam Q4 
 | Tutorial 
 | Zelfstudie 
 |
| Tests Final gradeTest weight |  | 1 |
Opportunities |  | Block KW4, Block KW4 |
 |
|
|  | |
  |  |
|  |