Department of Computing

Local Navigation

COMP332 Programming Languages

Unit Outline

Semester 2, 2008

About This Unit

Programming, of one form or another, plays a central role in computing and consequently the study of programming languages comprises a vital component of modern computer science. In light of this observation, this unit has two aims which we pursue in parallel:

  1. to provide students with a comprehensive view of the features of modern programming languages, and

  2. to introduce students to the implementation of programming languages.

In particular, we discuss the syntax and semantics of programming languages while, at the same time, introducing participants to commonly applied language implementation techniques. Practical language implementation exercises supplement the lecture material.

Most of the practical work and all of the assignment work in this unit will involve programming in the Java language.

Some practical or tutorial exercises may involve you in finding out how to write very simple code in one of the many example languages we will be meeting in the course of the semester.

Moodle trial

This semester the Department of Computing is acting as a test bed for a popular open source course management system called Moodle. In COMP332 we will be using this as a complete replacement for WebCT/Blackboard, with a view to assessing its possible application as a campus wide replacement for that system in years to come.

You can access the Department of Computing Moodle server at http://moodle.ics.mq.edu.au/ or go directly to the COMP332 Moodle website at the following url http://moodle.ics.mq.edu.au/course/view.php?id=12.

We welcome any (positive or negative) feedback you might have about our use of Moodle in this unit. It is our hope that this system will provide you with a more flexible and easily useable online learning experience. However, we need your help in refining things to give you the best possible learning experience and in evaluating it for future use. To make such feedback easy we have provided a "Moodle Feedback" discussion forum, which you can access from within the COMP332 Moodle site.

By the way, you can find out much more about Moodle itself from its website moodle.org.

Teaching Staff

RoleNameEmailRoomOffice hours
Convenor, LecturerA/Prof. Dominic Veritydomv@ics.mq.edu.auE6A325 By Appointment
TutorMichael Olneympolney@gmail dot com

Questions and general queries regarding the content of this unit, its tutorials or practicals should be posted to the appropriate discussion board on the Moodle site for this unit. In particular, any questions which are of interest to all students in this unit must be posted to one of these discussion boards, so that everyone can benefit from their answers.

Private emails related to COMP332 should be sent to domv@ics.mq.edu.au and must include your full name and your student id number.

Classes

Each week you should attend 3 hours of lectures, and a 2 hour mixed tutorial and practical session. For details of days, times and rooms the most authoritative source is the University's timetables webpage.

Note that these mixed practical / tutorual sessions commence in week 1, but that the first week of these is devoted to getting you started using Java and Eclipse.

You should have selected both a tutorial and a practical time at enrolment. You should attend the tutorial and practical you are enrolled in. If you do not have a class, or if you wish to change one, you should see the enrolment operators in the E7B courtyard during the first two weeks of the semester. Thereafter you should go to the Student Centre.

Please note that you will be required to submit answers to tutorial questions each week. Over the semester your tutorial marks will contribute 10% to your overall unit mark and you must do satisfactorily in all components of your assessment (including this one) in order to pass this unit.

Required and Recommended Texts

The required text for the unit is Programming language pragmatics (2nd Edition) by Michael L Scott, Morgan Kaufmann, 2006, which is stocked by the COOP bookshop on campus. We will cover a large proportion of the material in this book.

You will find the lecture material much easier to understand if you read the text and lecture notes in advance of the lectures. The lecture schedule below describes the major sections that are relevant.

Other resources such as lecture notes, examples, practical exercises, tutorial questions, and links to on-line code and documentation will be accessible from the resources page of the COMP332 Moodle site.

The Macquarie library contains many books on programming languages and compilers that you may want to use to supplement the text and lecture notes. The following list mentions some that you may find helpful.

Unit Web Page

This unit is supported by a unit home page hosted on the Department of Computing's experimental Moodle server. To access that page you must have a valid login for that server and must be enrolled into its COMP332 course. Instructions on doing this will be provided for you before the first lecture, and these will be posted on the public website at which you found this unit outline.

You can access the Department of Computing Moodle server at http://moodle.ics.mq.edu.au/ or go directly to the COMP332 Moodle website at the following url http://moodle.ics.mq.edu.au/course/view.php?id=12.

