Compilers

Alex Aiken, Professor, Stanford University

This course will discuss the major ideas used today in the implementation of programming language compilers. You will learn how a program written in a high-level language designed for humans is systematically translated into a program written in low-level assembly more suited to machines!

This course will discuss the major ideas used today in the implementation of programming language compilers, including lexical analysis, parsing, syntax-directed translation, abstract syntax trees, types and type checking, intermediate languages, dataflow analysis, program optimization, code generation, and runtime systems. As a result, you will learn how a program written in a high-level language designed for humans is systematically translated into a program written in low-level assembly more suited to machines. Along the way we will also touch on how programming languages are designed, programming language semantics, and why there are so many different kinds of programming languages.

The course lectures will be presented in short videos. To help you master the material, there will be in-lecture questions to answer, quizzes, and two exams: a midterm and a final. There will also be homework in the form of exercises that ask you to show a sequence of logical steps needed to derive a specific result, such as the sequence of steps a type checker would perform to type check a piece of code, or the sequence of steps a parser would perform to parse an input string. This checking technology is the result of ongoing research at Stanford into developing innovative tools for education, and we're excited to be the first course ever to make it available to students.

An optional course project is to write a complete compiler for COOL, the Classroom Object Oriented Language. COOL has the essential features of a realistic programming language, but is small and simple enough that it can be implemented in a few thousand lines of code. Students who choose to do the project can implement it in either C++ or Java.
I hope you enjoy the course!

Why Study Compilers?

Everything that computers do is the result of some program, and all of the millions of programs in the world are written in one of the many thousands of programming languages that have been developed over the last 60 years. Designing and implementing a programming language turns out to be difficult; some of the best minds in computer science have thought about the problems involved and contributed beautiful and deep results. Learning something about compilers will show you the interplay of theory and practice in computer science, especially how powerful general ideas combined with engineering insight can lead to practical solutions to very hard problems. Knowing how a compiler works will also make you a better programmer and increase your ability to learn new programming languages quickly.

FAQ

  • Will I get a statement of accomplishment after completing this class?

    Yes. Students who successfully complete the class will receive a statement of accomplishment signed by the instructor.

  • How is the class structured?

    Each week there will be a number of videos to watch, most of which will include an in-video quiz question to answer. Most weeks there will also be homeworks (done on-line) and a quiz. There will be also be a midterm and a final exam. For those doing the course project, there will be 5 programming assignments, which you will do on your own using infrastructure that we provide.

  • Are the lectures available in a file format?

    Yes. The slides from the lectures will be available in both annotated and unannotated form.

  • Do I need a textbook?

    No, no textbook is required for the class. However, you may find a textbook useful as a reference or to learn more details of some of the ideas discussed in the course. There are a number of good textbooks on compilers; here are three in particular:

    1. Compilers: Principles, Techniques, and Tools (Second Edition)
      Alfred Aho, Monica Lam, Ravi Sethi, and Jeffrey Ullman.
      Addison-Wesley
    2. Modern Compiler Implementation in Java (Second Edition)
      Andrew Appel and Jens Palsberg.
      Cambridge University Press
    3. Engineering a Compiler
      Keith Cooper and Linda Torczon
      Morgan Kaufman
  • How do I ask questions?

    There will be an on-line discussion forum in which students can ask questions and receive answers. While the scale of an on-line class means that often the fastest (and best!) answer comes from another student, the course staff will monitor the discussions for accuracy and to address questions where the student community particularly wants to hear from the staff.

  • Is the compiler project required?

    No. You can take the class without doing the programming assignments.

  • How difficult is the compiler project? What background and tools do I need?

    This question is very hard to answer as the level of difficulty will vary depending on your programming background. As a rough guide, you should already be an experienced programmer and be comfortable writing substantial C++ or Java programs; writing a compiler is not a good way to learn either programming or these particular languages. The project also makes use of software tools, so you should also be comfortable learning to use new tools on your own. It is not a problem if you start the project but don't finish it; we will just consider you to be enrolled in the non-project option of the class in this case.

Dates:
  • 17 March 2014, 11 weeks
  • 11 February 2013, 11 weeks
  • 1 October 2012, 11 weeks
  • 23 April 2012, 10 weeks
  • Details to be announced
Course properties:
  • Free:
  • Paid:
  • Certificate:
  • MOOC:
  • Video:
  • Audio:
  • Email-course:
  • Language: English Gb

Reviews

No reviews yet. Want to be the first?

Register to leave a review

Show?id=n3eliycplgk&bids=695438
NVIDIA
More on this topic:
24422_c7bf_4 Learn To Program with Pascal
Master programming on Windows or Mac OS X with Lazarus & Free Pascal or Delphi
Cplusplus_pic C++ For C Programmers
This course is for experienced C programmers who want to program in C++. The...
111712_d7d9_7 C Programming For Beginners
Learn C in ten easy steps on Windows, Mac OS X or Linux
6-035s10 Computer Language Engineering
This course analyzes issues associated with the implementation of higher-level...
54453_902c_5 Online Courses - Anytime, Anywhere
Learn how to successfully implement Fast ForWord in your school. This course...
More from 'Computer Science':
0ebff2a6-62d3-43f2-9924-ecf153cd2550-55dac65a881d.small Bias and Discrimination in AI
Discover how even computer algorithms may be biased and have a serious impact...
C3a60328-0870-4ca0-b57f-50d70eb2ee6a-dbb0c2dbc813.small Deep Learning Essentials
Do you want to learn how machines can learn tasks we thought only human brains...
34ea79ed-b0c4-4a12-aeb6-64a5b507607a-6d1e5b2a57c3.small Machine Learning with Python: A Practical Introduction
Machine Learning can be an incredibly beneficial tool to uncover hidden insights...
3a287fad-9544-46ea-bc6a-85863940a402-98b9d78d8cba.small Compilers
This self-paced course will discuss the major ideas used today in the implementation...
F0e739b2-40cc-49bf-8f24-11a41b54ac16-2355c3022040.small Automata Theory
This course covers the theory of automata and languages. We begin with a study...
More from 'Coursera':
Success-from-the-start-2 First Year Teaching (Secondary Grades) - Success from the Start
Success with your students starts on Day 1. Learn from NTC's 25 years developing...
New-york-city-78181 Understanding 9/11: Why Did al Qai’da Attack America?
This course will explore the forces that led to the 9/11 attacks and the policies...
Small-icon.hover Aboriginal Worldviews and Education
This course will explore indigenous ways of knowing and how this knowledge can...
Ac-logo Analytic Combinatorics
Analytic Combinatorics teaches a calculus that enables precise quantitative...
Talk_bubble_fin2 Accountable Talk®: Conversation that Works
Designed for teachers and learners in every setting - in school and out, in...

© 2013-2019