SWEN430 (2021) - Compiler Engineering

Prescription

The course looks at a range of issues relating to the design and implementation of modern compilers. In particular, the course will focus on techniques and algorithms for code generation, code optimisation and type checking. During the course projects, students will be working on a fully-fledged compiler for a small imperative language. Students should expect to learn a great deal about how compilers work and, in particular, about the Java Bytecode and x86 instruction sets.

Course learning objectives

Students who pass this course should be able to:

  1. Understand basic principles of a compiler
  2. Understand scanning and parsing stages of the compiler
  3. Understand type checking stages of the compiler, including the basics of type systems
  4. Understand what dataflow analysis is and how it is used within a compiler
  5. Understand the code generation stage of the compiler, including knowledge of Java Bytecode
  6. Have a good background for continued research in these areas

Course content

The course is primarily offered in-person, but there will also be a remote option and there will be online alternatives for all the components of the course for students who cannot attend in-person.
 
Students taking this course remotely must have access to a computer with camera and microphone and a reliable high speed internet connection that will support real-time video plus audio connections and screen sharing.  Students must be able to use Zoom; other communication applications may also be used. A mobile phone connection only is not considered sufficient.   The computer must be adequate to support the programming required by the course: a reasonably powerful modern windows, macintosh, or unix laptop or desktop computer will be sufficient, but an Android or IOS tablet will not.
 
If the assessment of the course includes tests, the tests will generally be run in-person on the Kelburn campus. There will be a remote option for students who cannot attend in-person and who have a strong justification (for example, being enrolled from overseas).
The remote test option will use Zoom for online supervision of the tests and you must be able to use Zoom with a camera, microphone, and screen-sharing. Students who will need to use the remote test option must contact the course coordinator in the first two weeks to get permission and make arrangements.
 
=========================================
 
SWEN 430 looks at a range of issues relating to the modern compiler engineering. In particular, the course will focus on techniques and algorithms for code generation, code optimisation and type checking. During the course projects, students will develop a fully-fledged compiler for a small imperative language. Students should expect to learn a great deal about how compilers work and, in particular, about the Java Bytecode and x86 instruction sets.
The aim of this course is to introduce the ideas, techniques and algorithms which form the foundation of modern compilers. The course has a practical focus and students will develop their compiler in the Java language. If you have concerns about whether your Java skills are sufficient, you should speak to the course coordinator as soon as possible.

Withdrawal from Course

Withdrawal dates and process:
https://www.wgtn.ac.nz/students/study/course-additions-withdrawals

Lecturers

Dr David Pearce (Coordinator)

Dr Jens Dietrich

Teaching Format

This course will be offered in-person and online.  For students in Wellington, there will be a combination of in-person components and web/internet based resources. It will also be possible to take the course entirely online for those who cannot attend on campus, with all the components provided in-person also made available online.
 
During the trimester there will be two lectures per week.

Student feedback

Student feedback on University courses may be found at:  www.cad.vuw.ac.nz/feedback/feedback_display.php

Dates (trimester, teaching & break dates)

  • Teaching: 05 July 2021 - 08 October 2021
  • Break: 16 August 2021 - 29 August 2021
  • Study period: 11 October 2021 - 14 October 2021
  • Exam period: 15 October 2021 - 06 November 2021

Class Times and Room Numbers

05 July 2021 - 15 August 2021

  • Tuesday 13:10 - 14:00 – 104, Alan MacDiarmid Building, Kelburn
  • Thursday 13:10 - 14:00 – 104, Alan MacDiarmid Building, Kelburn
30 August 2021 - 10 October 2021

  • Tuesday 13:10 - 14:00 – 104, Alan MacDiarmid Building, Kelburn
  • Thursday 13:10 - 14:00 – 104, Alan MacDiarmid Building, Kelburn

Required

There is no set text for SWEN 430, but the following book contains most of the material presented in this course and is on closed reserve in VUW Library:

  • Modern Compiler Implementation in Java, Andrew Appel. (closed reserve)

Other books of interest include:

  • Engineering a Compiler, Keith D. Cooper and Linda Toczon. See Chapter 8. [1 copy in library]
  • Compilers: Principles, Techniques and Tools, Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman. See Chapter 10. [1 copy in library]
  • Advanced Compiler Design and Implementation, Steve S. Muchnick. See Chapter 9.
  • Optimizing Compilers for Modern Architectures, Randy Allen and Ken Kennedy. See Chapter 4.4 and 11.

Mandatory Course Requirements

In addition to achieving an overall pass mark of at least 50%, students must:

  • Achieve at least 40% average across all of the assignments, and
  • Achieve at least 40% in the final test, to demonstrate achievement of all the CLOs of the course.

If you believe that exceptional circumstances may prevent you from meeting the mandatory course requirements, contact the Course Coordinator for advice as soon as possible.

Assessment

Assessment ItemDue Date or Test DateCLO(s)Percentage
Assignment 1CLO: 1,210%
Assignment 2CLO: 1,3,415%
Assignment 3CLO: 1,4,515%
Assignment 4CLO: 1,4,520%
TestCLO: 1,2,3,4,5,640%

Penalties

Late submissions will incur an automatic penalty of 10% of the final mark per day. Submission between 0 and 24 hours late will be counted as one day late; those betwee 24 and 48 hours late will be counted as two dates late, etc. Any request for an extension must be made to the lecturer in charge prior to the due date. Any extensions requested on the basis of medical grounds must be supported by a doctor's certificate.

Extensions

If you anticipate difficulty in meeting a deadline, please approach the course coordinator as soon as possible so an extension can be agreed upon.

Submission & Return

Work for marking should be submitted electronically using the ECS Submission System. Marked projects will be available at lectures, or from the School Office.

Workload

In order to maintain satisfactory progress in SWEN 430, you should plan to spend an average of 10 hours per week on this paper. A plausible and approximate breakdown for these hours would be:

  • Lectures: 2 hours,
  • Readings: 3 hours,
  • Assignments: 5 hours.

Teaching Plan

See: https://ecs.wgtn.ac.nz/Courses/SWEN430_2021T2/LectureSchedule

Communication of Additional Information

All online material for this course can be accessed at https://ecs.wgtn.ac.nz/Courses/SWEN430_2021T2/

Offering CRN: 18668

Points: 15
Prerequisites: COMP 261 or SWEN 324 (or 224); 30 further 300-level points from (COMP, NWEN 303, SWEN)
Duration: 05 July 2021 - 07 November 2021
Starts: Trimester 2
Campus: Kelburn