• Class Number 4283
  • Term Code 3430
  • Class Info
  • Unit Value 6 units
  • Mode of Delivery In Person
  • COURSE CONVENER
    • Prof Tony Hosking
  • LECTURER
    • Dr Eduardo Souza
  • Class Dates
  • Class Start Date 19/02/2024
  • Class End Date 24/05/2024
  • Census Date 05/04/2024
  • Last Date to Enrol 26/02/2024
  • TUTOR
    • Alex Mirrlees-Black
SELT Survey Results

Compiler Construction provides an in-depth treatment of programming language translation, compilation, and run-time systems, organised around a significant programming project to build a compiler for a simple, but non-trivial core programming language. The course integrates both theory and practice. Topics include data structures for tree languages; lexical analysis, syntax analysis and abstract syntax; symbol tables and semantic analysis; translation, intermediate code, basic blocks and traces; machine targets and instruction selection; liveness analysis and graph colouring register allocation. Supplemental topics may include garbage collection, object-oriented languages, higher-order languages, dataflow analysis, optimisation, polymorphism, dynamic compilation, scheduling, pipelining and memory hierarchies. Upon completion of the course students will understand how programs map to execution on modern processors, and the impact of language design on language implementation.

Learning Outcomes

Upon successful completion, students will have the knowledge and skills to:

  1. Explain how programs that process other programs treat the other programs as their input data, and describe the benefits of having program representations other than source code.
  2. Distinguish a language definition (syntax and semantics) from a particular language implementation (evaluation by interpreter or by compilation).
  3. Use formal grammars to specify the syntax of languages, and understand key issues of ambiguity, associativity and precedence.
  4. Sketch a low-level run-time representation of core language constructs, such as objects or closures.
  5. Identify and implement essential steps for automatically converting source code into assembly or other low-level languages.
  6. Define useful static analyses in terms of a conceptual framework such as data-flow analysis and use the results of a static analysis for program optimization.

Research-Led Teaching

This course will draw upon the deep research experience of the conveners in programming language design and implementation (PLDI) to give insights into the implementation of modern programming languages. Students will acquire the skills to work on research projects in PLDI.

Examination Material or equipment

Open book, open notes. No electronic devices.

Required Resources

The recommended course text is “the tiger book” by Andrew Appel and Jens Palsberg.1

Additional references include “the dragon book”2 and Engineering a Compiler.3

  1. Modern Compiler Implementation in Java, Second Edition Second Edition, Andrew W. Appel and Jens Palsberg, Cambridge University Press, 2002, 978-0521820608. ?
  2. Compilers: Principles, Techniques, and Tools Aho, Lam, Sethi, Ullman, Addison-Wesley, 2007, 978-0133002140 ?
  3. Engineering a Compiler, Third Edition, Keith D. Cooper and Linda Torczon, Elsevier, 2022, 978-0128154120 ?


There are a variety of online platforms you will use to participate in your study program. These could include videos for lectures and other instruction, two-way video conferencing for interactive learning, email and other messaging tools for communication, interactive web apps for formative and collaborative activities, print and/or photo/scan for handwritten work and drawings, and home-based assessment.

ANU outlines recommended student system requirements to ensure you are able to participate fully in your learning. Other information is also available about the various Learning Platforms you may use.

Staff Feedback

Students will be given feedback in the following forms in this course:

  • written comments
  • verbal comments
  • feedback to whole class, groups, individuals, focus group etc

Student Feedback

ANU is committed to the demonstration of educational excellence and regularly seeks feedback from students. Students are encouraged to offer feedback directly to their Course Convener or through their College and Course representatives (if applicable). Feedback can also be provided to Course Conveners and teachers via the Student Experience of Learning & Teaching (SELT) feedback program. SELT surveys are confidential and also provide the Colleges and ANU Executive with opportunities to recognise excellent teaching, and opportunities for improvement.

Other Information

Use of Generative AI tools

This course introduces fundamental concepts that could potentially be addressed by certain Generative AI tools (e.g., ChatGPT). Hence, the use of any Generative AI tools is NOTpermitted in graded assessments within this course.

Class Schedule

