<?xml version="1.0" encoding="UTF-8"?>
<CourseUnit xmlns="http://www.manchester.ac.uk/CUICourseUnitDetails" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.manchester.ac.uk/CUICourseUnitDetails.xsd">
  <UnitCode Applicant="Y" Label="Unit code" Student="Y">
    <Code>COMP31311</Code>
  </UnitCode>
  <UnitTitle Applicant="Y" Label="Unit title" Student="Y">
    <Title>Giving Meaning to Programs</Title>
  </UnitTitle>
  <MaxUnits Applicant="Y" Label="Credit rating" Student="Y">
    <Units>10</Units>
  </MaxUnits>
  <TeachingPeriods Applicant="Y" Label="Teaching period(s)" Student="Y">
    <Period>Semester 1</Period>
  </TeachingPeriods>
  <AcademicCareer Applicant="Y" Label="Academic career" Student="Y">
    <Value>Undergraduate</Value>
  </AcademicCareer>
  <UnitLevel Applicant="Y" Label="Unit level" Student="Y">
    <Level>Level 3</Level>
  </UnitLevel>
  <StaffList Applicant="Y" Label="Teaching staff" RoleLabel="Course Unit Role" Student="Y">
    <StaffMember>
      <Name>Andrea Schalk</Name>
      <Role>Unit coordinator</Role>
    </StaffMember>
  </StaffList>
  <OfferedBy Applicant="Y" Label="Offered by" Student="Y">
    <OrganisationList>
      <Organisation>
        <OrgName>Department of Computer Science</OrgName>
      </Organisation>
    </OrganisationList>
    <GroupList>
      <Group>
        <GroupName></GroupName>
      </Group>
    </GroupList>
    <FheqLevels>
      <FheqLevel>
        <LevelNumber>1</LevelNumber>
        <LevelName>FHEQ level (Framework for Higher Education Qualifications) ' Last part of a Bachelors ' </LevelName>
      </FheqLevel>
    </FheqLevels>
    <Ects>
      <MaxUnits>European Credit Transfer &amp; Accumulation System Rating :   5.0</MaxUnits>
    </Ects>
  </OfferedBy>
  <MarketingOverview Applicant="Y" Label="Marketing Course unit overview" Student="">
    <Content>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;</Content>
  </MarketingOverview>
  <UnitOverview Applicant="" Label="Course unit overview" Student="Y">
    <Content>&lt;p&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;We look at three languages to illustrate various features, and the techniques required to reason about them. In the first language our main emphasis on non-deterministic specifications of program behaviour and how one might prove confluence, as well as the issue of non-terminating computation. The second language builds on this by adding a type system, and we look at how to present the notion of typing a program in the presence of free variables. We present a theory of program equivalence based on interchangeable use in any context, and a semantics that captures this notion precisely. This language lacks computational power, and we add recursion as a final element to give a third language. Interpreting recursive programs requires a significant mathematical machinery, and we show how that works. We lose the tight connection between the notion of program equivalence and semantics, and we sketch the reasons for that.&lt;/p&gt;</Content>
  </UnitOverview>
  <Aims Applicant="Y" Label="Aims" Student="Y">
    <Content>&lt;p&gt;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. &amp;nbsp;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.&amp;nbsp;&lt;/p&gt;</Content>
  </Aims>
  <LearningOutcomes Applicant="Y" Label="Learning outcomes" Student="Y">
    <Content>&lt;p&gt;&lt;strong&gt;ILO 1:&lt;/strong&gt; apply fundamental theoretical results about programming languages and particular techniques to reason about programs;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;ILO 2: &lt;/strong&gt;compute the denotations of types and programs;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;ILO 3: &lt;/strong&gt;prove equivalence of programs in a suitable programming language making use of appropriate techniques and models;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;ILO 4:&lt;/strong&gt; prove selected results about programs using structural induction;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;ILO 5: &lt;/strong&gt;describe and analyse the behaviour of programs in the various models of computation studied;&lt;/p&gt;</Content>
  </LearningOutcomes>
  <Knowledge Applicant="Y" Label="Knowledge and understanding" Student="Y">
    <Content></Content>
  </Knowledge>
  <IntellectualSkills Applicant="Y" Label="Intellectual skills" Student="Y">
    <Content></Content>
  </IntellectualSkills>
  <PracticalSkills Applicant="Y" Label="Practical skills" Student="Y">
    <Content></Content>
  </PracticalSkills>
  <TransferableSkills Applicant="Y" Label="Transferable skills and personal qualities" Student="Y">
    <Content></Content>
  </TransferableSkills>
  <EmployabilitySkillsList Applicant="Y" Label="Employability skills" Student="Y">
    <Skill>
      <SkillId>Analytical skills</SkillId>
      <SkillDescription></SkillDescription>
    </Skill>
    <Skill>
      <SkillId>Innovation/creativity</SkillId>
      <SkillDescription></SkillDescription>
    </Skill>
    <Skill>
      <SkillId>Problem solving</SkillId>
      <SkillDescription></SkillDescription>
    </Skill>
  </EmployabilitySkillsList>
  <Syllabus Applicant="Y" Label="Syllabus" Student="Y">
    <Content>&lt;p&gt;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. &amp;nbsp;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.&lt;/p&gt;&lt;p&gt;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 &amp;nbsp;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.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;We also introduce the notion of logical relation as a powerful proof method.&lt;/p&gt;</Content>
  </Syllabus>
  <TeachingMethods Applicant="Y" Label="Teaching and learning methods" Student="Y">
    <Content>&lt;p&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;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.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</Content>
  </TeachingMethods>
  <AssessmentMethods Applicant="Y" Label="Assessment methods" Student="Y">
    <IntroText> </IntroText>
    <Method>
      <MethodId>1</MethodId>
      <MethodName>Written exam</MethodName>
      <MethodWeight>80%</MethodWeight>
    </Method>
    <Method>
      <MethodId>8</MethodId>
      <MethodName>Practical skills assessment</MethodName>
      <MethodWeight>20%</MethodWeight>
    </Method>
  </AssessmentMethods>
  <FeedbackMethods Applicant="Y" Label="Feedback methods" Student="Y">
    <Content>&lt;p&gt;&lt;meta charset="utf-8" /&gt;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.&lt;/p&gt;</Content>
  </FeedbackMethods>
  <RequirementsList Applicant="Y" Label="Pre/co-requisites" Student="Y">
    <Requirement>
      <UnitCode>MATH10111</UnitCode>
      <UnitTitle>Foundations of Pure Mathematics B</UnitTitle>
      <RequirementType>Pre-Requisite</RequirementType>
      <Description>Compulsory</Description>
    </Requirement>
    <Requirement>
      <UnitCode>COMP11120</UnitCode>
      <UnitTitle>Mathematical Techniques for Computer Science</UnitTitle>
      <RequirementType>Pre-Requisite</RequirementType>
      <Description>Compulsory</Description>
    </Requirement>
    <Requirement>
      <UnitCode>MATH11121</UnitCode>
      <UnitTitle>Mathematical Foundations &amp; Analysis</UnitTitle>
      <RequirementType>Pre-Requisite</RequirementType>
      <Description>Compulsory</Description>
    </Requirement>
    <AdditionalRequirement>COMP31311 pre-requisites are MATH11121 or COMP11120&lt;p&gt;COMP11120 or MATH10111&lt;br/&gt;&amp;nbsp;&lt;/p&gt;</AdditionalRequirement>
  </RequirementsList>
  <AcademicPrograms Applicant="Y" Label="Academic programmes" Student="Y">
    <AcademicProgram>
      <Program></Program>
      <Plan></Plan>
      <Level></Level>
      <Requirement></Requirement>
    </AcademicProgram>
  </AcademicPrograms>
  <FreeChoice Applicant="Y" Label="Available as a free choice unit?" Student="Y">
    <Content>Y</Content>
  </FreeChoice>
  <Accreditation Applicant="Y" Label="Accreditation" Student="Y">
    <Content></Content>
  </Accreditation>
  <RecommendedReading Applicant="Y" Label="Recommended reading" Student="Y">
    <Content></Content>
  </RecommendedReading>
  <StudyHours Applicant="Y" Label="Study hours" Student="Y">
    <IntroText> </IntroText>
    <ScheduledHours Applicant="Y" Label="Scheduled activity hours" Student="Y">
      <ActivityHours>
        <ActivityType>Practical classes &amp; workshops</ActivityType>
        <Hours>22</Hours>
      </ActivityHours>
    </ScheduledHours>
    <PlacementHours Applicant="Y" Label="Placement hours" Student="Y">
      <ActivityHours>
        <ActivityType></ActivityType>
        <Hours>0</Hours>
      </ActivityHours>
    </PlacementHours>
    <TotalHours Applicant="Y" Label="Independent study hours" Student="Y">
      <Hours>78</Hours>
    </TotalHours>
  </StudyHours>
  <Notes Applicant="Y" Label="Additional notes" Student="Y">
    <Content></Content>
  </Notes>
</CourseUnit>
