About

Couse Aims

The course aims to cover the key concepts, problems, and results in modern compilers. It will provide students with some practical experience of programming parts of a modern compiler and show how to build some program analysis tools, whilst focusing on program optimizations and program correctness. The course will also cover some of the runtime concepts. Lastly, some concurrency topics will be covered from the standpoint of both correctness of performance.

Here are some of the more practical skills you will learn in this course:

  • How to build static analysis tools to find bugs in your programs
  • How to build more effective systems by understand how compilers and runtimes interact
  • How to optimize your programs with the help of concurrency, without breaking them at the same time

Rough Outline of Topics

Below is a tentative list of topics we intend to cover. Given that this is a half-course, we likely will not cover all of this material, however:

  • Static analysis [7 hours]: Dataflow analysis and dominators: Applications of dataflow analysis: constant propagation, live variables, partial redundancy elimination • Analysis with SSA and inter-procedural SSA forms • Type checking and type inference • Pointer analysis, context sensitivity, analysis precision; Building a compiler and an analysis tool
  • Parallelism and concurrency [3 hours]: Loop optimizations and parallelism • Correctness of multithreaded and asynchronous programs • Runtime support for shared memory multithreading;
  • Runtime organization and analysis [4 hours]: Runtime organization and dynamic languages • Garbage collection • Model checking and symbolic execution

Prerequisites

To do well in this course, you should ideally have maturity in both the mathematics of computer science and in the engineering of computer systems. This means that you should: have a good understanding of data structures and algorithms; be comfortable writing programs from scratch in C, Java, and a scripting language like Python or JavaScript; be comfortable writing and debugging assembly code; and be somewhat comfortable in a command-line Unix development environment (gdb, gcc, etc). You should also have a reasonably good understanding of computer architecture and operating systems. You should have taken the first compiler course, CO221 as well.

It might be helpful, but not necessary if you have takes some of the following courses: CO440- Software ReliabilityCO382-Type Systems for Programming LanguagesCO303-Systems VerificationCO475-Software Engineering for Industry

Don't panic

Do not be scared if the list above seems a bit daunting: it is not likely that many of the enrolled students will have the "perfect" background in all of these topics. If you are missing a few of these skills, you should be able to learn them quickly, possibly with the assistance of our helpful TAs. You will need to learn things as you encounter them; this is a feature, not a bug. Most importantly, you should be eager to challenge yourself and learn!

Reading

Below are some suggested textbooks you may find useful. However, you are expected to follow the slides that will be posted here and participate in the lecture as much as you can.

  • Compilers: Principles, Techniques and Tools (Second Edition), Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, Addison-Wesley, 2007.
  • Advanced Compiler Design and Implementation 1st Edition, Steven Muchnick.
  • Modern compiler implementation in Java, Second Edition, Appel, Cambridge University Press.

Note, however, that there will be other handouts and supplementary reading materials that will be posted on the class schedule. You will need to read these before each class. These articles will often have a research focus, which frequently means that you will need to spend more some time on each, perhaps marking them up as you read. Please refer to these helpful guides on how to read research papers critically: link-1, link-2, link-3. Through these readings, you will be exposed to some topics that are "off the beaten path" and get more exposure to bleeding-edge research in computer security.

Hours

Class Time and Location:

Lectures will be held in Huxley 145, from 4--6pm on Thursdays.

Office Hours

Ben: Thursday after class and by appointment

Class schedule

This schedule is subject to modification; please check back often...

# Date Description Reading Assignments
January 19, 2017
January 26, 2017
February 2, 2017
February 9,2017
February 16, 2017
February 23, 2017
March 2, 2017
March 9, 2017
March 16, 2017

Materials from Jeff Ullman, Ana Milanova, and Stephen Chong were used in the preparation of some of these slides.

Extra reading:

These are some useful papers for you to read. They will likely help you when it comes to the assignments and the exam.

Assignments

Homeworks:

TBD

Your mark

  • 15% Coursework
  • 85% Exam

Contact Us

Communications

This term we will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TA, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com. Find our class page here.

Contacting couse staff

Email Address, to reach all staff: doc-staff-444H@imperial.ac.uk.