Week/Session Summary of Activities Assessment
1 Introduction, Lexical Analysis—Scanner Introduction
2 Syntactic Analysis—Parser Lab/programming assignment task 1—syntactic analysis
3 Error Handling and Declarative Tools, Abstract Syntax Trees Lab/programming assignment task 1 continued—syntactic analysis
4 Type Checking Lab/programming assignment task 2—semantic analysis
5 Semantic Analysis Lab/programming assignment task 2 continued—semantic analysis
6 Activation Records Mid-term test (lexical, syntactic, semantic analysis)Lab/programming assignment task 3—translation
7 Translation to Intermediate Code & Basic Blocks Lab/programming assignment task 3 continued—translation
8 Instruction Selection Lab/programming assignment task 4 continued—instruction selection
9 Liveness Analysis Lab/programming assignment task 4 continued—instruction selection
10 Register Allocation Lab/programming assignment task 5—register allocation
11 Advanced Topics (TBD) Lab/programming assignment task 5 continued—register allocation
12 Advanced Topics (TBD) Final exam prep (code generation; object representation; optimisation)Lab/programming assignment task 5 continued—register allocation

Tutorial Registration

ANU utilises MyTimetable to enable students to view the timetable for their enrolled courses, browse, then self-allocate to small teaching activities / tutorials so they can better plan their time.

Find out more on the Timetable webpage.

Assessment Summary

Assessment task Value Due Date Learning Outcomes
Programming assignment—syntactic analysis 7 % 12/03/2024 1,2,3
Programming assignment—semantic analysis 8 % 25/03/2024 2,3,4
Programming assignment—translation 10 % 22/04/2024 2,3,4,5
Programming assignment—instruction selection 10 % 06/05/2024 4,5,6
Programming assignment—register allocation 10 % 24/05/2024 5,6
Midterm test 20 % 28/03/2024 1,2,3,4
Final exam 35 % * 4,5,6

* If the Due Date and Return of Assessment date are blank, see the Assessment Tab for specific Assessment Task details

Policies

ANU has educational policies, procedures and guidelines , which are designed to ensure that staff and students are aware of the University’s academic standards, and implement them. Students are expected to have read the Academic Integrity Rule before the commencement of their course. Other key policies and guidelines include:

Assessment Requirements

The ANU is using Turnitin to enhance student citation and referencing techniques, and to assess assignment submissions as a component of the University's approach to managing Academic Integrity. For additional information regarding Turnitin please visit the Academic Skills website. In rare cases where online submission using Turnitin software is not technically possible; or where not using Turnitin software has been justified by the Course Convener and approved by the Associate Dean (Education) on the basis of the teaching model being employed; students shall submit assessment online via ‘Wattle’ outside of Turnitin, or failing that in hard copy, or through a combination of submission methods as approved by the Associate Dean (Education). The submission method is detailed below.

Moderation of Assessment

Marks that are allocated during Semester are to be considered provisional until formalised by the College examiners meeting at the end of each Semester. If appropriate, some moderation of marks might be applied prior to final results being released.

Examination(s)

Final Exam

Assessment Task 1

Value: 7 %
Due Date: 12/03/2024
Learning Outcomes: 1,2,3

Programming assignment—syntactic analysis

Compiler phase 1—using scanner/parser generator to generate abstract syntax trees for a simple programming language

Assessment Task 2

Value: 8 %
Due Date: 25/03/2024
Learning Outcomes: 2,3,4

Programming assignment—semantic analysis

Compiler phase 2—analyse abstract syntax trees to perform type checking and storage assignment

Assessment Task 3

Value: 10 %
Due Date: 22/04/2024
Learning Outcomes: 2,3,4,5

Programming assignment—translation

Compiler phase 3—generate machine-independent intermediate code from abstract syntax trees and storage assignment

Assessment Task 4

Value: 10 %
Due Date: 06/05/2024
Learning Outcomes: 4,5,6

Programming assignment—instruction selection

Compiler phase 4—generate machine code instructions from intermediate code

Assessment Task 5

Value: 10 %
Due Date: 24/05/2024
Learning Outcomes: 5,6

Programming assignment—register allocation

Compiler phase 5—generate assembly code via control-flow/data-flow analysis and register allocation, followed by assembly and linkage to produce executable binary programs

Assessment Task 6

Value: 20 %
Due Date: 28/03/2024
Learning Outcomes: 1,2,3,4

Midterm test

Test on first half of the course. This test will cover the front-end of compilation: concrete and abstract syntax, semantic analysis, symbol tables, activation records.

Assessment Task 7

Value: 35 %
Learning Outcomes: 4,5,6

Final exam

Comprehensive exam covering all aspects of the course, including front-end, but with focus on back-end of compilation: intermediate code generation, control-flow/data-flow analysis, instruction selection, low-level representations, optimization.

Academic Integrity

Academic integrity is a core part of the ANU culture as a community of scholars. The University’s students are an integral part of that community. The academic integrity principle commits all students to engage in academic work in ways that are consistent with, and actively support, academic integrity, and to uphold this commitment by behaving honestly, responsibly and ethically, and with respect and fairness, in scholarly practice.