Some of the materials provided on this Moodle server will also be made available via the COMP332 public website at http://www.comp.mq.edu.au/units/comp332. However, you will need to make sure you can log in to and use the Moodle site, since it is only from here that you will be able to access the sample answers to tutorial exercises and the assignments.

All assignment and tutorial submissions will be made via the COMP332 Moodle site. This unit will also make extensive use of the discussion forums hosted there. These will be monitored regularly by the COMP332 staff, so please post your questions there and they will be answered promptly.

Learning Outcomes

After participating in the unit, you should have:

  1. A clear understanding of the major types of programming language that have been developed.

  2. An ability to evaluate programming languages on a feature-by-feature basis.

  3. A solid grasp of the most common features of programming languages and their semantics.

  4. An understanding of the standard decomposition of programming language compilers and how compiler phases co-operate to implement program translation.

  5. Gained experience in understanding and analysing the structure and operation of a non-trivial software system (the Obr compiler).

  6. An appreciation for how to use regular expressions and context-free grammars to formally describe programming languages, and

  7. An understanding of how to transform these descriptions into lexical and syntactic analysers.

  8. An understanding of how to represent programs in a compiler intermediate form, and how to process that form to perform semantic analysis, transformation and code generation for common programming language features.

  9. Gained practical experience implementing the above compilation techniques.

  10. Gained further practical experience in best practice approcahes the development and testing of complex systems in a commercially relevant language (in this case Java).

In addition to the discipline-based learning objectives, all academic programs at Macquarie seek to develop students' generic skills in a range of areas. One of the aims of this unit is that students develop their skills in the following areas:

Learning and Teaching Strategy

COMP332 is taught via lectures and combined tutorial / practical sessions in the laboratory. Lectures are used to introduce new material, give examples of programming language constructs and their implementations and put this material in a wider context. While lectures are largely one to many presentations, you are strongly encouraged to ask questions of the lecturer to clarify anything you might not be sure of.

Tutorial / practical sessions are small group classes which give you the opportunity to interact with your peers and with a tutor who has a sound knowledge of the subject. You will be given problems to solve each week prior to this session and you will be asked to submit your solutions in an electronic form (as a PDF or Microsoft Word document) via the COMP332 Moodle site.

Preparing these solutions prior to attending a tutorial is important because it will allow you to discuss the problems effectively with your tutor and maximise the feedback you get on your work.

The practical component of these combined sessions give you an opportunity to practice your programming skills under the supervision of your tutor. Each week you will be given a number of problems to work on; it is important that you keep up with these problems as doing so will help you understand the material in the unit and prepare you for the work in assignments.

In some cases, you may be asked to submit your solution to a practical as part of your required work for the tutorial / practical session of the following week.

Each week you should:

Lecture notes or slides will be made available each week but these notes are intended as an outline of the lecture only and are not a substitute for your own notes or reading the required text and additional material.

Lecture Schedule

Week Lecture plan Relevant part of text
1 Introduction to programming languages and their implementation 1
1-3 Programming language syntax: specification and recognition 2.1-2.3.3
4 Names, scopes and bindings 3.1-3.6.3
5-6 Semantic analysis and attribute grammars 4.1-4.4, 4.6
7 Data types 7.1-7.8, 7.10
22 September
to 3 October
Two week lecture recess  
8 No lectures or tutorials - Labour day public holiday.
9 Translation and code generation 14.1-14.3
10 Control flow 6.1-6.6
11 Subroutines and control abstraction 8.1-8.6
12 Assembly, linking and loading 14.5-14.7
13 Review and revision All of the above

Timetable and Workload

Lectures.

Day Time Place
Monday 6pm-9pm E5A 107

Combined Tutorial / Practical Sessions.

Day Time Place
Monday 3pm - 5pm E6A 119
Friday 6pm - 8pm E6A 119

Combined tutorial / practical sessions will begin in the first week of semester, with some warmup exercises to get you used to using Java and the Eclipse development environment. You will not, however, be asked to submit answers to tutorial questions for that first session.

Material covered in lectures will be addressed in the tutorials and practicals in the following week. Tutorial questions will be assessed weekly.

