The web page for last year's edition of this course is available here.
Elements of Programming Languages is an Honours course in Informatics on the foundations and practicalities of programming language design. It is normally to be taken in year 3 but as a level 10 course it can also be taken by year 4 or MSc students.
Few computer scientists will ever design a new, general-purpose language, but most will need to learn several languages over the course of a career, and many will design new domain-specific languages for restricted problem domains. Programming language design involves many subtle choices and tradeoffs among performance, convenience, and elegance. Although some of the earliest programming languages (such as FORTRAN) are still going strong, new language designs and features are still being proposed, and it seems that we are still far from fully understanding the space of possible language designs.
Elements of Programming Languages covers the essential programming structures for managing data and controlling computation, as well as abstractions that facilitate decomposing large systems into modules. The course also covers pragmatics of programming languages, including abstract syntax, interpretation and domain-specific language implementation. Elements of Programming Languages is not about learning or programming in one specific language, rather, it covers the basic elements needed to understand the next 700 programming languages, or design a new one.
There will be 20 lectures, starting Monday, September 18th, 2017. The lectures include the course introduction, three guest lectures, 16 lectures of examinable course content, and a course review lecture.
Lectures are 1510-1600 on Monday and Thursday in 7 Bristo Square, Lecture Theatre 2.
In case of any discrepancy between this web page and the University timetable, the latter takes precedence.
There is a laboratory session on Wednesday, September 28th from 1210-1400 in Forrest Hill labs 3.D01 and 3.D02, with a not-for-credit coursework exercise due one week later. This exercise does not count toward your final grade, but will be returned with formative feedback.
Tutorials are held in weeks 3-10. Participation in tutorials (including working on tutorial problems in advance) is expected and the tutorials cover examinable material that is part of the course.
There will be three coursework exercises. The first two are evaluated and returned for formative feedback. The third is worth 25% of the final grade.
Most students will take the exam in the April exam diet. Visiting undergraduate students who are here for semester 1 only will take the exam in the December diet. (There are a few UG3 courses whose exam is in December for all students this year, but EPL is not one of them.) Please see the University's exam schedule page to check on the date / time of your exam, and please discuss with the ITO or your Personal Tutor if you are uncertain which exam you should attend.
The exact schedule of lectures is subject to change, depending on availability of guest lecturers.
|1||18 Sep||Intro||Lec 1|
|2||25 Sep||Lec 2||Assignment 1 (Lab) available||Lec 3|
|3||2 Oct||Lec 4||Tut 1||Lec 5||Assignment 1 due, Assignment 2 available|
|4||9 Oct||Lec 6||Tut 2||Lec 7|
|5||16 Oct||Lec 8||Tut 3||Lec 9|
|6||23 Oct||Lec 10||Tut 4||Guest Lec 1||Assignment 2 due ; Assignment 3 available|
|7||30 Oct||Lec 11||Tut 5||Guest Lec 2|
|8||6 Nov||Lec 12||Tut 6||Lec 13|
|9||13 Nov||Lec 14||Tut 7||Lec 15|
|10||20 Nov||Guest Lec 3||Tut 8||Lec 16||Assignment 3 due|
|11||27 Nov||Review||No tutorial||Mock exam discussion||Mock exam available|
|Introductory/review lecture (non-examinable)|
|Guest lecture (non-examinable)|
The course lecturer and teaching assistants are available (during Semester 1) for discussion of course material at the above hours. Meetings outside these hours are also possible by appointment.
If you are enrolled in this course, you are on the course mailing list. This list can be used for general questions. There is also a Piazza page for EPL where you may ask questions that other students or course staff can answer. Course staff will try to respond within 1 working day. This means that if you ask a question at 5:01pm on Friday, you should not be surprised if it is not answered until Monday afternoon or Tuesday morning. We will of course try to be more responsive before deadlines.
There is no required course text. The following resources are recommended reading to supplement the course materials. Specific reading suggestions are listed along with the lectures below.
Other useful books on programming languages include:
The following are some historically-influential papers on programming languages, and may be of interest to students interested in pursuing further study of programming languages.
The programming language used for lab, tutorial and coursework
exercises is Scala.
Any DICE machine (i.e. any Linux machine in
an Informatics computer lab) should have Scala 2.11 installed; type
scala at a command prompt to start the Scala interpreter.
Scala has many features in common with functional languages (such as Haskell) and object-oriented languages (such as Java). Prior familiarity with Scala is not needed for EPL, and we will investigate many of these features as part of the course. We will not cover all of Scala's more advanced or experimental features.
We will follow a "functional-first" style of Scala programming for most of the course, while most resources on Scala are oriented towards object-oriented programmers familiar with Java, Python or Ruby. Although the lectures, tutorials and lab/assignment handouts should provide all of the information about Scala you need for this course, you might be interested the following resources which cover Scala's features in more depth or from a different perspective.
$ submit epl cw1 Assn1.scala
There will be a 2-hour lab session during Week 2 to ensure that students have an opportunity to learn the basics of Scala needed for later coursework exercises. Students unfamiliar with Scala (i.e., most students) are strongly encouraged to attend and complete the lab assignment. The first hour will consist of an interactive demo of basic Scala programming concepts, following a lab handout (which will also be available in advance). During the second half of the lab session, you will be free to work on the lab exercises on your own or with others, and the course lecturer and lab demonstrator will be available to answer any questions.
If you already know Scala: we will (at least initially) be using only a very small "pure" subset of the language, as described in the lab handout. Even if you are already an accomplished Scala programmer, please try to run through the lab and other exercises and do them using only this subset.
The lab exercises may be handed in for formative feedback. That is, they will be marked and returned with feedback, but the results do not count toward your final grade. The due date for completed lab assignments is October 6.
Tutorials start Week 3 (October 2-6). The tutorial group times and membership will be posted early in the semester. See tutorial groups with times and (tentative) membership. Tutorial notes and solutions will also appear here as they become available.
There is a lot of research on programming languages in the School of Informatics. EPL will feature guest lectures covering more advanced topics that apply or extend ideas covered in the course. Further information will be posted here when the lectures are confirmed. The guest lectures are as follows:
October 26: GULCII: Graphical Untyped Lambda Calculus Interactive Interpreter, Claude Heiland-Allen (10am AT 5.04 or 4pm IF G.07)
GULCII is an untyped lambda calculus interpreter supporting interactive modification of a running program, with graphical display of graph reduction and sonification of node statistics. This talk covers aspects of using GULCII for live performance, including encodings of data within lambda calculus.
November 2: Layering Abstractions: Heterogeneous Programming and Performance Portability. Alastair Murray, Principal Software Engineer, Compilers, Codeplay Software Ltd.
Widely used heterogeneous programming models such as OpenCL and CUDA provide programmers a means of exploiting heterogeneous hardware to achieve higher performance. A modern heterogeneous programming model, however, should also aid programmer productivity and allow for portable performance. This talk will give an overview of how this is being achieved by layering abstractions, by providing high-level domain specific approaches for programmers to model problems, and allowing the flexibility for even lower level layers to gain more precise control over hardware.
November 20: Rust: using linear and region types to make the Internet more secure. Dr. Keith Wansbrough, Software Engineer, Metaswitch Networks Ltd.
Rust is a relatively new programming language which is rapidly gaining traction in industry. It aims to replace C++, using linear types and region types to enforce safe use of pointers while retaining the efficiency required for systems programming. Buffer overflows and incorrect memory management are responsible for a large fraction of recent security vulnerabilities; Rust simply makes these impossible to compile. It's a great example of how the concepts of this course are making a practical difference to modern software engineering.
While these lectures don't cover examinable material, we encourage students to attend, as they provide additional context and motivation for the material covered in EPL, and may also be interesting starting points for students interested in doing a Honours project or MSc project on a topic related to EPL.
Lecture slides will be posted here as the course proceeds. The suggested readings cover related material in "Practical Foundations for Programming Languages (second edition)" (PFPL2), "Concepts in Programming Languages" (CPL), and other sources, however, we will cover some topics in a different order or differently than in these textbooks.
Available: September 27
Due: October 6, 4pm
$ submit epl cw1 Assn1.scala
Available: October 6
Due: October 24, 4pm
To submit, run the following command on DICE:
$ submit epl cw2 Assn2.scala
Sample solution: Assn2Solution.scala
Available: October 25
Due: November 21, 4pm
To submit, run the following command on DICE:
$ submit epl cw3 Assn3.zip
Important: Please note that, as with all Informatics courses, unexcused late submissions of coursework will be penalized in accordance with the School policy. Extensions to the deadline to submit are subject to approval by the appropriate Year Organiser (UG3). This course is subject to the School's academic conduct policy regarding plagiarism and acknowledgement of sources. For full details please consult the School's policies:
Good Scholarly Practice: Please remember the University requirement as regards all assessed work for credit. Details and advice about this can be found at:
and links from there. Note that, in particular, you are required to take reasonable measures to protect your assessed work from unauthorised access. For example, if you put any such work on a public repository then you must set access permissions appropriately (generally permitting access only to yourself, or your group in the case of group practicals).
Elements of Programming Languages offers the following formative feedback:
This course was introduced in 2015, so there are few previous exams. Past courses "Language Semantics and Implementation", and "Functional Programming and Specification" offered in previous years may cover similar material, but EPL is a different course and its exam will be different.
A mock exam is available here:
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: firstname.lastname@example.org
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh