Semester 2, 2018

# Course Outline

## 1 Course Staff

 Staff Name Role Email Liam O'Connor Lecturer in Charge liamoc at cse.unsw.edu.au Michael Sproul Tutor michael at sproul.xyz

## 2 Course Details

 Course Code COMP3161/COMP9161 Course Title Concepts of Programming Languages Units of Credit 6 Course Website https://cse.unsw.edu.au/~cs3161 Handbook Entry COMP3161; COMP9161

## 3 Course Summary

This course discusses and relates a range of programming language concepts and paradigms, including imperative, object-oriented, functional, concurrent & parallel programming. It covers the theoretical foundations (syntax, operatational, axiomatic and denotational semantics) as well as practical development and implementation aspects (dynamic and strong typing, polymorphism, overloading, automatic memory management, and multicore parallelism). Due to the course topic, a variety of programming languages will be studied and used. Assignments will be in the programming language Haskell, but no previous knowledge of Haskell is assumed.

## 4 Course Timetable

### 4.1 Lectures

There is one in-person lecture stream for this course, as follows:

 Day Time Location Lecturer Tuesday 14:00-16:00 Ainsworth 102 Liam O'Connor Thursday 14:00-15:00 Old Main Building G31 Liam O'Connor Thursday (*) 15:00-16:00 Old Main Building G31 Liam O'Connor

The lecture marked with (*) is not compulsory – it is designed as an extension/revision lecture.

There is also a web stream running for the first time this year. If you are enrolled in the web stream, it is your responsibility to watch all lecture recordings as they are released.

### 4.2 Tutorials

The following tutorials are on offer. Undergraduate students must attend at least one tutorial per week.

 Day Time Location Tutor Tuesday 16:00-17:00 Quad G042 Michael Sproul Tuesday 17:00-18:00 Quad G042 Michael Sproul Wednesday 14:00-15:00 Goldstein G09 Liam O'Connor Wednesday 15:00-16:00 Quad G044 Liam O'Connor Thursday 13:00-14:00 Goldstein G05 Liam O'Connor Thursday 16:00-17:00 Quad G045 Michael Sproul Thursday 17:00-18:00 Quad G040 Michael Sproul

## 5 Course Constituents and Aims

### 5.1 Lectures

The lectures will introduce you to new material, which is being re-enforced and practised in tutorials in smaller groups. In addition to the lecture slides, we will provide lecture notes. Students are required to read these notes and other reading material as advised during the lecture and/or on the course web page. Informal exercises that are not graded will occasionally be supplied. There are three hours of lectures each week, with an additional hour devoted to revision and extension material from time to time.

### 5.2 Tutorials

Tutorials start in Week 2. The last tutorial will be held in Week 13. Tutorials will discuss problems related to the lecture material and the assignments. Tutorial marks will be awarded based on participation. Tutorial problems will be handed out in advance and students will be asked to present the solution. Tutorial locations and times are published through NSS.

### 5.3 Assignments

There will be two programming assignments. They will be due approximately around Week 8 and Week 11. Students will have about two weeks to understand each assignment and to develop a solution. Unless otherwise stated if you wish to submit an assignment late, you may do so, but a late penalty reducing the maximum available mark applies to every late assignment. The maximum available mark is reduced by 10% if the assignment is one day late, by 25% if it is 2 days late and by 50% if it is 3 days late. Assignments that are late 4 days or more will be awarded zero marks. So if your assignment is worth 88% and you submit it one day late you still get 88%, but if you submit it two days late you get 75%, three days late 50%, and four days late zero. Assignment extensions are only awarded for serious and unforeseeable events. Having the flu for a few days, deleting your assignment by mistake, going on holiday, work commitments, and so on do not qualify. Therefore aim to complete your assignments well before the due date in case of last minute illness, and make regular backups of your work.

## 6 Student Learning Outcomes

After completing this course, a student should be able to:

• distinguish superficial (i.e., syntactic) from fundamental (i.e., semantic) differences of programming languages.
• read, write and reason about programs in various programming language paradigms, including imperative, object-oriented, functional, concurrent & parallel programming.
• use the basic tools of language design and analysis, including formal languages and formal descriptions of static and dynamic semantics.
• use modern language features, such as dynamic and strong typing, polymorphism, overloading, automatic memory management, and multicore parallelism.

The courses exposes students to a scientific theory of programming languages based on type theory and operational semantics as a mathematically sound framework which enables an objective analysis of the properties of a large number of programming language features. The tutorial format will give students practice in the presentation of solutions to an audience of peers, and will challenge them to critique peer technical presentations. Furthermore, the whole course encourages critical examination and analysis of existing solutions.

## 7 Assumed Knowledge

You need to have successfully completed the core programming, algorithm, and software development courses. You should be a confident coder and be prepared to study the concepts of a new programming language in directed self-study.

The prerequisites of COMP3161 are COMP1927 or COMP2521. The prerequisite of COMP9161 is COMP9024.

The course makes use of a number of discrete mathematics concepts. While it is possible to do well in the course without having done MATH1081 or COMP2111, familiarity with logic and set theory is valuable when studying COMP3161.

## 8 Teaching Rationale

The learning focus in this course is primarily on lectures and assignments, in addition to a mid term exam which you can use to test your preparedness for the final exam. While the assignments are graded and contribute to the final mark, their primary purpose is to facilitate learning by hands-on experience. Tutorial classes will give you a chance to discuss the lecture material and deepen your understanding.

## 9 Teaching Strategies

### 9.1 Lectures

The lectures will introduce you to new material, which is being reinforced and practised in tutorials and assignments. The course follows no particular textbook, but reading material covering specific topics will be identified throughout the course. Students are required to study reading material as advised during the lecture and/or on the course web page.

There are three hours of lectures each week. We are also offering an optional fourth hour of lectures. We will use this, depending on your feedback and requests, to discuss advanced material which will not be tested in the exam, or as a remedial lecture.

### 9.2 Tutorials

Tutorials aim to clarify ideas from lectures and to get you to explore the concepts in more depth. There will be a number of exercises set for each tutorial class. The aim of the class is not to simply get the tutor to give you the answers; the aim is to focus on just one or two of the exercises and work through them in detail, discussing as many aspects, alternative approaches, fine details, etc. as possible. You must be active and ask questions in tutorials. Ideally, students should run the entire tute themselves, with the tutor being a moderator and providing additional explanations.

### 9.3 Assignments

The purpose of the assignments is to apply the theoretical concepts we discuss in the lecture to a practical problem. All assignments will be completed individually; this means that you should do them yourself without assistance from others, except for asking advice from the teaching staff (lecturers and tutors) in this course. As noted above, they are an important vehicle for learning the material in this course. If you don't do them, or simply copy and submit someone else's work, you have wasted a valuable learning opportunity.

## 10 Assessment

Assessment consists of a class mark and a final examination. The break down of the class mark is as follows:

 COMP3161 COMP9161 Tutorial Participation 10% n/a Assignment 1 30% 30% Assignment 2 35% 35% Midsession Exam 25% 35%

Both the practical component and the final examination are out of 100. The final grade for the course is determined by the harmonic mean between the practical component and the final examination.

$\mathit{final} = \frac{2 \times \mathit{exam} \times \mathit{class}}{\mathit{exam} + \mathit{class}}$

### 10.1 Tutorial participation mark

Attendance of tutorials is compulsory for undergraduate students (COMP3161). Details of the tutorial participation mark will be discussed in the tutorials.

### 10.2 Assignments 1 and 2

Assignment Two is given slightly more weighting than Assignment One, as it requires more work to complete. Both assignments are individual; i.e., no team work of any kind is permitted. Completing and submitting both assignments is compulsory; i.e., each assignment has a core component and you will not be permitted to pass the course unless you have made a reasonable effort to solve the core component. A "reasonable effort" means that there may be bugs in your solution, but you must submit an at least partially working piece of adequately structured code.

The assignments are an extremely important part of the course. They are an essential way of learning the practical skills you need to acquire. Any plagiarism in assignments will be severely punished and may result in an automatic Fail for the whole course. Read the plagiarism warning below for more details. For each assignment, you will have approximately two weeks from release of the specification until the submission deadline. The specifications will be posted on the course web page.

Assignment work can be completed on the workstations at UNSW or on a computer at home. Your assignment must be able to run on the computers at UNSW so test them here if you develop them at home. Unless otherwise stated assignments must be submitted on-line from a school terminal using the give command. It is in your best interest to make regular backup copies of your work and (because of machine loads on deadline days, for example) to complete assignments well before their deadlines. Moreover, the electronic submission system "give" allows you to submit an assigment multiple times; only the last submission will be marked. We suggest that you submit a version once you have a partially complete solution and repeatedly submit whenever you improved your solution significantly. In particular, make sure that you submit your solution once you have complete the core component of each assignment. The core component for each assignment must be submitted to be able to pass the course.

### 10.3 Midsession exam

A 50 min midsession exam will be held in Week 5. Content from before Week 5 will still be present in the final exam, however the emphasis is on previously unexamined content.

