CS 142B — Language Processor Construction (Compiler Construction), 2019 Spring



What is this course about?

This is a project class for undergraduate students in which students will construct their own Java bytecode compiler in C/C++. The goal of this course is to provide students hands-on experience with compiler construction and optimization so they can apply and consolidate their existing knowledge of compilers.



Does this course have prerequisites?

Yes. This is a compiler construction project class. To enroll this course, students must have already taken "CS 142A Compilers and Interpreters" as a prerequisite. This course requires students to already have enough fluency with C/C++ programming.



Course Organization

  • Phase 1: Parsing Java bytecode
  • Phase 2: Building a Java bytecode interpreter
  • Phase 3: Building SSA Intermediate Representation
  • Phase 4: Developing SSA-based optimizations
  • Phase 5: Register allocation
  • Phase 6: Generating x86 machine code


Full Schedule



Testcases



Slack Channel

This course is a small class so it did not get assigned a TA and thus there's no lab sessions. However, we will have a slack channel where students can help each other by questioning and answering their questions. Also, any course-/schedule-related information will be announced through this stack channel.



Grading

At the end of the quarter, each student will present his/her project.

  • You will receive at least a B if your compiler can parse and interpret the bytecode and generate SSA.
  • You will receive at least an A if your compiler can generate x86 machine code and passes all my test cases.
  • You will receive an A+ if your compiler does everything and has one additional dataflow optimization implemented.


Acknowledgements

My great thanks to Prof. Harry Xu, Prof. Michael Franz and Lumen Hwang for their advice, information and help in organizing this course.