- UCAS course code
- GG14
- UCAS institution code
- M20
Bachelor of Science (BSc)
BSc Computer Science and Mathematics
- Typical A-level offer: A*AA including specific subjects
- Typical contextual A-level offer: AAA including specific subjects
- UK refugee/care-experienced offer: AAB including specific subjects
- Typical International Baccalaureate offer: 37 points overall with 7,6,6 at HL, including specific requirements
Book an open day
Explore our campus, meet lecturers and current students, and learn more about what it's like to study at Manchester.
Meet us
Join us online or in person to learn more about the University and our courses.
Discover more about our new Home of Engineering
Learn about your subject of interest and what you'll experience as a student in that community.
Discover more about our new Home of Engineering
Download our course brochure
Get to know us better with our guide to studying your subject of choice.
Download our course brochure
Course unit details:
Giving Meaning to Programs
| Unit code | COMP31311 |
|---|---|
| Credit rating | 10 |
| Unit level | Level 3 |
| Teaching period(s) | Semester 1 |
| Offered by | Department of Computer Science |
| Available as a free choice unit? | Yes |
Overview
Programming languages provide abstractions such as `functions’ which are supposed to allow us to reason about the code at a high level---without running it in our heads. However, these abstractions don’t necessarily behave in the way their names suggest.
In this unit we show that a mathematical theory of program meanings can be developed which encompasses the counter-intuitive behaviour of computations, but preserves our ability to reason abstractly. The machinery required is significant, and delicate at times, and the unit will introduce the fundamental technical tools which help us cope with these complications.
Pre/co-requisites
| Unit title | Unit code | Requirement type | Description |
|---|---|---|---|
| Foundations of Pure Mathematics B | MATH10111 | Pre-Requisite | Compulsory |
| Mathematical Techniques for Computer Science | COMP11120 | Pre-Requisite | Compulsory |
| Mathematical Foundations & Analysis | MATH11121 | Pre-Requisite | Compulsory |
COMP11120 or MATH10111
Aims
This unit aims to equip students to participate in technical discussion of high-level programming language features, covering the core concepts which underpin contemporary developments. It makes the case that questions about what programs mean ought to be posed and settled on the basis of rigorous mathematics, and gives a sense of what has been achieved in this area. This unit is a good choice for those who want to understand programming languages at a deep level; it also provides a solid foundation for work or further study in the field.
Learning outcomes
ILO 1: apply fundamental theoretical results about programming languages and particular techniques to reason about programs;
ILO 2: compute the denotations of types and programs;
ILO 3: prove equivalence of programs in a suitable programming language making use of appropriate techniques and models;
ILO 4: prove selected results about programs using structural induction;
ILO 5: describe and analyse the behaviour of programs in the various models of computation studied;
Syllabus
This unit aims to equip students to participate in technical discussion of high-level programming language features, covering the core concepts which underpin contemporary developments. It makes the case that questions about what programs mean ought to be posed and settled on the basis of rigorous mathematics, and gives a sense of what has been achieved in this area. This unit is a good choice for those who want to understand programming languages at a deep level; it also provides a solid foundation for work or further study in the field.
On this unit we look at three formal systems, with increasingly sophisticated features, to give examples of suitable reasoning principles. The untyped lambda calculus is a system that captures computation by rewriting terms. The key feature is the distinction between free and bound variables, and that of capture-avoiding substitution which ensures that we don't rewrite indiscriminately. This system is powerful, but not very intuitive, and easily allows us to write terms that don't seem to make much computational sense. In the simply typed lambda calculus a type system is imposed to rule out such terms. This turns out to give us a system that lacks computational power, and we put that back to obtain the system PCF which may be viewed as the core of modern functional languages. Introducing more sophisticated features in stages allows us to introduce notions as they become useful, and we are able to see them at work in different systems.
As programmers, we might want to think of two programs serving the same purpose (or being equivalent) if, whenever we may use one of them in a larger program, we might as well use the other without being able to detect any difference in the behaviour of the larger program. This is known as contextual equivalence, but it is hard to reason about using only syntax. We introduce the notion of a denotational semantics to allow us to reason about mathematical entities instead, and we investigate what properties such a semantics needs in order to allow us to reason about our terms. We provide models for the two more sophisticated systems and study their properties.
We also introduce the notion of logical relation as a powerful proof method.
Teaching and learning methods
The unit is based on detailed lecture notes including numerous exercises. They go beyond the material we assess by providing rigorous arguments for all the results given, as well as the relevant mathematical background. The notes are supported by videos that explain key concepts and ideas.
The approach to learning is blended: Key ideas are explored by the learners via introductory activities in the workshops, with support from unit staff, and plenary discussions take place to confirm the learners’ understanding and to correct any misconceptions. This prepares the students for the directed reading, supported by short videos, for the week. Students are asked to carry out formative exercises and they receive feedback via solutions that are released the following week.
There are coursework exercises in the form of take home tests which assess all ILOs, but only cover the first two languages taught. Further exercises are made available to prepare students for the questions they can expect for the exam.
Employability skills
- Analytical skills
- Innovation/creativity
- Problem solving
Assessment methods
| Method | Weight |
|---|---|
| Written exam | 80% |
| Practical skills assessment | 20% |
Feedback methods
Feedback is provided in a number of ways, via the self-assessment quizzes, via solutions provided for unassessed exercises, via the weekly study sessions where students can query their understanding, and via feedback provided on the two pieces of coursework.
Study hours
| Scheduled activity hours | |
|---|---|
| Practical classes & workshops | 22 |
| Independent study hours | |
|---|---|
| Independent study | 78 |
Teaching staff
| Staff member | Role |
|---|---|
| Andrea Schalk | Unit coordinator |
Fees and funding
Fees
Tuition fees for home students commencing their studies in September 2027 will be £10,050 per annum. Tuition fees for international students will be £39,700 per annum.
For general information please see the undergraduate finance pages.
Policy on additional costs
All students should normally be able to complete their programme of study without incurring additional study costs over and above the tuition fee for that programme. Any unavoidable additional compulsory costs totalling more than 1% of the annual home undergraduate fee per annum, regardless of whether the programme in question is undergraduate or postgraduate taught, will be made clear to you at the point of application. Further information can be found in the University's Policy on additional costs incurred by students on undergraduate and postgraduate taught programmes (PDF document, 91KB).
Scholarships/sponsorships
The University of Manchester is committed to attracting and supporting the very best students. We have a focus on nurturing talent and ability and we want to make sure that you have the opportunity to study here, regardless of your financial circumstances.
For information about scholarships and bursaries please visit our undergraduate student finance pages .
Regulated by the Office for Students
The University of Manchester is regulated by the Office for Students (OfS). The OfS aims to help students succeed in Higher Education by ensuring they receive excellent information and guidance, get high quality education that prepares them for the future and by protecting their interests. More information can be found at the OfS website.
You can find regulations and policies relating to student life at The University of Manchester, including our Degree Regulations and Complaints Procedure, on our regulations website.