It is expected that the exam will be run in the lecture time slot. Venues will be announced once they are finalised. Note that web stream students must attend the midsession exam in the normal lecture time slot.

### 10.4 Final Exam

The final exam is a two hour written exam. Requests for a supplementary exam will only be considered where students (a) have completed all other course components to a satisfactory standard, (b) have been absent from the final exam, (c) and have submitted a fully documented request for special consideration to NSQ within three working days of the final exam.

## 11 Student Conduct

The Student Code of Conduct Information, Policy) sets out what the University expects from students as members of the UNSW community. As well as the learning, teaching and research environment, the University aims to provide an environment that enables students to achieve their full potential and to provide an experience consistent with the University's values and guiding principles. A condition of enrolment is that students inform themselves of the University's rules and policies affecting them, and conduct themselves accordingly.

In particular, students have the responsibility to observe standards of equity and respect in dealing with every member of the University community. This applies to all activities on UNSW premises and all external activities related to study and research. This includes behaviour in person as well as behaviour on social media, for example Facebook groups set up for the purpose of discussing UNSW courses or course work. Behaviour that is considered in breach of the Student Code Policy as discriminatory, sexually inappropriate, bullying, harassing, invading another's privacy or causing any person to fear for their personal safety is serious misconduct and can lead to severe penalties, including suspension or exclusion from UNSW.

If you have any concerns, you may raise them with your lecturer, or approach the School Ethics Officer, Grievance Officer, or one of the student representatives.

Plagiarism is defined as using the words or ideas of others and presenting them as your own. UNSW and CSE treat plagiarism as academic misconduct, which means that it carries penalties as severe as being excluded from further study at UNSW. There are several on-line sources to help you understand what plagiarism is and how it is dealt with at UNSW:

Make sure that you read and understand these. Ignorance is not accepted as an excuse for plagiarism. In particular, you are also responsible that your assignment files are not accessible by anyone but you by setting the correct permissions in your CSE directory and code repository, if using. Note also that plagiarism includes paying or asking another person to do a piece of work for you and then submitting it as your own work.

UNSW has an ongoing commitment to fostering a culture of learning informed by academic integrity. All UNSW staff and students have a responsibility to adhere to this principle of academic integrity. Plagiarism undermines academic integrity and is not tolerated at UNSW. Plagiarism at UNSW is defined as using the words or ideas of others and passing them off as your own.

If you haven't done so yet, please take the time to read the full text of

The pages below describe the policies and procedures in more detail:

You should also read the following page which describes your rights and responsibilities in the CSE context:

## 12 Course Schedule

Please see the separate course schedule page for a detailed breakdown of course content over the 13 weeks of session.

## 13 Resources for Students

There is no textbook for the course. As tutorial and reference for Haskell, you can use any of these books:

• Haskell Programming From First Principles by Christopher Allen and Julie Moronuki, Gumroad.
• Thinking Functionally with Haskell, by Richard Bird, Cambridge University Press.
• Programming in Haskell, 2nd Edition by Graham Hutton, Cambridge University Press.
• Real World Haskell by Bryan O'Sullivan, Don Stewart, and John Goerzen, O'Reilly Media.
• Learn You a Haskell for Great Good! by Miran Lipovača, No Starch Press.

The last two books in this list are available as online ebooks for free.

Further reading material will be announced in the lecture and/or on the course web page.

In addition, the Learning Haskell tutorial is written by former lecturers of this course and covers the basics of Haskell programming necessary to get started in COMP3161.

### 13.1 Getting Help

Questions regarding the course material, assignments, exercises, and general administrative questions should be asked on the course forum (accessible from the course web page), where answers benefit the whole class. Alternatively, approach the lecturer after class. To discuss matters concerning your personal performance, please send an email to the course account cs3161@cse.unsw.edu.au. For identification purposes, if you wish to send email concerning the course, you must send the mail from your CSE or UNSW student account (not from GMail, Yahoo, Bigpond or similar), and include your student id and your full name.

## 14 Course Evaluation and Development

This course is being continuously improved and we will conduct a survey at the end of session to obtain feedback on the quality of the various course components. Your participation in the survey will be greatly appreciated.

Student feedback over the last years has generally been positive with a high student satisfaction rate.

Despite the change in lecturing staff, the course content and teaching strategy will not be significantly altered, as it has worked well in previous years.

We also do appreciate constructive criticism during the semester, as (in contrast to course surveys at the end), this allows us to address potential problems straight away.

2018-11-16 Fri 19:37

Announcements RSS