The University expects all staff and students to be familiar with the academic integrity principle, the Academic Integrity Rule 2021, the Policy: Student Academic Integrity and Procedure: Student Academic Integrity, and to uphold high standards of academic integrity to ensure the quality and value of our qualifications.


The Academic Integrity Rule 2021 is a legal document that the University uses to promote academic integrity, and manage breaches of the academic integrity principle. The Policy and Procedure support the Rule by outlining overarching principles, responsibilities and processes. The Academic Integrity Rule 2021 commences on 1 December 2021 and applies to courses commencing on or after that date, as well as to research conduct occurring on or after that date. Prior to this, the Academic Misconduct Rule 2015 applies.

 

The University commits to assisting all students to understand how to engage in academic work in ways that are consistent with, and actively support academic integrity. All coursework students must complete the online Academic Integrity Module (Epigeum), and Higher Degree Research (HDR) students are required to complete research integrity training. The Academic Integrity website provides information about services available to assist students with their assignments, examinations and other learning activities, as well as understanding and upholding academic integrity.

Online Submission

You will be required to electronically sign a declaration as part of the submission of your assignment. Please keep a copy of the assignment for your records. Unless an exemption has been approved by the Associate Dean (Education) submission must be through Turnitin. This course will use CECC GitLab and git for assignment distribution and turnin. Source code analysis tools will also be used to manage academic integrity.

Hardcopy Submission

For some forms of assessment (hand written assignments, art works, laboratory notes, etc.) hard copy submission is appropriate when approved by the Associate Dean (Education). Hard copy submissions must utilise the Assignment Cover Sheet. Please keep a copy of tasks completed for your records.

Late Submission

Late submission not permitted. Submission of assessment tasks without an extension after the due date is not permitted, a mark of 0 will be awarded.

Referencing Requirements

The Academic Skills website has information to assist you with your writing and assessments. The website includes information about Academic Integrity including referencing requirements for different disciplines. There is also information on Plagiarism and different ways to use source material.

Returning Assignments

Work will be returned online in gitlab, wattle, and via email.

Extensions and Penalties

Extensions and late submission of assessment pieces are covered by the Student Assessment (Coursework) Policy and Procedure. Extensions may be granted for assessment pieces that are not examinations or take-home examinations. If you need an extension, you must request an extension in writing on or before the due date. If you have documented and appropriate medical evidence that demonstrates you were not able to request an extension on or before the due date, you may be able to request it after the due date.

Privacy Notice

The ANU has made a number of third party, online, databases available for students to use. Use of each online database is conditional on student end users first agreeing to the database licensor’s terms of service and/or privacy policy. Students should read these carefully. In some cases student end users will be required to register an account with the database licensor and submit personal information, including their: first name; last name; ANU email address; and other information.
In cases where student end users are asked to submit ‘content’ to a database, such as an assignment or short answers, the database licensor may only use the student’s ‘content’ in accordance with the terms of service – including any (copyright) licence the student grants to the database licensor. Any personal information or content a student submits may be stored by the licensor, potentially offshore, and will be used to process the database service in accordance with the licensors terms of service and/or privacy policy.
If any student chooses not to agree to the database licensor’s terms of service or privacy policy, the student will not be able to access and use the database. In these circumstances students should contact their lecturer to enquire about alternative arrangements that are available.

Distribution of grades policy

Academic Quality Assurance Committee monitors the performance of students, including attrition, further study and employment rates and grade distribution, and College reports on quality assurance processes for assessment activities, including alignment with national and international disciplinary and interdisciplinary standards, as well as qualification type learning outcomes.

Since first semester 1994, ANU uses a grading scale for all courses. This grading scale is used by all academic areas of the University.

Support for students

The University offers students support through several different services. You may contact the services listed below directly or seek advice from your Course Convener, Student Administrators, or your College and Course representatives (if applicable).

Prof Tony Hosking
U1817699@anu.edu.au

Research Interests


Programming Language Design and Implementation, Compilers, Interpreters, Language Runtime Systems

Prof Tony Hosking

By Appointment
Dr Eduardo Souza
X
luiseduardo.desouzaamorim@anu.edu.au

Research Interests


Dr Eduardo Souza

Sunday
Alex Mirrlees-Black
X
alex.mirrlees-black@anu.edu.au

Research Interests


Alex Mirrlees-Black

Sunday

Responsible Officer: Registrar, Student Administration / Page Contact: Website Administrator / Frequently Asked Questions