Macquarie University generally expects students to work for about three hours per credit point each week. Since COMP332 is a 3 credit point unit, it should therefore require about nine hours per week for average students. There are five hours per week of classes; therefore an average student should expect to spend about four hours out of class per week on COMP332. In the lecture break when there are no scheduled classes, that time should be used for additional study.

Assessment

The overall assessment of your performance in this unit will be determined in terms of marks allocated for tutorial questions (10%), for three assignments (36%), for a mid-term examination (24%) and for a final examination (30%).

You will be given problems to solve each week prior to your tutorial; preparing solutions is important because it will allow you to discuss the problems effectively with your tutor and maximise the feedback you get on your work. Your tutorial submissions for weeks 2 to 12 will be assessed by your tutor.

Tutorial tasks based on the lectures for a given week will be posted on the web on evening of that lecture. Solutions must be submitted electronically, via the COMP332 Moodle site, by Monday 10am of the following week and they will be discussed during the combined tutorial / practical session of that same week. Please read the tutorial pages carefully each week to understand the requirements.

Submitting your solutions before you attend tutorial ensures that your tutor will be familiar with your solutions and can therefore make sure to focus on areas of most concern. Tutorials will be marked on a scale of two (good, original attempt at all or most questions), one (some attempt), and zero (little or no attempt). Tutorial marks contribute 10% of the overall assessment.

You will also be asked to complete three assignments during the semester, and each one is worth 10%.

The assessment schedule for this unit is shown in the following table.

Assessment Topic Handed out Due in Weight
Tutorial Exercises lecture material from week n Monday of week n (n = 1,2,...,11) Monday 12 noon of week n+1 (electronic submission via Moodle) 10%
Assignment 1 Lexical Analysis and Parsing Week Two Week Five (electronic submission via Moodle, due Sunday 7/9/08) 12%
Assignment 2 Semantic analysis Week Six Week Eight (electronic submission via Moodle, due Sunday 12/10/08) 12%
Assignment 3 Code generation Week Nine Week Twelve (electronic submission via Moodle, due Sunday 9/11/08) 12%
Mid-Term Examination Friday 10th October 6pm-8pm 24%
Final Examination TBA 30%

As befits their role in the assessment, the assignments are a significant amount of work and usually involve applying unfamiliar ideas to practical problems. Hence you are unlikely to be able to do them in the week before they are due. Make sure you leave enough time to understand the relevant ideas and code before you try to solve the assignment.

In order to pass the unit, you must perform satisfactorily in each part of the assessment. This means that we may exclude you from the final examination if you do not hand in at least two assignments and submit at least five tutorial solutions. Furthermore, if you do not complete the mid-term examination you may be excluded from the final exam.

If you cannot complete a piece of work please see the convener before the deadline.

There will be no extensions except for illness and misadventure. Crowded laboratories are no excuse; nor is loss of your files. So:

Relationship Between Assessment and Learning Outcomes

  1. An understanding of the major types of programming language that have been developed and an ability to evaluate languages on a feature-by-feature basis: The tutorial questions and the exam are designed to develop and assess a comparative understanding of programming languages and their features.

  2. A solid grasp of the most common features of programming languages and their semantics. Again these are a primary consideration in the design of the tutorial questions and the exam.

  3. An understanding of the standard decomposition of programming language compilers and how compiler phases co-operate to implement program translation. The assignments focus on three separate phases of the compilation process, from front-end syntax analysis to back-end code generation.

  4. Experience understanding and analysing the structure and operation of a non-trivial software system.In assignments 2 and 3 you will work on understanding and extending an existing programming language compiler consisting of over 80 Java classes.

  5. How to use regular expressions and context-free grammars to formally describe programming languages and how to transform these descriptions into lexical and syntactic analysers. Assignment 1 and the tutorials for weeks 2 to 5 concentrate on the theory and practice of lexical and syntactical analysis.

  6. How to represent programs in a compiler intermediate form and how to process that form to perform semantic analysis, transformation and code generation for common programming language features. Assignment 1 covers the process by which source code text is converted into a tree based intermediate form. Assignment 2 develops your understanding of the semantic analysis process, most particularly name / scope analysis and type checking. Assignment 3 assesses your understanding of the back-end code generation phase of compilation.

  7. Practical experience implementing the above compilation techniques. The assignments are all practically based and are designed to encourage you to implement some of the theory developed in the lectures.

  8. Further practical experience in best practice approaches the development and testing of complex systems in a commercially relevant language (in this case Java). The Obr compiler of assignments 2 and 3 is a full compiler for a simple Pascal like language written entirely in Java. Those assignments require you to understand and extend that code base. Furthermore, you will be asked to develop automated tests to ensure that the code you write conforms to the specification laid down in the assignment specifications.

