The
Class test results
are available.
Compilers and Languages (Extended)
Students on the "Extended" module also need to do the continuous assessment. Make sure you know for which module (Extended or not) you are registered.
-
This module is a fairly standard introduction to compiler
construction. I will emphasize topics that are generally useful to
know about. In particularly these topics are helpful for
Secure Programming:
- Parse trees
- Static analysis
- Call stack
- Memory management
- Sample exam paper for Compilers and Languages
Books
- Andrew Appel. Modern Compiler Implementation in Java. 2nd edition. Cambridge University Press 2002.
Syllabus
Call stack
See Appel, 116-126.
- Layout of stack simple frames: parameters, local variables, return address
- You can see how the frame is accessed by compiling to assembly language; see an example of a C function compiled on a Sun SPARC.
- More advanced stack frames: call-by-reference, static link
- Consequences of stack allocation: variable args functions in C, smashing the stack by buffer overflow
Memory management and GC
See Appel, 257-268.
- Explicit memory management using a free list
- Reference counting
- Mark-sweep collection
- Copying garbage collection
Parsing: LL versus LR
- LL parsing is top down; the stack holds a prediction of the expected input
- LR parsing is bottom-up; the stack holds a reduction of the input that has already been read
Abstract syntax trees
Static analysis
See Appel, 203-213.
- Control flow graph
- Data flow equations: forward and backward
- Liveness analysis
- Other kinds of static analysis, e.g., for security
Code generation
See Appel, 176-183.
- Machine architecture defines tiles for instructions
- Code generation by tiling an expression tree
Compilation of objects and classes
- Fields as offsets, allowing inheritance by object extension
- Dynamic dispatch in method calls
Last modified: Monday, 01-Feb-2010 19:33:35 GMT