Notices

  • 2024 Exam Paper (Q5)

    Posted by Jingling Xue 14 days ago.

    Dear COMP3131/9102 Students,

    You may disregard this announcement if you have not downloaded the past exam papers yet.

    The solution for Question 5 of the 2024 exam paper was inaccurate. Please redownload the zip file.

  • Assignment 5 Marked

    Posted by Jingling Xue 15 days ago.

    Dear COMP3131/9102 Students,

    Assignment 5 has been marked. If you have any concerns regarding your marks, please let me know.

    As usual, you can view the feedback for this assignment on the course page.

  • Variable Initialisation

    Posted by Jingling Xue 19 days ago, last modified 19 days ago.

    Dear COMP3131/9102 Students,

    One of the learning outcomes of this course is developing the ability to read and understand programming language specifications.

    The Assignment 5 specification clearly states that, for all test cases used in marking, all variables will be initialised. However, this does not mean that every global variable must be explicitly initialised.

    Please refer to Section 6.1 of the VC specification to understand how global variables are initialised by default.




  • Tomorrow's final lecture

    Posted by Jingling Xue 20 days ago, last modified 20 days ago.

    Dear COMP3131/9102 Students,

    In tomorrow's final lecture, I will briefly introduce the Java class file format, provide a short revision, and conclude with a discussion about the forthcoming exam.

  • Testing your Assignment 5 solution thoroughly

    Posted by Jingling Xue 20 days ago.

    Dear COMP3131/9102 Students,

    I have received a number of submissions for Assignment 5 and have tentatively marked a few. I have encountered a range of issues, including:

    1. Jasmin instructions or directives that are syntactically incorrect, causing the Jasmin assembler to reject the generated code,
    2. Runtime exceptions (e.g., null pointer exceptions), leading to crashes in the code generator, and
    3. Incorrect stack size declarations, resulting in JVM crashes.

    If your code generator relies on modifications to the AST that are only supported by your own type checker, you should also consider submitting your type checker. This will allow us to use your checker when marking your code generator implementation.

  • How to Mark Assignment 5

    Posted by Jingling Xue 20 days ago.

    Dear COMP3131/9102 Students,


    This is a compiler course, and the assignment specification should have clarified how your submission will be assessed.

    To verify the correctness of your VC compiler in Assignment 5, we will compare the runtime outputs produced by your compiler with those from the reference compiler. Please note that comparing the generated Jasmin instructions directly is not meaningful for assessment purposes.

    Given a test case such as test1.vc , the process is as follows:

    Running the reference solution:

    % java VC.vc test1.vc 
    % jasmin test1.j
    % java test1 > our_solution

    Running your solution:

    % java VC.vc test1.vc 
    % jasmin test1.j 
    % java test1 > your_solution 

    Comparing the outputs:

    % diff our_solution your_solution 

    The two outputs must be identical . Any difference indicates that your compiler is incorrect.

  • Reference Solutions

    Posted by Jingling Xue 21 days ago, last modified 21 days ago.

    Dear COMP3131/9102 Students,

    When using a solution provided only as class files, ensure that these class files have later modification timestamps than your own Java source files. This prevents your Java files from being recompiled. Alternatively, you can move your Java files to a different location.

    To use the reference checker solution, for example, follow these steps:

    1, Download Checker.zip from the class account.

    2, Unzip and install it according to the instructions in the Assignment 5 spec.

    3. Change your current working directory to Checker.

    4. Run the following command to update the modification times of all class files.

    touch *.classes

  • Today's Lecture Recording

    Posted by Jingling Xue 24 days ago, last modified 24 days ago.

    Dear COMP3131/9102 Students,

    For today's lecture, it appears that Screen #1 was not captured. I have reported the issue to Classroom Management.

    In the meantime, I have made a past lecture recording available at the same location where you can access today's lecture slides:





  • Past Exam Papers

    Posted by Jingling Xue 24 days ago.

    Dear COMP3131/9102 Students,

    You can download several past exam papers and their solutions from the class account.

    Click on Exams in the course menu and follow the download instructions.

  • Assignment 5 Again

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    In Assignment 5, you will implement a code generator by writing another visitor as part of the VC compiler pipeline. This builds on your experience from the previous type-checking assignment, particularly your understanding of the visitor design pattern. By now, you should be more confident in applying this pattern effectively, and it should already be part of your skill set.

    To help you get started, approximately 70% of the code has been provided in the starter package. This includes most of the logic for handling scalar variables. Your main task is to complete the remaining functionality, which focuses on correctly generating code for arrays.

    Please review this week's lecture notes and watch the lecture recordings, as they introduce key concepts and offer guidance specific to this assignment. Although this is the final assignment in the course, it brings together many of the ideas you have encountered in previous courses—such as object-oriented programming and software engineering—while also helping you learn new concepts like JVM and bytecode. It represents an important step toward building a fully functioning compiler for the VC language. I hope you find the process both intellectually stimulating and rewarding.

  • Today's lecture

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    In today's lecture, I will cover a few code generation issues that I did not have time to elaborate on yesterday. The goal is to help you develop a better understanding of our code generation approach, the Jasmin assembly language, and the JVM.

  • Assignment 4 Marked

    Posted by Jingling Xue about a month ago.

    Assignment 4 has been marked. Please check your marks and let me know if you have any concerns."

  • Bonus Assignment

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,


    The spec for the bonus assignment is now available.

  • Assignment 5 Spec

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    The spec for Assignment 5 has just been released.

  • WebCMS Notifications

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    WebCMS has been inconsistent this year in notifying me of your posts. Sometimes I receive a notification immediately, other times it is delayed by several hours—five, ten, twenty, or more—and not infrequently, I do not receive one at all.

    I usually respond to your posts promptly. If you do not see a reply within a few hours (unless you posted late at night), please send me an email to let me know about your posts.

  • This afternoon's tutorials will be done online

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    The tutor is sick and will have to conduct this afternoon's tutorials online.

    The meeting links for this afternoon:

    COMP3131 Tuesday 3pm Makeup

    Invite link: https://unsw.zoom.us/j/83495882624

    Meeting Id: 834 9588 2624

    COMP3131 Tuesday 4pm Makeup

    Invite link: https://unsw.zoom.us/j/84206245300

    Meeting Id: 842 0624 5300

    COMP3131 Tuesday 5pm Makeup

    Invite link: https://unsw.zoom.us/j/81533653969

    Meeting Id: 815 3365 3969

  • Yesterday's 6pm Tutorial

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    Since the tutor accidentally missed yesterday's 6pm tutorial, students in this class are kindly asked to watch the recorded session.
    I apologize for any inconvenience this may have caused.

  • Today's tutorial at 6pm

    Posted by Jingling Xue about a month ago.

    Dear COMP3131/9102 Students,

    It is a bit too late, but I am now forwarding this email from the tutor:

    Apologies to students who were waiting in the 6pm tutorial today.

    I have missed it by mistake. There will still be a 7pm tutorial if you are able to attend.

    Kind regards,

    Owen


    I hope you can also watch the recorded tutorial if you have missed the 6pm tutorial.
    Please accept my apologies as well.



  • Assignment 3 Marked

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    Please review your marks and check the feedback provided, along with the test cases used, which are available on our course page. If you notice any issues or discrepancies with your mark, kindly let me know.

    The reference solution for the Parser (in class files) will be provided in 2 to 3 days.

  • Assignment 4 Released

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    The spec for Assignment 4 has just been released.

  • Clarification: Video Explanation of Tree-Walking Algorithm for Attribute Grammars

    Posted by Jingling Xue 2 months ago, last modified 2 months ago.

    Dear COMP3131/9102 Students,

    During today’s lecture, I used a new PDF annotator to explain the tree-walking algorithm for Example 1, which is based on the attribute grammar provided in Slide 298. Unfortunately, the free version of the software has limitations, particularly in supporting freehand line drawing, which made it challenging to illustrate the concepts effectively on the screen.

    I have released a new video that provides a clear explanation of the topic. You can find the video on our course page under Lectures → Week 4 → Tree-Walking Example (Video).

  • Assignment 2 Marked

    Posted by Jingling Xue 2 months ago, last modified 2 months ago.

    Dear COMP3131/9102 Students,

    Please review your marks and check the feedback provided, along with the test cases used, which are available on our course page. If you notice any issues or discrepancies with your mark, kindly let me know.

    Please note that there will be no reference solution provided for Assignment 2. This is because Assignments 2 and 3 are interconnected, forming a single project. In Assignment 2, you will develop a recogniser, which will then be extended in Assignment 3 to create a parser for VC.

  • WebCMS Erratic Notification Behaviour

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    Over the past two weeks, WebCMS has been behaving inconsistently. For several questions posted on our forum, I either did not receive notifications or received them only after a significant delay.

    I have already reported this issue to the WebCMS development team.

    While I typically respond to questions promptly, I apologise if you experience any delays in my responses due to this technical issue.

    Thank you for your understanding.

  • Spec for Assignment 3

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    The specification for Assignment 3 has now been released, and it is due on 21 March.

    As outlined in the course description, Assignments 2 and 3 are part of a single assignment that has been divided into two stages to facilitate the step-by-step implementation of a parser for VC. As previously mentioned, the specification for Assignment 3 will be released before the deadline for Assignment 2. This allows students who have already submitted Assignment 2 to begin working on Assignment 3 earlier, while also enabling those still working on Assignment 2 to design their recognizers in a way that makes them easily extendable into parsers.

    I will discuss how to extend our recogniser to obtain a parser for VC in today's lecture.

  • Zoom links for Wed19 and Thu19

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    If you are enrolled in these two online tutorials, please note that the Zoom links have been updated due to some issues brought to my attention by the tutor.

    Here are the updated links (also available online by clicking "Tutorial" from the menu on the course page):

    We apologize for any inconvenience this may have caused.

  • Assignment 1 Marked

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    Assignment 1 has been marked. Please review your marks and notify me if you identify any discrepancies.

    You can now access the course page to view the mark statistics, feedback, and test cases (along with the solutions) used for marking.

    Additionally, a reminder that the spec for Assignment 2 was released yesterday.

  • Spec for Assignment 2

    Posted by Jingling Xue 2 months ago.

    The spec for Assignment 2 has now been released. The deadline is 8:00 pm on 10 March.

  • ELS special considerations

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    If you have a special consideration approved by the university, please contact me before each assignment's deadline and let me know the duration of the extension requested, as outlined in your ELS plan. This will allow me to adjust the due date for each assignment accordingly, ensuring your extension is properly accommodated.

    Thanks.

  • Tutorial Recordings

    Posted by Jingling Xue 2 months ago.

    Dear COMP3131/9102 Students,

    The tutorial recordings will be available on our course page here:

  • Spec for Assignment 1

    Posted by Jingling Xue 3 months ago.

    Dear COMP3131/9102 Students,

    The spec for Assignment 1 is available on course page.

  • Lecture Notes

    Posted by Jingling Xue 3 months ago.

    Dear COMP3131/9102 Students,

    The lecture notes for tomorrow's lecture are now available on our course page.

    In general, lecture notes will be posted online at least one day in advance.

  • Zoom links for online tutorials

    Posted by Jingling Xue 3 months ago, last modified 3 months ago.

    Dear COMP3131/9102 Students,

    If you have enrolled in an online tutorial, please find your Zoom link on our course webpage:

    Click on "Tutorials," then locate your Zoom link at the top of the page for tutorials.

    Our tutorials will start from Week 2.

  • Welcome to COMP3131/9102

    Posted by Jingling Xue 3 months ago.

    Dear COMP3131/9102 Students,

    Welcome aboard!

    Take a moment to review the course outline to get a clear overview of what to expect and how to make the most of this course.


Back to top

COMP3131/COMP9102 25T1 (Programming Languages and Compilers) is powered by WebCMS3
CRICOS Provider No. 00098G