Examinations

The examination assessment of this unit is split into two components, a mid-term examination which will be held at the end of week 8 and the final exam which will be held during the usual University examination period. The university examination period in Second Half year 2008 is from 19th November to 5th of December.

The mid-term exam will test your understanding of the material delivered in weeks 1-7, and will be of 1.5 hours in duration. Your mark in this exam will be posted to the COMP332 Moodle site at the beginning of week 10, along with some brief feedback about how you performed. We will also provide the whole class with some overall feedback, to assist you with preparations for the final exam, and with a sample solution for all questions on the mid-term.

Please note, it is compulsory to attend the mid-term examination on Friday the 10th October at 6pm. It will take place in a venue to be announced, and will replace the Friday evening tutorial / practical session of that week.

The final exam will cover some material from weeks 1-7 along with material from weeks 8-12 and will be of 2 hours in duration

You are expected to present yourself for final examination at the time and place designated in the University Examination Timetable. The timetable will be available in Draft form approximately eight weeks before the commencement of the examinations and in Final form approximately four weeks before the commencement of examinations.

You are advised that it is Macquarie University policy not to set early examinations for individuals or groups of students. All students are expected to ensure that they are available until the end of the teaching semester, that is the final day of the official examination period.

The only exception to not sitting an examination at the designated time is because of documented illness or unavoidable disruption. In these circumstances you may wish to consider applying for Special Consideration. Information about unavoidable disruption and the special consideration process is available on the web (PDF).

If a Supplementary Examination is granted as a result of the Special Consideration process the examination will be scheduled after the conclusion of the official examination period. For details of the Special Consideration policy specific to the Department of Computing, see the Department's policy page.

Plagiarism

Please refer to the Department of Computing Plagiarism Policy for the definition of plagiarism, advice on avoiding it and the penalties in place if you are found to have submitted plagiarised work.

University Policy on Grading

Academic Senate has a set of guidelines on the distribution of grades across the range from fail to high distinction. Your final result will include one of these grades plus a standardised numerical grade (SNG).

On occasion your raw mark for a unit (i.e., the total of your marks for each assessment item) may not be the same as the SNG which you receive. Under the Senate guidelines, results may be scaled to ensure that there is a degree of comparability across the university, so that units with the same past performances of their students should achieve similar results.

It is important that you realise that the policy does not require that a minimum number of students are to be failed in any unit. In fact it does something like the opposite, in requiring examiners to explain their actions if more than 20% of students fail in a unit.

Student Support Services

Macquarie University provides a range of Academic Student Support Services. Details of these services can accessed at http://www.student.mq.edu.au.

Staff-Student Liaison Committee

The Department has established a Staff-Student Liaison Committee at each level (100, 200, 300) to provide all students studying a Computing unit the opportunity to discuss related issues or problems with both students and staff.

For each meeting, an agenda is issued and minutes are taken. These are posted on the web at:

Details of the regular meeting dates will be posted on the unit home page. Anyone with an interest in Computing units may attend. This includes staff involved in the teaching and administration of the units, and all students currently taking a Computing unit at that level. There are formal Liaison Committee representatives for each unit who attend to present the views of the student body; all students are welcome and are encouraged to attend.

The meetings are usually held in the Department of Computing Meeting Room, E6A357.

To forward agenda items or get in touch with your representative, send an email to comp332liaison@ics.mq.edu.au.

If you have exhausted all other avenues, then you should consult the Director of Teaching (Dr Steve Cassidy) or the Head of Department (Assoc. Prof. Bernard Mans). You are entitled to have your concerns raised, discussed and resolved.


Comments to: domv@ics.mq.edu.au

Copyright & Site information

  • CRICOS Provider No 00002J, ABN 90 952 801 237
  • Authorised by: HOD