oxford cs degree

118
Oxford Moderations, Honour School of Computer Science In the first year of the undergraduate Computer Science degree, students take ten lecture courses - eight computer science and two taught in conjunction with mathematics (with lectures being held in the Maths Institute). The courses are examined in five papers CS1-CS4 and M1(CS). Note: First-year Computer Science students are not examined on continuous probability, and so are only expected to attend the first four Probability lectures in Hilary term (but may attend others if they wish). Functional Programming Michaelmas Term 2011 Design and Analysis of Algorithms Hilary Term 2012 CS2 Imperative Programming I Hilary Term 2012 CS2 Imperative Programming II Trinity Term 2012 CS3 Discrete Mathematics Michaelmas Term 2011 CS3 Linear Algebra Michaelmas Term 2011, Hilary Term 2012 CS4 Logic and Proof Hilary Term 2012 CS4 Digital Systems Trinity Term 2012, Hilary Term 2012 Functional Programming: 2011- 2012 Term Michaelmas Term 2011 (16 lectures) Overview MSc students will be assessed by invigilated exam lasting approximately 2 hours in week 0 of HT. This is a first course in programming. It makes use of a programming language called Haskell, in which programs can be viewed as mathematical functions. This makes the language very powerful, so that 1

Upload: miguel-covarrubias

Post on 16-Jul-2016

227 views

Category:

Documents


0 download

DESCRIPTION

Oxford CS Degree

TRANSCRIPT

Page 1: Oxford CS Degree

Oxford Moderations, Honour School of Computer Science

In the first year of the undergraduate Computer Science degree, students take ten lecture courses - eight computer science and two taught in conjunction with mathematics (with lectures being held in the Maths Institute). The courses are examined in five papers CS1-CS4 and M1(CS).

Note: First-year Computer Science students are not examined on continuous probability, and so are only expected to attend the first four Probability lectures in Hilary term (but may attend others if they wish).

Functional Programming    Michaelmas Term 2011 Design and Analysis of Algorithms    Hilary Term 2012

CS2   Imperative Programming I    Hilary Term 2012

CS2   Imperative Programming II    Trinity Term 2012

CS3   Discrete Mathematics    Michaelmas Term 2011

CS3   Linear Algebra    Michaelmas Term 2011, Hilary Term 2012

CS4   Logic and Proof    Hilary Term 2012

CS4   Digital Systems    Trinity Term 2012, Hilary Term 2012

Functional Programming:  2011-2012

Term Michaelmas Term 2011  (16 lectures)

Overview

MSc students will be assessed by invigilated exam lasting approximately 2 hours in week 0 of HT.

This is a first course in programming. It makes use of a programming language called Haskell, in which programs can be viewed as mathematical functions. This makes the language very powerful, so that we can easily construct programs that would be difficult or very large in other languages.

An important theme of the course is how to apply mathematical reasoning to programs, so as to prove that a program performs its task correctly, or to derive it by algebraic manipulation from a simpler but less efficient program for the same problem.

The course provides hands-on experience of programming through two lab exercises: the first one aims to make you acquainted with the mechanics of writing Haskell programs, and the second one tackles a more challenging programming task.

Mathematics students taking this course should note that the practical exercises are a compulsory part of the course and will be assessed.

1

Page 2: Oxford CS Degree

Learning outcomes

At the end of the course the student will be able to:

1. Write programs in a functional style;2. Reason formally about functional programs;

3. Use polymorphism and higher-order functions;

4. Reason about the time and space complexity of programs.

Synopsis Programming with a functional notation: sessions and scripts, expressions and values. Evaluation

of expressions. Reduction strategies: innermost vs outermost. Functional application and currying. Functional composition.

Types and strong-typing. Basic types: Booleans and truth values. Simple programs involving pattern matching. Polymorphism and type classes. More types: characters, strings, tuples. Type synonyms

Lists and their operations; list comprehensions. The functions map, foldl, foldr, concat and filter. Many small examples illustrating the use of these functions in a compositional style of programming.

Recursion and induction. The algebraic properties of list functions and their proof by equational reasoning. Simple manipulation of programs to achieve efficiency.

Infinite lists and their applications: Pascal's triangle, digits of a number, sieve of Eratosthesnes. Infinite lists as limits. Proving properties of infinite lists: induction, take lemma.

Non-linear data structures. Binary trees and the relationship between size and depth. Binary search trees for representing sets. Insertion and searching in a binary search tree.

Time complexity. Asymptotic notation. Advice on writing efficient programs; use of accumulating parameters.

Arithmetic expressions: representing, evaluating and manipulating arithmetic expressions. Building a simple parser.

SyllabusPrinciples of functional programming: expressions, evaluations, functions, and types. Type definitions and built-in types: numbers, characters, strings and lists. Basic operations on lists, including map, fold and filter, together with their algebraic properties. Recursive definitions and structural induction. Simple program calculation. Infinite lists and their uses. Further data structures: binary trees, general trees. Use of trees for representing sets and symbolic data. Normal order reduction and lazy evaluation. Simple cost models for functional programs; time and space complexity.

2

Page 3: Oxford CS Degree

Reading listCourse text:

Richard Bird, Introduction to Functional Programming using Haskell, second edition, Prentice-Hall International, 1998.

Additional Reading: Graham Hutton, Programming in Haskell, Cambridge University Press, 2007 Simon Thompson, Haskell: The Craft of Functional Programming, Addison-Wesley, 1996.

Paul Hudak, The Haskell School of Expression, Cambridge University Press, 2000.

Design and Analysis of Algorithms 

Term Hilary Term 2012  (16 lectures)

OverviewThis core course covers good principles of algorithm design, elementary analysis of algorithms, and fundamental data structures. The emphasis is on choosing appropriate data structures and designing correct and efficient algorithms to operate on these data structures.

Learning outcomes

This is a first course in data structures and algorithm design. Students will:

learn good principles of algorithm design; learn how to analyse algorithms and estimate their worst-case and average-case behaviour (in

easy cases);

become familiar with fundamental data structures and with the manner in which these data structures can best be implemented; become accustomed to the description of algorithms in both functional and procedural styles;

learn how to apply their theoretical knowledge in practice (via the practical component of the course).

Synopsis Program costs: time and space. Worst case and average case analysis. Asymptotics and "big O"

notation. Polynomial and exponential growth. Asymptotic estimates of costs for simple algorithms. Use of induction and generating functions. [2]

Algorithm design strategies: top down design, divide and conquer. Application to sorting and searching and to matrix algorithms. Solution of relevant recurrence relations. [4]

Data structures and their representations: arrays, lists, stacks, queues, trees, heaps, priority queues, graphs. [3]

3

Page 4: Oxford CS Degree

Introduction to discrete optimisation algorithms: dynamic programming, greedy algorithms, shortest path problems. [3]

Graph algorithms: examples of depth-first and breadth-first search algorithms. Topological sorting, connected components. [3]

SyllabusBasic strategies of algorithm design: top-down design, divide and conquer, average and worst-case criteria, asymptotic costs. Simple recurrence relations for asymptotic costs. Choice of appropriate data structures: arrays, lists, stacks, queues, trees, heaps, priority queues, graphs, hash tables. Applications to sorting and searching, matrix algorithms, shortest-path and spanning tree problems. Introduction to discrete optimisation algorithms: dynamic programming, greedy algorithms. Graph algorithms: depth first and breadth first search.

Reading list T. H. Cormen, C. E. Leiserson, R. L. Rivest and C. Stein. Introduction to Algorithms, 3rd edition,

MIT Press, 2009 (2nd edition [2001] or 1st edition, [1990] can be used as well). This is the main text book for this lecture course.

M. T. Goodrich and R. Tommassia. Algorithm Design, Wiley, 2002.

S. Dasgupta, C. Papadimitriou, and U. Vazirani. Algorithms. McGraw-Hill Higher Education. 2006

Imperative Programming I:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

OverviewThis course applies lessons that have been learnt in Functional Programming to the design of programs written in an imperative style. By studying a sequence of programming examples, each a useful software tool in its own right, students learn to construct programs in a systematic way, structuring them as a collection of modules with well-defined interfaces. The course also introduces the idea of loop invariants for understanding and reasoning about loops. Through lab exercises, students learn to create, debug and maintain programs of a non-trivial but moderate size. The course uses the programming language Scala, a modern object-oriented programming language, heavily influenced by the functional programming paradigm.

Learning outcomes

After studying this course, undergraduates will be able to:

4

Page 5: Oxford CS Degree

1. Translate basic functional idioms into imperative ones.2. Design simple loops, using invariants to explain why they work correctly

3. Use subroutines and modules to structure more complex programs.

4. Design simple data structures.

5. Understand the imperative implementation of some common algorithms.

Synopsis Basic imperative programming constructs: assignments, conditionals, procedures and loops.

Comparison of imperative and functional programming. Example: factorials. Method of invariants: correctness rules for while loops; proof of termination. Examples

including summing an array, slow and fast exponentiation. Unit testing; debugging.

Examples: string comparison, printing numbers in decimal.

Binary search.

Quicksort.

Programming with abstract datatypes.

Objects and classes as modules; data abstraction.

Reference-linked data structures: linked lists.

Hash tables.

Binary trees.

Syllabus

Imperative programming constructs, with informal treatment of invariants. Procedures and modules; their use in the design of large programs. Data structures: arrays, reference-linked data structures. Basic tools for program development. Case studies in design of medium-sized programs.

Reading list

Students will benefit from having access to the following book:

Martin Odersky, Lex Spoon and Bill Venners, Programming in Scala, artima, 2008.

This book gives a good description of the Scala language; however, it assumes that the reader already knows how to program in an imperative style. It should therefore be read in conjunction with the lectures.

The following book will provide useful additional reading:

Jon Bentley, Programming Pearls, Dorling Kindersley, 2006.

5

Page 6: Oxford CS Degree

Imperative Programming II:  2011-2012

Information

Term Trinity Term 2012  (16 lectures)

OverviewThis course starts with an introduction to the basic concepts and techniques of modular program construction and Object-Oriented Programming (OOP). It continues with two modest-sized case-studies that introduce some of the basic OOP programming idioms (Design Patterns) in realistic settings.

There are three main ideas: encapsulation, that programs should be built from objects that satisfy a coherent specification and hide the details of how that specification is implemented; object identity, that each object has a distinct identity, so that multiple objects can co-exist and interact with each other; and polymorphism, that objects that implement the same interface can be used interchangeably to give a variety of behaviours.

There is a correspondingly heavy use of practicals to develop understanding of OOP in general, and the use of Java in particular.

Synopsis

1: Introduction: Objects, Classes and Abstract Data Types

[1] Object-Oriented Programming. A program for a simple editing task. Abstraction and Decomposition. Rewriting the program to use an abstract data type (ADT). Objects and methods. The Java language.[2] How to specify an ADT. Abstract state space. Operations with pre- and post-conditions, illustrated by the Text example. Using the Text ADT.[3] How to implement an ADT. Concrete state space, concrete invariant, abstraction function. Implementing operations, illustrated by the Text example.[4] Features of object-oriented programming. Encapsulation. Alternative implementations. Exceptions.

2: Case study

[5-7] Introducing the Editor. Object-oriented design. Interfaces. Subtyping, polymorphism. Semantics of parameters in Java. Inner classes.[8-10] Features of the Editor. Model--View separation, decoupling, inheritance, dynamic binding. The fragile base class problem.[11-12] Extending the Editor. Undoing commands. Abstract classes; subtyping and polymorphism revisited. Cloning. Using a stack.

3: Immutable Abstract Types, Collections and Generics

6

Page 7: Oxford CS Degree

[13] Immutable Abstract Types[14] Programming with collections. Accessing all elements of a collection. Iterators.[15] The Java Collections framework. Interfaces. Implementing Collections. Hash tables.[16] Generic Programming. Type parameters. Generic classes and interfaces. Generic collections. The Map interface.

Reading list

Recommended

Lecture slides from the Course Materials part of this site. The 4up-part[123].pdf variants are suitable for printing.

The closest book in spirit to the course is:

Barbara Liskov, Program Development in Java, Addison-Wesley, 2000, £41.99, ISBN 0201657686. Chapters 1-10 are especially relevant and provide a useful supplement to the lectures. (However, we shall be using a different convention for writing specifications and we shall emphasize programming examples more than this book. For more details on how to use this book see Mike Spivey's Notes on Liskov's book.)

We will not spend much time on the details of the Java language or libraries, as these are not the main focus of the course (and covering them comprehensively would leave no time for anything else!). A handy reference for language details is:

Peter Sestoft, Java Precisely (2nd ed.), MIT Press, 2005, £12.95, ISBN 0262693259.

This book will be very useful for the practical exercises. The most recent edition covers the extensive new language features introduced in Java 1.5 (= Java 5.0), including generics.

Optional

Mike Spivey's notes are very full, and highly illuminating. They were originally designed as handouts for his lectures when this course was taught in the second year, so they are very slightly out of date with respect to this year's course material. They are available on the Course Materials part of this site.

 For reading around the course, I recommend a number of other books. Encourage your college library to get these. 

First, some people might enjoy the quirky approach of:

Kathy Sierra & Bert Bates, Head First Java, O'Reilly, 2005, £31.95, ISBN 0596009208.

This book is a much more serious text book than it appears and you might find it a helpful way to learn.

A sound and thorough introduction to Java is:

7

Page 8: Oxford CS Degree

Pat Niemeyer, Learning Java (3rd ed.), O'Reilly, 2005, £31.95, ISBN 0596008732.

Earlier editions of this book will be almost as useful, but only the third edition covers generics.

The following book is about restructuring programs to make them clearer (the program maintenance counterpart of modular design):

Martin Fowler, Refactoring: improving the design of existing code, Addison-Wesley, 2000, £37.99, ISBN 0201485672.

This book helps to bring home the real distinctiveness of the object-oriented approach to programming, compared to standard procedural programming, and should help you develop the skill of designing for clarity and robustness.

The following books about programming more generally would also be good companions to the course:

Jon Bentley, Programming Pearls (2nd ed.), Addison-Wesley, 2000, £21.99, ISBN 0201657880. Brian W. Kernighan and Rob Pike, The Practice of Programming, Addison-Wesley, 1999, £28.99,

ISBN 020161586X.

Discrete Mathematics:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures)

OverviewIn order to be able to formulate what a computer system is supposed to do, or to prove that it does meet its specification, or to reason about its efficiency, one needs the precision of mathematical notation and techniques. For instance, to specify computational problems precisely one needs to abstract the detail and then use mathematical objects such as sets, functions, relations, orders, and sequences. To prove that a proposed solution does work as specified, one needs to apply the principles of mathematical logic, and to use proof techniques such as induction. And to reason about the efficiency of an algorithm, one often needs to count the size of complex mathematical objects. The Discrete Mathematics course aims to provide this mathematical background.

Learning outcomes

This is an introductory course on discrete mathematics. Students will learn:

some fundamental mathematical concepts and terminology;

8

Page 9: Oxford CS Degree

how to use and analyse recursive definitions;

how to count some different types of discrete structures;

techniques for constructing mathematical proofs, illustrated by discrete mathematics examples.

Synopsis

The course is to be divided into eight topics, each topic with an associated proof technique or style. The weekly "extra topic" is to round out the material and will only be covered in lectures if time permits.

Week 1: Sets. Definition of sets, subsets, some standard set; union, intersection, relative complement, symmetric difference, complement, cartesian products, power sets; algebraic laws; cardinality of finite sets. Writing mathematical proofs, double inclusion proofs for set equality, proof by cases. Extra topic: bags.

Week 2: Functions. Intervals; functions, domain and codomain, partial functions, restriction; 1-1, onto, and bijective functions; composition and inverse. Proof of the contrapositive and proof by contradiction. Extra topic: binary operators.

Week 3: Counting. Counting laws of sum, subtract, product; permutations, factorial function, combinations, binomial coefficients; inclusion-exclusion principle, derangements; floor and ceiling functions. Proofs techniques for counting, with many examples. Extra topic: multinomial coefficients.

Week 4: Relations. Binary relations; properties of relations: reflexivity, irreflexivity, symmetry, antisymmetry, transitivity, seriality; equivalence relations, equivalence classes, and partitions; relational compositive, converse, and transitive closure; graphical representation of relations. Extra topic: counting relations.

Week 5: Sequences. Sequences and recurrence relations; sigma notation and partial sums of sequences; recurrence relations arising from counting problems, including derangements and partitions. Proof by induction. Extra topic: solving linear recurrence relations.

Week 6: Modular Arithmetic. Definition of modular arithmetic via an equivalence relation; properties of addition, multiplication, and exponentation (mod n); Euclid's algorithm, binary MOD and DIV functions, multiplicative inverses (mod p). The Pigeonhole Principle, illustrated by some pure number theoretic results. Extra topic: representing positive integers as sums of two squares.

Week 7: Asymptotic Notation. Big-O notation, tail behaviour of sequences, examples drawn from running times of common algorithms. Proofs of sentences of the form (exists x.forall y.P) with examples of asymptotic behaviour proofs including simplified Stirling's formula. Choosing the right inductive hypothesis for big-O proofs. Extra topic: solving recurrence relations of divide-and-conquer type, up to asymptotic order.

Week 8: Orders. Pre-orders, partial orders, and linear orders; chains; product and lexicographic order on cartesian products; upper and lower bounds, lub and glb. Proofs of sentences of the form (forall x.exists y.P), with examples from interesting orders. Extra topic: order isomorphisms.

9

Page 10: Oxford CS Degree

SyllabusSets: union, intersection, difference, power set, algebraic laws. Functions: injectivity & surjectivity, composition & inverse. Relations, equivalence relations, and partitions; relational composition & converse, transitive closure; orders, least upper and greatest lower bounds. Combinatorial algebra: permutations, combinations, sums of finite sequences. Functions associated with combinatorial problems: ceiling, floor, factorial, combinatorial coefficients. The inclusion-exclusion principle. Recurrence relations arising from combinatorial problems. Modular arithmetic, Euclid's algorithm, and applications.

Reading list A. D. Ker, Discrete Mathematics Lecture Notes, 2009.

Comprehensive, book-style, notes (not repackaged overheads). Available in weekly installments during lectures, and online at the end of the corresponding week.

Primary Text

K. A. Ross and C. R. B. Wright, Discrete Mathematics (Fifth Edition), Prentice Hall, 2003

This book has much to commend it, including an enormous number of examples and exercises and a computer science oriented exposition. It is pitched at a somewhat easy level, suitable for supplementing the lecture notes. It is rather expensive (about £50) but there are many copies in Oxford libraries.

Alternative Texts

A. Chetwynd and P. Diggle, Discrete Mathematics, Arnold, 1995.

Very basic, but easy to read. Only covers the first half of the course. Cheap.

R. P. Grimaldi, Discrete And Combinatorial Mathematics (Fifth Edition), Addison Wesley, 2003.

Some of the book is rather advanced, but also covers the basics quite well. Has many good practice questions (some difficult). Earlier editions are equally useful.

Linear Algebra:  2011-2012

Information

Term Michaelmas Term 2011 | Hilary Term 2012  (24 lectures)

OverviewThere are 16 lectures in MT and 8 in HT.

10

Page 11: Oxford CS Degree

This is a first course in linear algebra. The course will lay down the basic concepts and techniques of linear algebra needed for subsequent study. At the same time, it will provide an appreciation of the wide application of this discipline within the scientific field.

The course will require development of theoretical results. Proofs and consequences of such results will require the use of mathematical rigour, algebraic manipulation, geometry and numerics.

A goal of the course is to provide insight into how linear algebra theorems and results, sometimes quite abstract, impinge on everyday life. This will be illustrated with detailed examples.

Learning outcomes

At the end of this course the student will be capable of gained the ability to:

Comprehend vector spaces (subspaces). Understand fundamental properties of matrices including inverse matrices, eigenvalues and

linear transformations.

Be able to solve linear systems of equations.

Have an insight into the applicability of linear algebra.

Synopsis Vectors: Vectors and geometry in two and three space dimensions, Algebraic properties, Dot

products and orthogonality, Linear independence, Basis, Dimension, Vector spaces and subspaces. [1,4]

Matrices: Matrix operations, Column and row space, Null and range space, rank, Determinants, Inverse matrices, Population growth, Error correcting codes. [2,4]

Linear transformations: Definition and examples, Properties, Composition, Rotations and reflections, Matrices, One-to-one and onto, Robotics [2,4]

Solution of linear systems: Examples of linear systems, Problems arising from solving on a Computer, Row echelon form, Gaussian elimination, Pivoting, Network analysis, Global positioning system [3,4]

Eigenvalues and eigenvectors: Definition, Similarity and diagonalization, Population growth revisited, Systems of linear differential equations [2,4]

Syllabus Vector spaces and subspaces (4 lectures) Matrices (4 lectures)

Inverse matrices (3 lectures)

Linear transformations (5 lectures)

Solution of linear systems (5 lectures)

11

Page 12: Oxford CS Degree

Eigenvalues and eigenvectors (3 lectures)

Reading list Introduction to linear algebra (3rd Edition), Gilbert Strang, Wellesley-Cambridge press.

Logic and Proof:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

Overview

Logic plays an important role in many disciplines, including Philosophy and Mathematics, but it is particularly central to Computer Science. This course emphasises the Computer-Science aspects of logic, including applications to databases, constraint solving, programming and automated verification, among many others.  We also highlight algorithmic problems in logic, such as SAT-solving, model checking and automated theorem proving. 

The course relates to a number of third-year and fourth-year options. Temporal logic is used extensively in Computer-Aided Formal Verification and Probabilistic Verification. Propositional and predicate logic are also central to Complexity Theory, Knowledge Representation and Reasoning and Theory of Data and Knowledge Bases.

Learning outcomes

At the end of the course students are expected to:

Understand and be able to explain and illustrate the meaning of given logical formulas, to translate such formulas into English and vice-versa.

Be able to use the resolution proof system in proposiitonal logic and in predicate logic.

Be able to express and formalize in a logical language properties of models such as graphs, strings and transition systems, and be able to determine the truth or falsity of such formulas in a given model.

Synopsis

Propositional logic (7 Lectures).

1. Syntax of propositional logic. Translating combinatorial problems to propositional logic. Truth tables.

2. Validity and satisfiability of formulas. Logical equivalence and algebraic reasoning. 12

Page 13: Oxford CS Degree

3. Normal forms: CNF, DNF, Tseitin's encoding.

4. Polynomial-time algorithms for Horn formulas and 2-SAT.

5. Resolution: soundness and refutation completeness.

6. Compactness Theorem.

First-order logic (7 Lectures).

1. Signatures, structures and valuations. 2. Examples: graphs, trees, strings, relational databases and number systems.

3. Formula evaluation on finite structures.

4. Prenex normal form and Skolemisation.

5. Herbrand models and ground resolution.

Temporal Logic (2 lectures).

1. Linear Temporal Logic (LTL) and example specifications. 2. Semantics of LTL, including basic equivalences

3. Model checking LTL formulas by inspection.

Syllabus Introduction to propositional logic. Syntax of propositional logic. Truth tables. Resolution.

Notions of soundness and completeness. Proofs by induction on the structure of formulas. Introduction to first-order logic. Syntax of first-order logic. Semantics of first-order logic: graphs,

strings, databases and number systems as first-order structures.

Prenex form and Skolemisation.

Herbrand models and ground resolution. Unification and logic programming.

Introduction to Linear Temporal Logic. Kripke structures and model checking.

Reading list

Primary text:

Logic for Computer Scientists. Uwe Schoning. Modern Birkäuser Classics, Reprint of the 1989 edition.

Secondary text:

Logic in computer science: modelling and reasoning about systems,2nd edition, by M. Huth and M. Ryan (Cambridge University Press, Cambridge 2004).

13

Page 14: Oxford CS Degree

Digital Systems:  2011-2012

Information

Term Hilary Term 2012 | Trinity Term 2012  (24 lectures)

OverviewThere are 8 lectures in HT and 16 in TT.

This course covers the fundamentals of the electronic circuits that are used to build computers, and outlines the software components that support their use. From the functions of individual transistors, it constructs a complete implementation of a simple processor, explaining in a structured way how complex behaviours are built up from simpler parts. This is followed by an overview of the software components of a complete computer system. Students will gain an understanding of the factors that affect the performance of hardware, and how these factors change with changes of scale, for example in the size of the data that a computer system handles. They will also gain experience in the important technique of hierarchical specification, implementation and proof of correctness using logic and data representation.

Learning outcomes

After studying this course, undergraduates will be able to:

1. Design small combinational and sequential circuits from logic gates.2. Understand the design of processors with simple architectures.

3. Implement simple programs in assembly language.

4. Understand the characteristics and limitations of computer arithmetic.

5. Understand the rôles of interpreters, compilers, and assemblers.

6. Be familiar with operating system services such as the file system, virtual memory, and simple network services.

7. Distinguish between specification and implementation, and appreciate the use of rigorous correctness arguments.

Synopsis Overview; propositional logic; disjunctive and conjunctive normal forms. Concept of gate;

adequacy of {AND, OR, NOT}; adequacy of NAND; Karnaugh maps. [2] Array circuits: multiplexers, demultiplexers, decoders; programmable logic arrays. [1]

Combinational examples; arithmetic circuits, adders, arithmetic-logic units. Ripple-carry adder; carry lookahead adder. [2]

14

Page 15: Oxford CS Degree

Twos-complement integers; signed and unsigned arithmetic. [1]

CMOS as an example technology; transistors; inverter; nand; nor; exor; and; or. State, latches and flip-flips as primitives. [1]

Sequential circuits, simple pipelines and simple state machines. Synchronous design discipline; examples; limitations, hazards; alternative implementations of sequential circuits. [2]

Registers; random-access memory; register-transfer design. Straightforward implementation of a subset of MIPS. [2]

Simple programs; assembler. [1]

Stack; evaluation of expressions. Simple control structures; subroutines; concept of interrupt/exception. [2]

Alternative styles of processor architecture. [1]

Floating-point arithmetic. [1]

Structured data; recursive data; heap storage; serialization. [1]

Simple input/output; serial representations of data. Persistent storage; disk-like devices; tape-like devices. [2]

Concepts of caching; outline of virtual memory. [1]

Processes; kernel; kernel services; interprocesses communications. [1]

File store; UNIX-like file system; other examples for contrast. [1]

Packet-switched networking; elements of IP networking; routing. Network services such as the Domain Name Service; web services. [2]

There will be two practicals: one on simulating a carry-look ahead adder in Haskell; the other will use a MIPS simulator to run simple code related to exercises on compiling expressions.

SyllabusSimple design of combinational and sequential circuits; standard design elements. Computer arithmetic for integers and floating-point numbers; basic error analysis. Register transfer level design of a simple microprocessor. Simple programming in assembly language. Rôle of assemblers, compilers and linkers. Memory hierarchy. Simple operating system services: file systems, processes. Principples of networked services.

Reading list Lecturer's notes and exercises. S.A. Ward and R.H. Halstead, Computation Structures, MIT Press, 1990.

A.S. Tanenbaum, Structured Computer Organisation, Prentice-Hall International, Third Edition, 1990.

15

Page 16: Oxford CS Degree

M.M. Mano, Digital Design, Prentice-Hall International, 1984.

T. H. Cormen, E. E. Leiserson and R. L. Rivest, Introduction to Algorithms, first edition only, The MIT Press, 1990.

J. L. Hennessy and D. A. Patterson, Computer Organisation and Design: the hardware/software interface, Morgan-Kaufmann, 2005 (Third edition).

Part A, Honour School of Computer Science

In the second year Computer Science students are required to take - the core courses in Concurrency, Models of Computation and Object Oriented Programming . - five Computer Science options from Part A.

Problem classes will be organised centrally for the computer science optional courses, although colleges may also organise tutorials. Practicals will be assessed as a nominal paper, as for Mods. They play no part in the classification but each year a candidate must pass the practical component of the course in order to pass the exam, i.e. candidates must achieve 30% or more overall in their practicals each year to pass.

Part A Core

Models of Computation 16 Lectures, Michaelmas Term 2011 Object Oriented Programming 16 Lectures, Michaelmas Term 2011

Concurrency 16 Lectures, Hilary Term 2012

Part A Options

Computer Graphics 16 Lectures, Michaelmas Term 2011 Databases 16 Lectures, Michaelmas Term 2011

Formal Program Design 24 Lectures, Michaelmas Term 2011

Advanced Data Structures and Algorithms 16 Lectures, Hilary Term 2012

Compilers 16 Lectures, Hilary Term 2012

Concurrent Programming 16 Lectures, Hilary Term 2012

Computer Architecture 16 Lectures, Trinity Term 2012

Computer Networks 16 Lectures, Trinity Term 2012

Models of Computation:  2011-2012

Information

16

Page 17: Oxford CS Degree

Term Michaelmas Term 2011  (16 lectures)

OverviewThis course introduces the classical mathematical models used to analyse computation, including finite state automata, grammars, and Turing Machines.

A computer scientist should be able to distinguish between what can be computed and what cannot. This distinction can only be made with a good scientific model of computers and computation. This course introduces the powerful idea of using a mathematical model to analyse computation.

This course describes a number of different models of computation which were proposed and analysed over the past century. Many of these models were found to be equivalent, in the sense that they allow exactly the same computations to be carried out. Other models were shown to be less powerful, but simpler to implement, and so useful for some purposes.

Synopsis

Part 1: Finite-state machines and regular languages

General introduction. The FSM model. DFA's. Transition diagrams. Examples. NFA. The subset construction. Reduction of NFA to DFA.

Regular Languages. Closure properties. Constructions on machines.

Regular expressions. Some regular algebra. Algebraic laws.

Compiling regular expressions into NFA's, and vice versa.

Regular grammars. Equivalence to regular languages.

Limits to FSM's. The Pumping Lemma.

Context-free Languages and Pushdown Automata. The Chomsky hierarchy.

Part 2: Turing machines and computability Turing's Analysis of computation. The Turing machine model: FSM's plus memory (the "tape"). The intuitive notion of computability. Decision problems. Encoding problems as sets of strings.

Expressive power of Turing machines. Church's thesis.

Undecidable problems. Diagonalization. The halting problem.

Survey of decidable and undecidable problems. A glimpse beyond: complexity, P=NP?

17

Page 18: Oxford CS Degree

SyllabusThe finite-state machine. DFA and NFA and their equivalence. Regular languages and regular expressions. Regular grammars. The pumping lemma.

The Turing machine. Church's Thesis. Decision problems and undecidability. The halting problem. Chomsky grammars.

Reading listPrimary Text

M Sipser, Introduction to the Theory of Computation, PWS Publishing Company, January 1997.

Background Reading J E Hopcroft, R Motwani and J D Ullman, Introduction to Automata Theory, Languages and

Computation,Addison-Wesley, Second edition, 2001. G. Boolos and R. Jeffrey, Computability and Logic, Cambridge University Press, 3rd Edition, 1989.

Object Oriented Programming:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures)

OverviewStudents attending this course are expected to acquire advanced skills in object-oriented programming and design. The course particularly focuses on the design aspects of object-oriented programming and concepts such as responsibility and collaboration analysis, and designing for change. All examples in this course are given in the Java programming language, and the design aspects are presented in UML by means of class and sequence diagrams.

All the material in this course is based on a single case study of building a vector graphics application. The course starts by specifying the application requirements, and then continues by designing the application architecture. The design is firmly grounded in the responsibility analysis of the system's components, the principle of the separation of concerns, loose coupling and high cohesion, and design by contract.

The requirements are successively modified and amended with fresh functionality such adding new graphical objects. The course analyses how the changes in the requirements impact the system's architecture, and how the principles of object-oriented programming can be used to minimize this impact.

18

Page 19: Oxford CS Degree

The first half of the course focuses on the role that various OO language features play in the design of complex systems. In particular, the course reviews the principles of design-by-contract and the role of inheritance to express the contracts, the usage of generics (aka templates in languages such as C++), the distinction between equality and identity, and the fundamental principles of memory management.

The second half of the course discusses the use of various design patterns. Particular attention is paid to model-view-controller pattern and the strict separation between the model, the views, and the controllers. In addition, significant attention is paid to the distinction between reuse by inheritance and reuse by composition, as illustrated by the Composite, State, Template Method, and Strategy patterns.

Learning outcomes

By attending this course, students satisfying the prerequisites are expected to

understand the fundamental principles of object-oriented design, be able to apply the object-oriented design principles such as separation of concerns,

responsibility analysis, and design by contract, and

be conversant with the most important design patterns.

Prerequisites

MSc students: This course is only suitable for those with a solid programming background who wish to learn more about Object Oriented Programming and modular program design. If you decide to take this option, please note that you should undertake preparatory reading before taking the course; see the reading list for details. People without a solid programming background should not take this course.

This is NOT a course about Java: students are expected to be already familiar with Java, the basic concepts of object orientation such as classes, interfaces, members, and methods, and the principles of imperative programming languages. Also, this is NOT a course about the usage of Java libraries: students are expected to be able to learn about various API calls available in Java's Software Developer Kit by themselves.

Synopsis1. Requirements: use cases, actors, preconditions, basic course of events, alternative paths,

postconditions. Example: a publishing support system for graphical page layout.2. Software Architecture: what is a software architecture? UML as a tool for architecture

description: class diagrams, sequence diagrams. Example: event-driven architecture.

3. OO Design Principles: encapsulation, separation of concerns, collaboration analysis, high cohesion, weak coupling, design by contract. Example: the design of the model and view components of the example system.

4. Inheritance in OO Design: encapsulation, polymorphism, overriding, implementation inheritance, contracts and inheritance, multiple inheritance, structure inheritance, inheritance vs. composition. Example: inheritance in the model of the example system.

19

Page 20: Oxford CS Degree

5. Generic Types and Collections: type parameters, implementing generics, templates vs. type erasure; Java collections, iterators; state machine as a specification mechanism. Example: using Java collections in the model of the example system.

6. Object Identity: identity vs. equality, aliasing, deep vs. shallow copy, aggregation vs. composition, value vs. reference objects. Example: analysis of object identity in the model of the example system.

7. Memory Management: static, stack-based, and heap-based memory allocation, garbage collection, reference counting, mark-and-sweep, weak references, finalizers vs. destructors, memory leaks. Example: implementing internable objects.

8. Model-View-Controller: relationship to the Observer pattern, Hollywood principle, event-driven programming. Example: applying the MVC pattern in the example system.

9. Model-View Separation Revisited: separation of concerns, domain vs. technology cohesion, Visitor pattern and double dispatch, parallel hierarchies, Factory method pattern, Singleton pattern. Example: refactoring the model and the view in the example system.

10. Testing OO Systems: types of testing (unit, integration, and application testing), test frameworks, mock objects, black-box vs. white-box testing, regression testing, test-driven programming. Example: testing the example system.

11. Template Method and Strategy Patterns: delegates, separation of concerns, weak coupling. Example: computing the layout of article text with variations (left- and right-justified, centred, and aligned).

12. Code Organization and Documentation: packages, package diagrams, layering, documentation, Javadoc. Example: identifying packages in the example system, adding documentation.

13. State Pattern: changing object type "at runtime", Null-Object pattern. Example: adding different tools: pick tool, create article element tool, and create line tool.

14. Adapter and Decorator Patterns: inheritance vs. composition, reusability. Examples: reusing Java's component for pictures, adding a shadow underneath the graphical shapes.

15. Composite Pattern: inheritance vs. composition. Examples: adding the "group" tool.

16. Object Creation Patterns: abstract factory, factory methods, covariance and contravariance. Example: changing selected shapes into other shapes.

Syllabus

Use case gathering. Software architecture. Using UML in object-oriented design. Object-oriented design principles. Design by contract. Event-driven programming. Common design patterns.

Reading list

Essential

20

Page 21: Oxford CS Degree

Peter Sestoft: Java Precisely, Second Edition. September 2005. MIT Press, ISBN: 0262693259

Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides: Design Patterns. March 1995. Addison-Wesley Longman, ISBN: 0201633612

Very Useful

Bertrand Meyer: Object-oriented Software Construction. May 1997. Prentice-Hall International, ISBN: 0136291554

Potentially Useful

Martin Fowler, Kendall Scott: UML Distilled: A Brief Guide to the Standard Object Modeling Language, Second Edition. August 1999. Addison-Wesley Professional, ISBN: 020165783X

Concurrency:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

OverviewComputer networks, multiprocessors and parallel algorithms, though radically different, all provide examples of processes acting in parallel to achieve some goal. All benefit from the efficiency of concurrency yet require careful design to ensure that they function correctly. The concurrency course introduces the fundamental concepts of concurrency using the notation of Communicating Sequential Processes. By introducing communication, parallelism, deadlock, live-lock, etc., it shows how CSP represents, and can be used to reason about, concurrent systems. Students are taught how to design interactive processes and how to modularise them using synchronisation. One important feature of the module is its use of both algebraic laws and semantic models to reason about reactive and concurrent designs. Another is its use of FDR to animate designs and verify that they meet their specifications

Learning outcomes

At the end of the course the student should: 

understand some of the issues and difficulties involved in Concurrency be able to specify and model concuurent systems using CSP

be able to reason about CSP models of systems using both algebraic laws and semantic models

be able to analyse CSP models of systems using the model checker FDR

21

Page 22: Oxford CS Degree

Synopsis Processes and observations of processes; point synchronisation, events, alphabets. Sequential

processes: prefixing, choice, nondeterminism. Operational semantics; traces; algebraic laws. [3] Recursion. Complete partial orders and fixed points as a means of explaining recursion;

approximation, limits, least fixed points; guardedness and unique fixed points. [1]

Concurrency. Hiding. Renaming. [3]

Non-deterministic behaviours, refusals, failures; the determinism ordering. [2]

Hiding and divergence, the failures-divergences model. [1]

Specification and correctness. [2]

Communication, pipes, buffers. Sequential composition. [2]

Case study. [2]

SyllabusDeterministic processes: traces, operational semantics; prefixing, choice, concurrency and communication. Nondeterminism: failures and divergences; nondeterministic choice, hiding and interleaving. Further operators: pipes and (time permitting) sequential composition. Refinement, specification and proof. Process algebra: equational and inequational reasoning.

Reading list

 Course Text:

A. W. Roscoe, Understanding Concurrent Systems, Chapters 1-8, Springer 2010

Alternatives:

A.W. Roscoe, The Theory and Practice of Concurrency, Chapters 1-7, Prentice-Hall International, 1997.

C. A. R. Hoare, Communicating Sequential Processes, Prentice-Hall International, 1985, http://www.usingcsp.com.

S. A. Schneider, Concurrent and Real-time Systems, Chapters 1-8, Wiley, 2000.

Computer Graphics:  2011-2012

Information

22

Page 23: Oxford CS Degree

Term Michaelmas Term 2011  (16 lectures)

OverviewThis course is an introductory course in Computer Graphics, and covers a wide range of the field of interactive computer graphics at all levels of abstraction, and with emphasis on both theory and practise. It follows a standard textbook in the field, with additional material used to keep the course up-to-date.

Learning outcomes

Knowledge and understanding

Understanding of the fundamentals of the modern computer graphics pipeline The mathematics of affine transformations in three dimensions

Manipulation of lighting effects

Application of mathematics to graphics systems

Practical skills

Ability to program low-level scan-conversion of simple shapes Working knowledge of a modern 3D graphics library via the practical assignments

Ability to produce usable graphics user-interfaces

Ability to write programs from a practical specification and produce realistic graphics output

GPU programming

Synopsis

The following are major topics that will be covered. (Numbers in brackets give an approximation to the number of lecture hours spent on the topic.)

Fundamentals of graphics hardware and software (3). Essential algorithms: line generation, solid area display, transformations, clipping, projection (5).

Abstraction, and simple examples of libraries of graphics functions (2).

Modelling of 3-dimensional solids, and display of parametric curves (2).

Rendering techniques and colour and lighting models (3).

Input devices, interactive techniques, and the human-machine interface (1).

23

Page 24: Oxford CS Degree

There is practical work to supplement the lecture material; the course does assume previous experience of practical programming in a high-level procedural language, and simple knowledge of matrices and vectors. The practicals themselves will be in Java, or using Java-like syntax (GPU).

Syllabus

The following are major topics that will be covered. (Numbers in brackets give an approximation to the number of lecture hours spent on the topic.)

Fundamentals of graphics hardware and software (3). Essential algorithms: line generation, solid area display, transformations, clipping, projection (5).

Abstraction, and simple examples of libraries of graphics functions (2).

Modelling of 3-dimensional solids, and display of parametric curves (2).

Rendering techniques and colour and lighting models (3).

Input devices, interactive techniques, and the human-machine interface (1).

There is practical work to supplement the lecture material; the course does assume previous experience of practical programming in a high-level procedural language, and simple knowledge of matrices and vectors. The practicals themselves will be in Java, or using Java-like syntax (GPU).

Reading list

The new main course text is

Interactive Computer Graphics: A Top-Down Approach with Shader-Based OpenGL by Shreiner and Angel, Pearson Education ISBN 9780273752264, 61 GBP (41 GBP Amazon)

Supplemental Reading

There are many text books on computer graphics.  Two you are likely to find in College libraries are

"Introduction to Computer Graphics" by J D Foley, A Van Dam, S K Feiner, J F Hughes and R L Phillips, Addison-Wesley, ISBN 0201609215

"Computer Graphics: Principles and Practice" by Foley, Van Dam, Feiner, & Hughes, Addison-Wesley ISBN 0201848406

Another recent book is

"Computer Graphics with OpenGL" by Hearn, Baker and Carithers, ISBN 978-0132484572

Databases:  2011-2012

24

Page 25: Oxford CS Degree

Information

Term Michaelmas Term 2011  (16 lectures)

Overview

MSc students will be assessed by invigilated exam lasting approximately 2 hours in week 0 of HT.

Databases lie at the heart of modern commercial application development. Their use extends beyond this to many applications and environments where large amounts of data are be stored for efficient update and retrieval. Their principles and fundamental techniques are being extended today to the Web and to novel kinds of data, like XML.

The purpose of this course is to provide an introduction to the principles of database systems. We begin by studying database design, covering the entity relationship model. We then cover the relational data model, relational algebra and SQL. We begin by showing how database requirements are captured using entity-relationship models, and go on to the definition of databases and their queries in the relational model. Relational algebra and calculus are studied in some depth, as are the normal forms for expressing relationships subject to dependencies. The SQL query language is studied in the practical component of the course. The primary data structures and strategies for efficient querying of a database are studied and the course concludes with an application to a database containing spatial data. Throughout, the emphasis is on principles rather then implementation.

Learning outcomes

At the end of the course the student will be able to:

Understand the relational model, and know how to translate requirements captured in an Entity-Relationship diagram into a relational schema

Be able to reason about dependencies in a relational schema

Understand normal form schemas, and the decomposition process by which normal forms are obtained

Use relational query languages such as SQL

Understand equivalences within relational algebra and their use in query optimization

Understand indexing and its role in query plans

Be able to create database-driven web interfaces

25

Page 26: Oxford CS Degree

Synopsis1. Introduction, E/R diagrams (Ch. 2) 2. Relational model, E/R to relational (Ch. 3)

3. Relational algebra and Calculus (Ch. 4)

4. Overview of SQL (Ch. 5)

5. Schemas, dependencies and normal forms (Ch. 19)

6. Transaction Management (Ch. 16-17)

7. Storage and indexing (Ch. 8)

8. Tree Indexes (Ch. 10)

9. Query evaluation (Ch. 12)

10. Query optimisation (Chs. 14,15)

Syllabus

Introduction to database management systems; entity relationship modelling; the relational model; relational algebra.

Schema refinement, functional dependencies and normal forms, transaction management. Storage and indexing: B + trees.

Query optimisation.  Practical:Web databases via SQL and PHP.

Reading listThe course text is:

Database management systems, by Raghu Ramakrishnan and Johannes Gehrke. 3rd edition, McGraw-Hil.

We may also make reference to: An Introduction to Database Systems, 8th Edition, by C.J. Date. Addison-Wesley, 2000.

Formal Program Design:  2011-2012

Information

Term Michaelmas Term 2011  (24 lectures)

26

Page 27: Oxford CS Degree

OverviewThe aim is to show how procedural programs can be developed rigorously from their mathematical specifications.

In the first part, the emphasis is primarily on how to derive loops and recursive procedures from invariants; this activity is called algorithm refinement. The second part of the course deals with specification and data refinement; it shows how modules and systems can be specified abstractly, how algorithms can be developed using abstract datatypes, and how such abstract datatypes can be implemented using concrete datatypes, and that implementation formally justified.

Learning outcomesAt the end of the course students are expected to:

Be able to specify modules, and in particular programs, abstractly Understand the criteria for algorithm refinement

Be able to specify modules and systems, abstractly

Perform rigorous and formal derivations of efficient programs from their abstract specifications

Understand the criteria for algorithm refinement and data refinement

Synopsis Use of assertions to reason about program behaviour. Predicate notation as a language of

assertions. Postconditions and preconditions, wp, specification statements. [1] The language of guarded commands; assignment, sequencing, repetition and alternation.

Constants, blocks and arrays.Proof rules for program constructs. [2]

Basic techniques for finding invariants: replacing a constant by a variable. Up loops and down loops. Simple examples, such as div/mod. [2]

Arrays. Rules for reasoning about distributed operations:empty range and one-point rules; range split. Linear and binary search. [2]

Further examples of small programming problems. Segment problems (perhaps not maximum segment sum). [2]

Tail invariants and their uses. Fast exponentiation and modulus computation.[2]

Longest up-sequence.[1]

Quicksort or heapsort as examples of efficient sortingalgorithms derived rigorously.[1]

Specification of systems: modules, abstract datatypes, specification statements.[1]

Data refinement: datatype invariants and coupling invariants;simple examples.[2]

Procedures and parameters; call by value and result; recursion and recursion elimination. [2]

Datatypes using pointers: linked lists and binary trees; pointer algorithms.[3]27

Page 28: Oxford CS Degree

More examples of data refinement: hash tables, binary search trees. [3]

Syllabus

The language of guarded commands for expressing programs. Assertions, invariants, and variant functions. Strategies for finding invariants; head and tail invariants. General programming techniques for developing efficient programs. Examples from sorting and searching problems. Procedures and parameter passing. Recursion in procedural programs. Modules and encapsulation. Data refinement. Example refinements, including use of hashing and tree structures. Pointer algorithms and their development. Specification using modules, abstract data types and their operations.

Reading list Anne Kaldewaij, Programming: the derivation of algorithms, Prentice-Hall International, 1990. C C Morgan, Programming from specifications, Prentice-Hall International. (Out of print, but

available on web at http://www.comlab.ox.ac.uk/oucl/publications/books/PfS/).

T H Cormen, C E Leiserson, C Stein and R L Rivest, Introduction to algorithms; various editions.

Advanced Data Structures and Algorithms:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

OverviewThis course builds on the first-year Design and Analysis of Algorithms course. It introduces students to a number of highly efficient algorithms and data structures for fundamental computational problems such as primality testing and string matching, across a variety of areas. Students are also introduced to techniques such as amortised complexity analysis. As in the first-year course, the style of the presentation is rigorous but not formal.

Learning outcomes

On successful completion of the course students will:

Be able to carry out amortised analysis of data structures, including disjoint sets Understand the implementation, complexity analysis and applications of algorithms for string

matching, primality testing, and the discrete Fourier transform

Have an idea of applications of algorithms in a variety of areas.

28

Page 29: Oxford CS Degree

Synopsis Amortised analysis Mergeable heaps

Disjoint sets / Union-find

Primality testing: Miller-Rabin algorithm

String matching: Rabin-Karp and Knuth-Morris-Pratt algorithms

Fast Fourier transform

Simon's algorithm and quantum Fourier transform

Hidden subgroup algorithms

Syllabus Amortised analysis Mergeable heaps

Disjoint sets / Union-find

Primality testing: Miller-Rabin algorithm

String matching: Rabin-Karp and Knuth-Morris-Pratt algorithms

Fast Fourier transform

Simon's algorithm and quantum Fourier transform

Hidden subgroup algorithms

Reading list

The main text used in the course is:

Thomas Cormen, Charles Leiserson, Ronald Rivest and Clifford Stein, Introduction to Algorithms, MIT Press, 2001 (second edition).

For the lectures later in the course the following text may be useful.

S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani. Algorithms, Mcgraw-Hill, 2006.

Compilers:  2011-2012

Information

29

Page 30: Oxford CS Degree

Term Hilary Term 2012  (16 lectures)

Overview

MSc students will be assessed by invigilated exam lasting approximately 2 hours in week 0 of TT.

This course aims to give a simple but practical account of the programming techniques used in implementing high-level programming languages by compiling into code for stack and register-based machines. The course is based on a working implementation, written in Objective Caml, of a compiler for a language comparable to C or Pascal.

Learning outcomes

On completion, the students should be able to:

* Understand and explain the main techniques and algorithms used in compilers.

* Describe the runtime structures used to represent constructs in typical programming languages.

* Use compiler construction tools, such as parser generators, to build a simple compiler.

PrerequisitesFor MSc Students: A basic knowledge of functional programming is recommended. Those with substantial programming experience should find it possible to study this course concurrently with Functional Programming.

Synopsis* Introduction. * A smattering of ML; abstract syntax as an algebraic type. * Regular expressions and context free grammars as ways of specifying concrete syntax. Lex and Yacc considered as black boxes. * Expressions and statements: evaluation by recursion on syntax. * Postfix code for expressions and statements. * A glimpse at RISC architecture. * Translation of arithmetic expressions into RISC code. * Simple optimisations: constant folding, re-ordering, common sub-expressions. * Procedures and parameters: call by value, and call by reference, static vs. dynamic binding. * Stack-based allocation of activations; static and dynamic chains.

SyllabusProgramming language representation: concrete and abstract syntax, context free grammars. Use of lexer and parser generators. Implementation of expressions and statements in a simple language by postfix code and by simple machine code; simple optimizations. Procedures: value, name and reference parameters, local and non-local variables, static and dynamic binding. Abstract machines and storage management: activation records, static and dynamic chains, stacks and heaps.

30

Page 31: Oxford CS Degree

Reading listMain Text

* Draft of book on Compilers by J.M. Spivey will be available at the start of the course.

Further Reading

* A W Appel, Modern Compiler Implementation in ML, Cambridge University Press. * A V Aho, R Sethi and J D Ullman, Compilers: principles, techniques and tools, 3rd edition, Addison-Wesley. * H Abelson and G J Sussman, Structure and Interpretation of Computer Programs, MIT Press, 2nd Edition, 1996. * R Bornat, Understanding and writing compilers, available on the web.

Concurrent Programming:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

OverviewMany challenges arise during the design and implementation of concurrent and distributed programs. The aim of this course is to understand those challenges, and to see techniques for tackling them. The main paradigm to be considered is message passing concurrency, where independent processes, with private variables, interact by passing messages.

Learning outcomesAt the end of the course students are expected to understand:

The conceptual foundations of concurrent programming, and A variety of effective ways of structuring concurrent and distributed programs.

Prerequisites

This course combines well with the Concurrency course: Concurrent Programming helps provide motivation for Concurrency, while Concurrency helps to provide formal underpinnings for this course.  This course will assume some familiarity with CSP; students who are not taking the Concurrency course (or have not taken such a course previously) should read at least the first two chapters of that course's textbook.

Students should also have a basic understanding of Object Oriented Programming (objects, classes, interfaces, inheritance, abstract classes, polymorphism), e.g. as taught in the Michaelmas Term OOP course or the first year Imperative Programming 2 course.

31

Page 32: Oxford CS Degree

The course will have a number of practicals, to allow students to gain experience with concurrent programming. These practicals will use Scala; background reading on the language will be suggested.

Synopsis Introduction: reasons for concurrency; processes, threads; concurrent architectures; concurrent

computing paradigms; safety and liveness; challenges of concurrent computing. Message passing concurrency; deadlock; piplines; fine-grained concurrency.

Example: numerical integration using workers and a controller; bag of tasks.

Alternation: syntax, semantics, examples.

Client-server architectures.

Interacting peers: patterns of interaction: centralised, fully-connected, ring and tree topologies.

Synchronous data parallel computation.

Monitors: syntax and semantics; examples.

Patterns of concurrent computation: recursive parallel, bag of tasks with replacement, competition parallel, task parallel, map/reduce, revision of other patterns.

Semaphores: syntax and semantic; examples; passing the baton.

SyllabusReasons for concurrency; processes, threads; safety and liveness. Message passing concurrency; deadlock. Clients and servers. Interacting peers. Synchronous parallel computation. Patterns of concurrent programming: data parallel; bag of tasks; recursive parallel; task parallel. Low-level concurrency controls: monitors; semaphores.

Reading list Course textbook: Foundations of Multithreaded, Parallel, and Distributed Programming, Gregory

R. Andrews, Addison-Wesley, 2000. Essential background reading:

o A Brief Scala tutorial, http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaTutorial.pdf;

o Scala by Example, http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaByExample.pdf

Alternative: Principle of Concurrent and Distributed Programming, M. Ben-Ari, Prentice Hall, 1990.

Alternative background on Scala: Programming in Scala, Martin Odersky, Lex Spoon, Bill Venners, artima, 2008.

32

Page 33: Oxford CS Degree

Computer Architecture:  2011-2012

Information

Term Trinity Term 2012  (16 lectures)

Overview

This course aims to give an understanding of the mechanisms for implementing the programmer's idealised computer. It builds on the introduction to hardware and to simple processors in the Digital Systems course. The Computer Architecture course aims to describe a broad range of architectural designs and to contrast them, highlighting the design decisions they incorporate. The designs are described and analysed at the register-transfer level of abstraction.

Practicals

Processor simulation exercises.

Learning outcomesBy the end of the course, the student should understand the major architectural styles and appreciate the compromises that they encapsulate. They should be able to read outline descriptions of real processors and understand in which way their designs fit into the frameworks described in the course. They should also be able to understand the impact of design choices in programming in the context of a specific architecture.

Synopsis1. Datapaths and control structures for processors, register transfer level description of hardware2. Design and Simulation in Verilog and C++/SystemC

3. Instruction set design, instruction formats, addressing modes, ISAs

4. A simple RISC design

5. A simple x86 (CISC) design, microcode

6. Processor pipelining, pipeline hazards

7. Hazard detection, forwarding

8. Branch prediction and other kinds of speculation

9. Out-of-order execution and register renaming

10. Reorder buffers

33

Page 34: Oxford CS Degree

11. Virtual Memory, virtualization

12. Main and cache memories

13. Multi-cores and cache coherency

14. Direct memory access and peripherals, systems on chip (SoC)

15. Architectures without shared memory

16. Revision

SyllabusRegister Transfer model of processors. Datapaths and control structures. Comparison of architectural styles for general purpose computers, including RISC/CISC. Pipelining; pipeline hazards and their resolution by stalling and forwarding. Techniques for executing more than one instruction in each clock cycle. The hierarchy of storage in a computer; caches and virtual memory. Styles of parallel computers, and their implementation in contemporary designs.

Reading list

Principal texts; either one of:

D A Patterson & J L Hennessy, Computer Organization and Design: the hardware/software interface, Morgan-Kaufmann (Fourth edition) 2009.

D A Patterson & J L Hennessy, Computer Organization and Design: the hardware/software interface, Morgan-Kaufmann (Third edition, revised printing) 2007.

The fourth edition covers more recent designs and is preferred; only the third edition covers multi-cycle designs. Either one should be adequate, if available. Similarly, the second edition is relevant if available, but may be confusing.

Background reading:

Some articles (to be identified near the time of the course) about contemporary designs. K. Stevens et al., An Asynchronous Instruction Length Decoder

R.M. Tomasulo, An Efficient Algorithm for Exploiting Multiple Arithmetic Units

Computer Networks:  2011-2012

Information

34

Page 35: Oxford CS Degree

Term Trinity Term 2012  (16 lectures)

OverviewThis course examines the science underpinning computer communications, such as the basic architectural principles of computer networking and specifically how the Internet works today. Covered topics include data representation, how errors in transmission can be detected and dealt with, the way information is routed over a large network, how congestion can be avoided, aspects of network security, and socket programming.

Learning outcomes

At the end of the course the students should:

Understand the architectural principles of computer networking and compare different approaches to organising networks.

Understand good network design: simplicity, scalability, performance, and the end-to-end principle.

Understand how the Internet works today.

Judge the effectiveness of existing or similar network protocols.

Be conversant with primitives of network application programming.

Synopsis

Network architecture: Packetization, Protocol layers and services (OSI vs. TCP/IP), End-to-end principle, Internet structure

Link and access technologies: Multiple access protocols, Sliding window protocols,  Wireless LANs (access, security), LANs (Ethernet), Error detection and correction

Network layer: IP Addressing, Routing algorithms, Packet handling, IPv6, tunnelling, mobile IP

Network services: DNS, Address assignment (DHCP and PPP), Address resolution (ARP)

Traffic: Queuing models, packet dropping models, workloads

Switch architecture: routers and switches

Transport layer: Ports, TCP (handshake, windowing, congestion control), UDP, SCTP

Socket programming: Socket model, options, performance

35

Page 36: Oxford CS Degree

Security: Authentication, Encryption, Denial-of-Service, Firewalls, VPN (Virtual Private Networks), Securing email, Securing TCP (SSL). 

Syllabus

The need for computer networks; layered models; Ethernet; IP; network routing and congestion control; network security.

Reading list Peterson and Bruce S. Davie "Computer Networks: A systems approach (4th ed)", Morgan

Kaufmann, 2007 S. Tanenbaum, Computer Networks (3rd ed), Prentice-Hall International, 1996.

Part B, Honour School of Computer Science

Computer Science students in their third year take a total of six optional courses from schedules B1, B2 and B4 with the following conditions:

- no more than two subjects from Schedule B1, and - no more than two subjects from Schedule B4

You cannot take a course you offered in your second year.

Also you must take a project worth one third of the year.

Up-to date guidance on practicals can be found here. Please note that although practicals play no part in the degree classification, a candidate must pass the practical component of the course in order to pass the exam, i.e. students must achieve 30% or more overall in their practicals each year to pass. 

Schedule B1

Computer Graphics 16 Lectures, Michaelmas Term 2011 Databases 16 Lectures, Michaelmas Term 2011

Formal Program Design 24 Lectures, Michaelmas Term 2011

Advanced Data Structures and Algorithms 16 Lectures, Hilary Term 2012

Compilers 16 Lectures, Hilary Term 2012

Concurrent Programming 16 Lectures, Hilary Term 2012

Computer Architecture 16 Lectures, Trinity Term 2012

Computer Networks 16 Lectures, Trinity Term 2012

Schedule B2

Computer Security 16 Lectures, Michaelmas Term 2011 Computer-Aided Formal Verification 16 Lectures, Michaelmas Term 2011

36

Page 37: Oxford CS Degree

Intelligent Systems 16 Lectures, Michaelmas Term 2011

Lambda Calculus and Types 16 Lectures, Michaelmas Term 2011

Principles of Programming Languages 16 Lectures, Michaelmas Term 2011

Computational Complexity 16 Lectures, Hilary Term 2012

Geometric Modelling 16 Lectures, Hilary Term 2012

Knowledge Representation & Reasoning 16 Lectures, Hilary Term 2012

Machine Learning 16 Lectures, Hilary Term 2012

Reasoning about Information Update 16 Lectures, Hilary Term 2012

Schedule B2 courses run by the Maths Institute

Integer Programming 16 Lectures, Michaelmas Term 2011 Numerical Solution of Differential Equations I 16 Lectures, Michaelmas Term 2011

Numerical Solution of Differential Equations II 16 Lectures, Hilary Term 2012

Schedule B4 courses run by the Maths Institute

B11a Communication Theory B1b Set Theory

Computer Security:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures)

OverviewComputer security pervades every aspect of the modern online experience, now reaching into mobile phones and games consoles as well as conventional computers. This course covers some of the fundamental principles of computer security.

After identifying some different aspects of security, a number of practical challenges will be presented. For each one, the aim is to specify the requirements of a solution, explain an appropriate (mathematics-based) tool, and then discuss pitfalls, attacks, and countermeasures. Topics covered include will one-way

37

Page 38: Oxford CS Degree

functions, symmetric and asymmetric block ciphers, stream ciphers, keyed hashes, and simple key exchange protocols

Learning outcomes

An understanding of the differences between various forms of computer security, where they arise, and appropriate tools to achieve them; an appreciation of some common security pitfalls; knowledge of appropriate ways to quantify security.

This is a course for computer scientists, not system administrators. Don't expect to learn how to build "secure" websites, nor how to install firewalls.

Prerequisites Basic modular arithmetic (as amply covered by the Discrete Mathematics course). Elementary discrete probability (as amply covered by the first-year Probability course).

Java for the practicals. No advanced structures or techniques will be required.

Synopsis

Introduction [1 lecture]. Motivating example, definitions of security aspects.

Access control [1 lecture]. Models of security and the example of Unix permissions.

Symmetric key ciphers [3 lectures]. Block ciphers, Kerckhoffs' Principle, attack models, examples of attacks (including meet-in-the-middle). Perfect security, Shannon's conditions, Vernam cipher and the one-time pad. Feistel networks, DES, state-of-art encryption. Block modes, stream ciphers.

Cryptographic hash functions [2-3 lectures]. One-way and cryptographic hash functions, relationships with other security properties; attacks on iterative algorithms. Hashes for password storage and key generation: offline attacks, strengthening by salting and stretching, examples in practice. Hashes for message integrity, collision resistance. The Merkle-Damgard construction, padding, MD4 and its successors.

Asymmetric key ciphers [2-3 lectures]. The RSA cryptosystem: proof of correctness, discussion of efficiency. The RSA security assumption, relationship with integer factorization and discrete log. Discussion of appropriate key size. Homomorphic property, number theoretic attacks, PKCS v1.5 padding. Brief survey of alternative public key ciphers.

Message authentication & digital signatures [2-3 lectures]. The Dolev-Yao model. Message authentication codes, HMAC. Digital signatures, attack models. RSA signatures, textbook weaknesses, and PKCS v1.5 padding. Combining signatures and encryption. Brief survey of alternative signature schemes.

Protocols [3 lectures]. Entity-entity authentication protocols given shared secret or public keys, weaknesses and attacks. Key distribution and certification, chains of trust, PKI. Mediated authentication protocols, weaknesses and attacks. The SSL/TLS application layer protocol.

38

Page 39: Oxford CS Degree

There will be two practicals, with preparatory reading in weeks 2-3 and labs in weeks 4-8.

Syllabus

Aspects of security, security models. Tools for achieving particular security goals, attacks, and countermeasures: one-way functions, symmetric and asymmetric block ciphers including key generation and block modes, stream ciphers, keyed hashes, simple key exchange protocols. Applications in practice.

Reading list

Primary Text

Charlie Kaufman, Radia Perlman, & Mike Speciner. Network Security: Private Communication in a Public World, second edition. Prentice-Hall, 2002. Covers nearly everything in the course in a very readable style. Good detail, but sometimes lacks formality.

Andrew Ker. Computer Security Lecture Notes. 2011. Available as handouts in lectures.

Further Reading

Dieter Gollmann. Computer Security, third edition (any edition is fine). Wiley, 2010. Has more material on computer security concepts, and models of security, than any of the other books, and less on ciphers and hashes. A good complement.

Niels Ferguson, Bruce Schneier, & Tadayoshi Kohno. Cryptography Engineering - Design Principles and Practical Applications. Wiley, 2010. Alternates between chatty prose and detailed implementations of security primitives, but good on the common pitfalls. Cheap.

Alfred Menezes, Paul van Oorschot, & Scott Vanstone. Handbook of Applied Cryptography. CRC Press, 1996. Comprehensive, contains the state of the art as of 1996 and thus sometimes out of date. Freely downloadable.

Computer-Aided Formal Verification:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures)

OverviewThis course introduces the fundamentals of computer-aided formal verification. Computer-aided formal verification aims to improve the quality of digital systems by using logical reasoning, supported by software tools, to analyse their designs. The idea is to build a mathematical model of a system and then

39

Page 40: Oxford CS Degree

try to prove properties of it that validate the system's correctness – or at least help discover subtle bugs. The proofs can be millions of lines long, so specially-designed computer algorithms are used to search for and check them.

This course provides a survey of several major software-assisted verification methods, covering both theory and practical applications. The aim is to familiarise students with the mathematical principles behind current verification technologies and give them an appreciation of how these technologies are used in industrial system design today.

Synopsis1. Introduction.2. Modelling sequential systems, Kripke structures.

3. Temporal logic: LTL, CTL*, and CTL.

4. Specifying systems with temporal logic.

5. Reachability calculations, model checking.

6. Binary Decision Diagrams (BDDs).

7. Algorithms over BDDs.

8. Combinational equivalence checking.

9. Symbolic model checking.

10. Propositional SAT.

11. Model Checking with SAT.

12. Abstraction Refinement.

13. Decision procedures.

14. Decision procedures in Model Checking.

15. Practical, industrial-scale hardware verification.

16. Computer-aided software verification.

SyllabusIntroduction to formal hardware verification. Binary Decision Diagrams and their use in combinational equivalence checking. Modelling sequential systems; Kripke structures. Specifying systems with temporal logic; CTL*, CTL and LTL. Reachability and symbolic model checking. New model checking approaches based on algorithms for Boolean satisfiability. Automatic abstraction refinement. Decision procedures and their use in combination with model checking. Practical, industrial-scale hardware verification. Current approaches to computer-aided software verification.

40

Page 41: Oxford CS Degree

Reading list

The lectures will be supplemented with notes and pointers to published articles in the field. The following may be helpful for reference or further reading on specific topics.

Surveys

Formal Verification in Hardware Design: A Survey, by C. Kern and M. R. Greenstreet, ACM Transactions on Design Automation of Systems , vol. 4 (April 1999), pp. 123-193.

A Survey of Automated Techniques for Formal Software Verification , by D'Silva et al., IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems (TCAD), 2008

Temporal Logic and Model Checking From Philosophical to Industrial Logics , by M. Vardi, ICLA 2009

Binary Decision Diagrams and SAT

An Introduction to Binary Decision Diagrams , by Henrik Reif Andersen, Lecture Notes (Technical University of Denmark, October 1997).

Formal Hardware Verification with BDDs: An Introduction , by Alan J. Hu, IEEE Pacific Rim Conference on Communications, Computers, and Signal Processing (1997), pp. 677-682.

Chapter 2 in Decision Procedures, by Daniel Kroening and Ofer Strichman, Springer, 2008

Handbook of Satisfiability, Biere, Heule, Van Maaren, Walsh, IOS Press 2009

BDDs and Model Checking

Logic in Computer Science: Modelling and reasoning about systems, by Michael Huth and Mark Ryan (Cambridge University Press, 2000).

Model Checking, by Edmund M. Clarke, Jr., Orna Grumberg, and Doron A. Peled, Second printing (The MIT Press, 2000).

Concepts, Algorithms, and Tools for Model Checking , Unpublished lecture notes by J.-P. Katoen, 1998.

Intelligent Systems:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures) 41

Page 42: Oxford CS Degree

OverviewThis is an introductory course into the field of artificial intelligence (AI), with particular focus on search as the fundamental technique for solving AI problems.

The problem of navigating a road map with a known layout is a typical example of a problem studied in this course. Problems such as this one can be solved by enumerating all possible sequences of moves until a solution is found. Such a naïve idea, however, is rarely applicable in practice because the size of the search space is typically vast. This course will introduce basic AI search techniques, such as depth‐first, breadth‐first, and iterative deepening search, and it will discuss heuristic techniques such as A* search that improve efficiency by pruning the search space.

This course also deals with optimisation problems. For example, the optimisation version of the n‐queens problem is to arrange n queens on an n x n chessboard while minimising the number of pairs of queens that are under attack. Such problems can be effectively solved by search techniques introduced in the course such as hill climbing, simulated annealing, and genetic algorithms. Planning is a special kind of optimisation problem. A typical planning problem is finding a sequence of actions for delivering ten packages to ten different destinations. This course will introduce a standardised language called STRIPS for modelling planning problems, and it will discuss how to solve planning problems using search techniques such as forward chaining, backward chaining, and partial order planning. This course will also show how to apply these techniques to the problem of planning a robot’s path through an environment while taking into account the geometry of the environment and the robot.

Constraint satisfaction problems (CSPs) constitute another important class of AI problems, a typical example of which is the map colouring problem: colour each country on a map with red, green, or blue, but in a way so that no two adjacent countries have the same colour. This course will introduce search techniques such as backtracking and constraint propagation that can efficiently solve many CSP problems in practice.

Developing programs for playing board games such as chess has played a central role in AI since the very inception of the field. Game playing can be conceived as yet another kind of search problem, in which the objective is to find a winning strategy. This course will introduce the basic game‐playing techniques such as minimax search and alpha‐beta pruning.

Dealing with unknown or incompletely specified environments is a form of intelligent behaviour that is critical in many intelligent systems. For example, consider a robot in maze that has no prior knowledge about the maze layout. To solve the problem, the robot needs to represent and update its knowledge about the maze as it moves through the maze. This course will show how to solve such problems via search in the belief space – the space of all possible beliefs the robot may have about the maze layout.

Learning outcomesBy attending the course the students should acquire a firm grasp of various search techniques and should be able to select an appropriate search technique and apply it in practice. Since search is such a fundamental technique in computer science, the material taught in the course is relevant in contexts other than artificial intelligence.

42

Page 43: Oxford CS Degree

Prerequisites

This course assumes that the students are familiar with the basics of propositional logic. Undergraduate students are expected to acquire the relevant expertise in the Logic and Proof course. MSc students are expected to have completed an equivalent course during their undergraduate education.

Students are expected to use Java in practicals. This course does not cover any aspects of Java programming: the students are expected to have learned Java elsewhere. No knowledge of Java or any other programming language is required in order to pass the exam: all programming (in Java or any other language) is limited to practicals.

Synopsis1 Introduction to Artificial Intelligence: definition of AI; Turing test; brief history of AI.

2 - 3Problem solving and search: problem formulation; search space; states vs. nodes; tree search: breadth-first, uniform cost, depth-first, depth-limited, iterative deepening; graph search.

4Informed search: greedy search; A* search; heuristic function; admissibility and consistency; deriving heuristics via problem relaxation.

5Local search: hill-climbing; simulated annealing; genetic algorithms; local search in continuous spaces.

6 - 7Planning: the STRIPS language; forward planning; backward planning; planning heuristics; partial-order planning; planning using propositional logic; planning vs. scheduling.

8 - 9Dealing with geometry of physical agents: basic issues in robotics; degrees of freedom; Dijkstra’s shortest path algorithm; configuration spaces; Voronoi diagrams; skeletonization; potential field planning.

10

Constraint satisfaction problems (CSPs): basic definitions; finite vs. infinite vs. continuous domains; constraint graphs; relationship with propositional satisfiability, conjunctive queries, linear integer programming, and Diophantine equations; NP-completeness of CSP; extension to quantified constraint satisfaction (QCSP).

11 - 12

Solving CSPs: constraint satisfaction as a search problem; backtracking search; variable and value ordering heuristic; degree heuristic; least-constraining value heuristic; forward checking; constraint propagation; dependency-directed backtracking; independent subproblems; tree-like CSPs; acyclic CSPs; CSPs of bounded treewidth.

13 - 14

Playing games: game tree; utility function; optimal strategies; minimax algorithm; alpha-beta pruning; games with an element of chance.

43

Page 44: Oxford CS Degree

15 - 16

Beyond classical search: searching with nondeterministic actions; searching with partial observations; online search agents; dealing with unknown environments.

Syllabus

Problem solving via search. Uninformed, informed, and local search. Planning. Dealing with geometry of physical agents. Constraint satisfaction. Adversarial search. Searching with nondeterministic actions and partial observations.

Reading listS.J. Russell and P. Norvig. Artificial Intelligence: A Modern Approach (3rd edition), Prentice-Hall, 2010.

Lambda Calculus and Types:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures)

OverviewAs a language for describing functions, any literate computer scientist would expect to understand the vocabulary of the lambda calculus. It is folklore that various forms of the lambda calculus are the prototypical functional programming languages, but the pure theory of the lambda calculus is also extremely attractive in its own right. This course introduces the terminology and philosophy of the lambda calculus, and then covers a range of self-contained topics studying the language and some related structures. Topics covered include the equational theory, term rewriting and reduction strategies, combinatory logic, Turing completeness and type systems. As such, the course will also function as a brief introduction to many facets of theoretical computer science, illustrating each (and showing the connections with practical computer science) by its relation to the lambda calculus.

There are no prerequisites, but the course will assume familiarity with construting mathematical proofs. Some basic knowledge of computability would be useful for one of the topics (the Models of Computation course is much more than enough), but is certainly not necessary.

Learning outcomes

The course is an introductory overview of the foundations of computer science with particular reference to the lambda-calculus. Students will

understand the syntax and equational theory of the untyped lambda-calculus, and gain familiarity with manipulation of terms;

44

Page 45: Oxford CS Degree

be exposed to a variety of inductive proofs over recursive structures;

learn techniques for analysing term rewriting systems, with particular reference to beta-reduction;

see the connections between lambda-calculus and computabilty, and an example of how an undecidability proof can be constructed;

see the connections and distinctions between lambda-calculus and combinatory logic;

learn about simple type systems for the lambda-calculus, and how to prove a strong normalization result;

understand how to deduce types for terms, and prove correctness of a principal type algorithm.

Synopsis

Chapter 0 (1 lecture)Introductory lecture. Preparation for use of inductive definitions and proofs.

Chapters 1-3 (5 lectures)Terms, free and bound variables, alpha-conversion, substitution, variable convention, contexts, the formal theory lambda beta, the eta rule, fixed point combinators, lambda-theories. Reduction. Compatible closure, reflexive transitive closure, diamond and Church-Rosser properties for general notions of reduction. beta-reduction, proof of the Church-Rosser property (via parallel reduction), connection between beta-reduction and lambda beta, consistency of lambda beta. Inconsistency of equating all terms without beta-normal form. Reduction strategies, head and leftmost reduction. Standard reductions. Proof that leftmost reduction is normalising. Statement, without proof, of Genericity Lemma, and simple applications.

Chapter 4 (2 lectures)Church numerals, definability of total recursive functions. Second Recursion Theorem, Scott-Curry Theorem, undecideability of equality in lambda beta. Briefly, extension to partial functions.

Chapter 5 (2 lectures)Untyped combinatory algebras. Abstraction algorithm, combinatory completeness, translations to and from untyped lambda-calculus, mismatches between combinary logic and lambda-calculus, basis. Term algebras.

Chapters 6-8 (6 lectures)Simple type assignment a la Curry using Hindley's TA lambda system. Contexts and deductions. Subject Construction Lemma, Subject Reduction Theorem and failure of Subject Expansion. Briefly, a system with type invariance under equality. Tait's proof of strong normalisation. Consequences: no fixed point combinators, poor definability power. Pointer to literature on PCF as the obvious extension of simple types to cover all computable functions. Type substitutions and unification, Robinson's algorithm, the matching problem. Principal Type algorithm and correctness.

45

Page 46: Oxford CS Degree

SyllabusTerms, formal theories lambda beta and lambda beta eta, fixed point combinators; reduction, Church-Rosser property of beta-reduction and consistency of lambda beta; reduction strategies, standard reduction sequences, proof that leftmost reduction is normalising; Church numerals, definability of total recursive functions in the lambda-calculus, Second Recusion Theorem and undecidability results; combinatory algebras, combinatory completeness, basis; simple types a la Curry, type deductions, Subject Reduction Theorem, strong normalisation and consequences; type substitutions, unification, matching, correctness of Principal Type Algorithm

Reading list

Essential

Andrew Ker, lecture notes. Available online and handed out in the lectures. Comprehensive notes on the entire course, including practice questions and class exercises.

Useful Background H. P. Barendregt, The Lambda Calculus. North-Holland, revised edition, 1984. J. R. Hindley, Basic Simple Type Theory, CUP Cambridge Tracts in Theoretical Computer Science

42, 1997.

J.-Y. Girard, Y. Lafont, & P. Taylor, Proofs and Types, CUP Cambridge Tracts in Theoretical Computer Science 7, 1989.

C. Hankin, Lambda Calculi, A Guide for Computer Scientists, OUP Graduate Texts in Computer Science, 1994.

J. R. Hindley & J. P. Seldin, Introduction to Combinators and Lambda-Calculus, Cambridge University Press, 1986.

Principles of Programming Languages:  2011-2012

Information

Term Michaelmas Term 2011  (16 lectures)

OverviewThis course use interpreters written in Haskell as a vehicle for exploring various kinds of programming languages.

46

Page 47: Oxford CS Degree

PRACTICALS

1. Translation between recursive and iterative algorithms in a simple functional language.2. Semantics of a language with call-by-name and assignable variables.

Learning outcomes

 After taking this course, students will be able to:

define the semantics of a programming language using a definitional interpreter. investigate semantic issues in programming languages by studying implementations in an

interpreter

solve problems using a range of programming paradigms and assess the effectiveness of each paradigm for a particular problem.

Prerequisites

Functional programming.

Synopsis1. Introducing Fun, with familiar examples rewritten in the language.2. The concrete and abstract syntax of Fun.

3. A metacircular interpreter for Fun. Examples of evaluation.

4. Changing the interpreter to support assignable variables, with references as expressible values (like ML).

5. Implementing while by recursion.

6. Changing the interpreter to support output; extracting common features of memory and output.

7. Interpreters in monadic form.

8. Review: a language with exceptions.

9. A purely functional language with call by name and lazy data structures.

10. The language Fungol, where identifiers are bound to assignable variables, and derefencing is implicit.

11. Call by value and call by reference.

12. Nondeterministic programs for bactracking search.

13. Logical variables and logic programming.

14. Introducing continuations

47

Page 48: Oxford CS Degree

15. Continuations and abstract machines

16. First-class continuations

Syllabus

Abstract and concrete syntax. Definitional interpreters in direct and monadic form. Functional, imperative, and logic programming. Expressible and denotable values; call by value and call by name. Continuations and abstract machines.

Reading list

The course explores many of the same themes that are covered in

Friedman, Wand and Haynes, Essentials of Programming Languages, 2nd or 3rd ed., MIT Press.

However, that book contains interpreters written in Scheme, and we will use Haskell. Full notes for the course (in the form of a draft book) will be handed out in lectures and put on the web.

Computational Complexity:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

OverviewThis course is an introduction to the theory of computational complexity and standard complexity classes. One of the most important insights to have emerged from Theoretical Computer Science is that computational problems can be classified according to how difficult they are to solve. This classification has shown that many computational problems are impossible to solve, and many more are impractical to solve in a reasonable amount of time. To classify problems in this way, one needs a rigorous model of computation, and a means of comparing problems of different kinds. This course introduces these ideas, and shows how they can be used.

Learning outcomes

The course is designed to enable students to:

1. Classify decision problems into appropriate complexity classes, including P, NP, PSPACE and complexity classes based on randomised machine models and use this information effectively.

2. State precisely what it means to reduce one problem to another, and construct reductions for simple examples.

48

Page 49: Oxford CS Degree

3. Classify optimisation problems into appropriate approximation complexity classes and use this information effectively.

4. Use the concept of interactive proofs in the analysis of optimisation problems.

Synopsis1. [1 lecture] Introduction. Easy and hard problems. Algorithms and complexity. 2. [1 lecture] Turing machines. Models of computation. Multitape deterministic and non-

deterministic Turing machines. Decision problems.

3. [1 lecture] The Halting Problem and Undecidable Languages. Counting and diagonalisation. Tape reduction. Universal Turing machine. Undecidability of halting. Reductions. Rice's theorem.

4. [1 lecture] Deterministic Complexity Classes. DTIME[t]. Linear Speed-up Theorem. PTime. Polynomial reducibility. Polytime algorithms: 2-satisfiability, 2-colourability.

5. [4 lectures] NP and NP-completeness. Non-deterministic Turing machines. NTIME[t]. NP. Polynomial time verification. NP-completeness. Cook-Levin Theorem. Polynomial transformations: 3-satisfiability, clique, colourability, Hamilton cycle, partition problems. Pseudo-polynomial time. Strong NP-completeness. Knapsack. NP-hardness.

6. [4 lectures] Space complexity and hierarchy theorems. DSPACE[s]. Linear Space Compression Theorem. PSPACE, NPSPACE. PSPACE = NPSPACE. PSPACE-completeness. Quantified Boolean Formula problem is PSPACE-complete. L, NL and NL-completeness. NL=coNL. Hierarchy theorems.

7. [2 lectures] Optimization and approximation. Combinatorial optimisation problems. Relative error. Bin-packing problem. Polynomial and fully polynomial approximation schemes. Vertex cover, travelling salesman problem, minimum partition.

8. [2 lectures] Randomized Complexity. The classes BPP, RP, ZPP. Interactive proof systems: IP = PSPACE.

SyllabusTuring machines, decision problems, time and space complexity, polynomial time algorithms, NP and NP-completeness, standard time and space complexity classes, optimization problems and approximation algorithms, randomised algorithms and complexity classes based on randomised machine models, interactive proofs and their relation to approximation.

Reading listPrimary Text

Arora, Barak. Computational Complexity. Cambridge University Press, 2009. M Sipser, Introduction to the Theory of Computation, (First edition - PWS Publishing Company,

January 1997, or second edition - Thomson Course Technology, 2005).

Supplementary List I Wegener, Complexity Theory, Springer, 2005.

49

Page 50: Oxford CS Degree

C H Papadimitriou, Computational Complexity, Addison-Wesley, 1994.

M R Garey and D S Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979.

T H Cormen, S Clifford, C E Leiserson and R L Rivest, Introduction to Algorithms, MIT Press, Second edition, 2001.

Oded Goldreich, Computational Complexity, Cambridge University press.

Geometric Modelling:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

OverviewThis is an introductory course in modelling techniques for 3D objects. It covers a wide range of different ways of representing the geometry of real objects, depending on their functionality and application. The emphasis in this course will be on the theory and basic principles of constructing models; hence the practicals will not use CAD-specific software, but rather a programming environment suitable for reasoning about the mathematics of models.

Learning outcomes

 At the end of the course, the student will:

understand the need for, and the different applications of geometric modelling techniques understand some of the technical solutions

be able to reason about the range of solutions to problems involving 3D objects

PrerequisitesKnowledge of basic matrix and vector algebra is assumed, as is basic set theory.

The course does not deal with the rendering of such models: this is left to Computer Graphics. Neither does it deal with any of the applications once the models have been created: this is left to Computer Animation. Whilst there are obvious links between these three courses, they have been designed to be independent of each other.

Synopsis Point, line and line segment; relative positions; polyline [1]

50

Page 51: Oxford CS Degree

Polygon, convex and concave; polyhedron; convex hull [1]

Different kinds of geometric modellers [1]

Boundary representation modelling [1]

Boundary representation operations [1]

Constructive Solid Geometry introduction; interval arithmetic [1]

Constructive Solid Geometry tree pruning; blends; integral properties [2]

Splines introduction; Bézier curves [1]

Drawing splines; degree elevation [2]

Sculptured surface patches: applications [1]

General splines; constructing splines from Bézier curves [1]

B-splines; interpolation splines [1]

Voronoi diagram; Delaunay triangulation [1]

Largest empty circle; Voronoi diagram generalisation(s) [1]

Syllabus Point, line and line segment; relative positions; polyline Polygon, convex and concave; polyhedron; convex hull

Different kinds of geometric modellers

Boundary representation modelling

Boundary representation operations

GSG introduction; interval arithmetic

GSG tree pruning; blends; integral properties

Splines introduction; Bézier curves

Drawing splines; degree elevation

Sculptured surface patches: applications

General splines; constructing splines from Bézier curves

B-splines; interpolation splines

Voronoi diagram; Delaunay triangulation

Largest empty circle; Voronoi diagram generalisation(s) 51

Page 52: Oxford CS Degree

Reading list

Unfortunately there is no single textbook that covers the syllabus. The following have been part of reading lists for past courses and might be useful:

For B-rep modelling (all rather vague - ask me if you want to see a copy)

Martti Mäntylä, Solid Modeling, Computer Science Press, 1988. (out of print) Hiroaki Chiyokura, Solid Modeling with Designbase, Addison-Wesley, 1988 (out of print)

Ian Stroud, Boundary Representation Modelling Techniques, Springer Verlag, 2006

For CSG The svlis manual contains a very good introduction to CSG and related issues A J P Gomes, I Voiculescu, J Jorge, B Wyvill, C Galbraith, Implicit Curves and Surfaces:

Mathematics, Data Structures and Algorithms, Springer 2009, ISBN 978-1-84882-405-8 (not compulsory)

J R Woodwark, Blends in geometric modelling, in The Mathematics of Surfaces (R.R. Martin, ed.) (Proceedings of the 2nd IMA Conference on the Mathematics of Surfaces, Cardiff, 1986) (255--297), Oxford University Press, 1987

For parametric curves, splines and NURBS E Cohen, R Riesenfeld, G Elber, Geometric Modelling with Splines: an intr oduction, A K Peters

2001. (thorough, but theoretical) Les Piegl, Wayne Tiller, The NURBS Book, Springer 1997. (B-splines and NURBS)

G Farin, Curves and surfaces for computer aided geometric design, Academic Press, 1990. (practical applications)

For positions of points, lines and segments, also for convex hull and Voronoi diagrams: O'Rourke, J Computational Geometry in C, Cambridge University Press, 1994. (classic in

computational geometry)

For a summary of various topics: J D Foley, A Van Dam, S K Feiner, J F Hughes and R L Phillips, Introduction to Computer Graphics,

Addison-Wesley 1996. (chapters on B-rep and CSG, also rigid body transforms) T H Cormen, C E Leiserson and R L Rivest, Introduction to Algorithms, MIT Press, 1990. (general

algorithms and complexity)

Knowledge Representation & Reasoning

Information

52

Page 53: Oxford CS Degree

Term Hilary Term 2012  (16 lectures)

OverviewStudents attending this course are expected to acquire a good understanding of the logical foundations of Knowledge Representation and Reasoning as well as to become familiar with current research trends in the field. The course requires some familiarity with propositional and first order logic.

Special emphasis is placed on decidable fragments of first order logic, which are suited for Knowledge Representation. These include, for example, the logics underlying ontology-based technologies and the Semantic Web.

The course will also discuss logics that depart from first order logic, such as non-monotonic logics.

Learning outcomes Students satisfying the prerequisites are expected to understand the fundamental principles of

logic-based Knowledge Representation; be able to model simple domains in a logic-based language;

understand the notion of a reasoning service;

master the fundamentals of the reasoning algorithms underlying current systems;

understand the fundamental tradeoff between representation power and computational properties of a logic-based representation language;

be conversant with several widely used knowledge representation languages; and

understand how the theoretical material covered in the course is currently being applied in practice.

PrerequisitesStudents taking this course should have completed the first year Logic and Proof course (or an equivalent course in a different institution). Students would benefit from taking the third year Computational Complexity course as well as the second year Databases course; however, this is not a requirement.

Synopsis

PART 1:   KR&R WITH PROPOSITIONAL AND FIRST ORDER LOGIC

1.- Introduction

The need for formal languages for representing (machine-understandable) knowledge. Reasoning services and logic-based reasoning. High level architecture of KR&R systems.

53

Page 54: Oxford CS Degree

2. - Propositional Logic

Syntax and semantics of propositional logic. Notions of satisfiability, validity, and entailment. Reasoning based on model enumeration. Normal forms.

3. - Reasoning in Propositional Logic

Propositional resolution. The DPLL algorithm.

4.– Representing Knowledge in First Order Predicate Logic

Limitations of propositional logic for knowledge representation. Syntax and semantics of first order logic. Knowledge engineering using first order logic.

5 and 6. – Reasoning in First Order Predicate Logic

Reasoning in first order logic. Normal forms, Herbrand interpretations and Herbrand's theorem. Undecidability of the satisfiability and validity problems. Resolution in first order logic.

PART 2:  FRAGMENTS OF FIRST ORDER LOGIC

7.- Description Logics

Description logics as fragments of first order logic. Syntax and semantics.

8, 9 and 10.- Reasoning in Description Logics

Terminological and data-oriented reasoning in description logics. Tableau-based algorithms. Optimisation techniques and practical reasoning.

11.- Lightweight description logics.

The description logics EL and DL-Lite.

12.- Horn Fragments of First Order Logic.

Propositional and first order Horn fragments. Horn fragments without function symbols. Resolution with free selection. Forward and backward chaining reasoning.

13.- Other Decidable Fragments of First Order Logic

The Bernays-Schoenfinkel prefix class. The Guarded fragment. The 2 Variable Fragment.

PART 3:   NON-MONOTONIC LOGICS

14.- Non-monotonicity

54

Page 55: Oxford CS Degree

Classical vs non-monotonic logic. Ways to achieve non-monotonicity.

15.- Stable Model Semantics

Non monotonic semantics via stable models.

APPLICATIONS

16. Ontology Languages and the Semantic Web

Introduction to Semantic Web languages such as RDF and OWL.

Syllabus

Representing knowledge using logic. Reasoning techniques in propositional and first order logic. Fundamental tradeoff between representation power and computational properties.  Fragments of first order logic suited for Knowledge Representation.  Ontology languages for the Semantic Web. Non-monotonic logics.

Reading list

Relevant for Part 1:

 

Knowledge Representation and Reasoning. Ronald Brachman and Hector Levesque. The Morgan Kaufmann Series in Artificial Intelligence, 2004.

First Order Logic and Automated Theorem Proving. Melvin Fitting. Texts in Computer Science. 1995.

Handbook of Knowledge Representation. Frank van Harmelen, Vladimir Lifschitz and Bruce Porter (Eds). Foundations of Artificial Intelligence, 2008.

Relevant for Part 2:

The Description Logic Handbook: Theory, Implementation and Applications, 2nd Edition. Franz Baader, Diego Calvanese, Deborah L. MacGuinness, and Daniele Nardi. Cambridge University Press. 2007.

Foundations of Semantic Web Technologies. Chapman & Hall/ CRC Textbooks in Computing. Pascal Hitzler, Markus Kroetsch, and Sebastian Rudolph, 2009.

Relevant for Part 3:

Nonmonotonic Reasoning. Grigoris Antoniou. The MIT Press, 1997.

55

Page 56: Oxford CS Degree

Bridges Between Classical and Nonmonotonic Logic. David Makinson. Texts in Computing. 2005.

Machine Learning:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

Overview

MSc students will be assessed by invigilated exam lasting approximately 2 hours in week 0 of TT.

It has long been a central concern of Computer Science to create machines capable of learning from experience. From predicting movies a customer will like, to learning to translate human languages from examples, systems that learn are becoming increasing prevalent and effective in our everyday lives. This course will introduce the field of Machine Learning, in particular focusing on the core concepts of supervised and unsupervised learning. In supervised learning we will discuss algorithms which are trained on input data labelled with a desired output, for instance an image of a face and the name of the person whose face it is, and learn a function mapping from the input to the output. Unsupervised learning aims to discover latent structure in an input signal where no output labels are available, an example of which is grouping webpages based on the topics they discuss. Students will learn the algorithms which underpin many popular Machine Learning techniques, as well as developing an understanding of the theoretical relationships between these algorithms. The practicals will concern the application of machine learning to a range of real-world problems, with particular reference to working with data on the web.

Learning outcomes

On completion of the course students will be expected to:

Have a good understanding of the fundamental issues and challenges of machine learning: data, model selection, model complexity, etc.

Have an understanding of the strengths and weaknesses of many popular machine learning approaches.

Appreciate the underlying mathematical relationships within and across Machine Learning algorithms and the paradigms of supervised and un-supervised learning.

Be able to design and implement various machine learning algorithms in a range of real-world applications.

56

Page 57: Oxford CS Degree

Prerequisites

Modern Machine Learning is a mathematical discipline and as such students will benefit from a familiarity with probability theory and linear algebra, as well as some programming skills. The course is self-contained and does not require any previous knowledge of Artificial Intelligence.

Synopsis Introduction to Machine Learning (1 lecture): classification, regression and clustering;

supervised and unsupervised learning.

Mathematical preliminaries (1 lecture): Introduction to probability: random variables, independence, Bayes' theorem, conditional and marginal probabilities. Maximum likelihood (MLE) and Maximum a posteriori (MAP) density estimation and probability distributions.

Part 1: Classification and Regression

Introduction to classification (1 lectures): The Naive Bayes classifier. Probabilistic classification and regression (3 lectures): Generative vs. Discriminative models.

Logistic regression, optimisation and regularisation.

Computational Learning Theory (1 lecture): Model selection, PAC Learnability, the Vapnik-Chervonenkis dimension.

Non-linear classification (3 lectures): The Perceptron, Support Vector Machines and Kernels.

 

Part 2: Clustering and Dimensionality Reduction

Clustering (2 lectures): Mixture models and the EM algorithm. Topic Models (1 lecture): Latent Dirichlet Allocation.

Dimensionality Reduction (1 lecture): Principle Component Analysis.

Part 3: Structured Learning

Sequential Data (2 lectures): Hidden Markov Models

Syllabus

General Machine Learning concepts and models, supervised and un-supervised learning; Logistic Regression, Support Vector Machines; Evaluating models and algorithms, Computational Learning Theory; Clustering, latent variable models, EM, Hidden Markov Models.

57

Page 58: Oxford CS Degree

Reading list

Primary Text

Christopher M. Bishop. Pattern Recognition and Machine Learning, Springer 2007.

Secondary Texts

I.H. Witten and E. Frank, Data Mining: Practical Machine Learning Tools and Techniques, Second Edition Morgan Kaufmann, 2005.

T.M. Mitchell, Machine Learning, McGraw-Hill, 1997.

Reasoning about Information Update:  2011-2012

Information

Term Hilary Term 2012  (16 lectures)

Overview

The course is addressed to both MSc students (in Mathematics, CS and MFoCS) and third year undergarduate students (in any of the following fields: Maths, CS, Maths and Comp, MMath, and Maths and Philosophy), with an interest in Logic, AI and the dynamics of information in multi-agent systems. It explores and compares various logical approaches to information flows based on the use of modal logics, on formal languages for the specification of knowledge-related features of a system, and on the use of sequent calculi and proof theory as well as their order theoretic algebraic semantics, as abstract models for information update. A range of important mathematical techniques, such as soundness, completeness, building proof trees, using algebraic axioms via rewriitng,  and concepts, such as uncertainty, belief, knowledge, update,  are introduced and explained. The course presents applications of these notions to the analysis of information update, communication, and navigation, and of the role of beliefs and belief-changing actions, in the overall dynamics of any "society" of intelligent agents. In particular, we will model and reason about  epistemic puzzles,  robot navigation protocols, verification of protocols of unmanned vehicles,  communication between unreliable or adversary agents over insecure channels. Implementation of these applications are studied by presenting rule based systems based on the sequent calculus and rewrite systems based on the algebra.

Learning outcomes

At the end of the course students are expected to:

Analyze and model interactive scenarios of multi-agent information systems and reason about them using the formal logics

Learn syntax, proof systems and algebraic semantics for modal logics of actions and propostions

58

Page 59: Oxford CS Degree

Become able to reason about epistemic attitudes such as uncertainty, belief, knowledge and their update as a result of communication and navigation

Derive dynamic properties of information, using the presented proof system and by drawing proof trees.

Prove the above properties using the algebraic axiomatics in the form of rewrite rules

Implement the proof rules and algebraic axioms using rule-based programming languages such as Prolog and Haskel

Become familar with epistemic puzzles, navigation protcols, and protocols of unmanned vehicles, used as test cases of the course

Synopsis

Week 1. Examples of multi-agent systems and scenarios: NASA Deep Space shuttle, air traffic control,  eBay, Amazon, epistemic puzzles, security protocols, UAV protocols, robot navigation protocols

Week 2. Syntax and proof theory for a modal logic of actions, examples from puzzles and protocols

Week 3. Synax and proof theory for a modal logic of propositions, examples from puzzles and protocols

Week 4. Assumption Rules

Week 5. Modeling the muddy children puzzle and solving it

Week 6. Algebraic semantics for the modal logic of actions

Weeks 7. Algebraic semantics for the modal logic of propositions

Week 8. Modelling a robot navigation protocol and proving its properties

Reading list

Introductory Reading: Modal logics of propostions and actions

Chapters 1,2,3 of: R. Fagin, J, Halpern, Y. Moses, M. Vardi. Reasoning about Knowledge, MIT Press, 1995.

Chapter 5 of D. Harel, D. Kozen, J. Tiuryn. Dynamic Logic, The MIT Press, 2000.

Cahpters 1 to 5 of P. Blackburn, M. de Rijke, Y. Venema. Modal logic, Cambridge University Press, 2001.

Sequent Calculi for modal logics of actions and propositions

to be updated

59

Page 60: Oxford CS Degree

Algebraic Semantics for modal logics of actions and propositions

to be updated

Further Reading: Multi-Agent Systems

M. Wooldridge. An Introduction to Multi-agent Systems, John Wiley & Sons, 2002. (slides of a course based on this book are available from http://www.csc.liv.ac.uk/~mjw/pubs/imas/distrib/)

OXFORD: MASTER OF SCIENCE DEGREE IN COMPUTER SCIENCE 4 TH YEAR OF OUR LORD

Categories, Proofs and Processes:  2011-2012 Information

Term Michaelmas Term 2011  (20 lectures)

OverviewCategory Theory is a powerful mathematical formalism which has become an important tool in modern mathematics, logic and computer science. One main idea of Category Theory is to study mathematical `universes', collections of mathematical structures and their structure-preserving transformations, as mathematical structures in their own right, i.e. categories - which have their own structure-preserving transformations (functors). This is a very powerful perspective, which allows many important structural

60

Page 61: Oxford CS Degree

concepts of mathematics to be studied at the appropriate level of generality, and brings many common underlying structures to light, yielding new connections between apparently different situations.

Another important aspect is that set-theoretic reasoning with elements is replaced by reasoning in terms of arrows. This is more general, more robust, and reveals more about the intrinsic structure underlying particular set-theoretic representations.

Category theory has many important connections to logic. We shall in particular show how it illuminates the study of formal proofs as mathematical objects in their own right. This will involve looking at the Curry-Howard isomorphism between proofs and programs, and at Linear Logic, a resource-sensitive logic. Both of these topics have many important applications in Computer Science.

Category theory has also deeply influenced the design of modern (especially functional) programming languages, and the study of program transformations. One exciting recent development we will look at will be the development of the idea of coalgebra, which allows the formulation of a notion of coinduction, dual to that of mathematical induction, which provides powerful principles for defining and reasoning about infinite objects.

This course will develop the basic ideas of Category Theory, and explore its applications to the study of proofs in logic, and to the algebraic structure of programs and programming languages.

Remark: It is recommended that students who intend to write their MSc thesis in the Quantum Group at the Comlab take this course and additionally the Quantum Computer Science course in Hilary term.

Learning outcomes To master the basic concepts and methods of categories.

To understand how category-theory can be used to structure mathematical ideas, with the concepts of functoriality, naturality and universality; and how reasoning with objects and arrows can replace reasoning with sets and elements. To learn the basic ideas of using commutative diagrams and unique existence properties.

To understand the connections between categories and logic, focussing on structural proof theory and the Curry-Howard isomorphism.

To understand how some basic forms of computational processes can be modelled with categories.

Prerequisites

Some familiarity with basic discrete mathematics: sets, functions, relations, mathematical induction. Basic familiarity with logic: propositional and predicate calculus. Some first acquaintance with abstract algebra: vector spaces and linear maps, and/or groups and group

61

Page 62: Oxford CS Degree

homomorphisms. Some familiarity with programming, particularly functional programming, would be useful but is not essential.

Synopsis Introduction to category theory. Categories, functors, natural transformations. Isomorphisms.

monics and epics. Products and coproducts. Universal constructions. Cartesian closed categories. Symmetric monoidal closed categories. The ideas will be illustrated with many examples, from both Mathematics and Computer Science.

Introduction to structural proof theory. Natural deduction, simply typed lambda calculus, the Curry-Howard correspondence. Introduction to Linear Logic. The connection between logic and categories.

Further topics in category theory. Algebras and coalgebras. Connections to programming (structural recursion and corecursion).

A. Categories

Background and definition

Monics, epics, isomorphisms

Products and coproducts

Limits and colimits

Functors and natural transformations

Universal arrows and adjunctions

Cartesian closed categories

B. Connections with logic

Natural deduction, lambda calculus and Curry-Howard isomorphism

Gentzen sequent calculus and linear logic

Symmetric monoidal closed categories and categorical semantics of linear logic

Algebras

Coalgebras

Topoi

Reading listSlides will be provided. The standard reference is

Abramsky and Tzevelekos, "Introduction to Categories and Categorical Logic", http://web.comlab.ox.ac.uk/people/Bob.Coecke/AbrNikos.pdf

62

Page 63: Oxford CS Degree

The following books provide useful background reading.

B.C. Pierce, Basic Category Theory for Computer Science, MIT Press (1991) F.W. Lawvere, S.H. Schanuel, Conceptual Mathematics, Cambridge University Press (1997)

S. Mac Lane, Categories for the Working Mathematician, 2nd ed., Springer (1998)

M. Barr, C. Wells, Category Theory for Computer Science, 2nd ed., Prentice Hall (1995)

J.-Y. Girard, Y. Lafont, P. Taylor, Proofs and Types, http://www.paultaylor.eu/stable/prot.pdf

Of these, the book by Pierce provides a very accessible and user-friendly first introduction to the subject (though we will cover more topics in the course).

Computational Linguistics:  2011-2012 Information

Term Michaelmas Term 2011  (16 lectures)

OverviewThe aim of this series of lectures is to provide an introduction to some of the major topics in computational linguistics. No previous knowledge of linguistics is required.

Learning outcomesBy the end of this lecture series you should understand what the concerns of computational linguists are and be familiar with some of the major topics in the area. You should also be in a position to find out more of the practical details for yourself.

Prerequisites

A prior understanding of fundamental linguistic concepts is helpful but not entirely necessary for the course. 

The practical component of the course consists of a relatively substantial programming assignment. Students are free to choose the programming language of their choice, but should be at least somewhat familiar with the following concepts:

File I/O

63

Page 64: Oxford CS Degree

Associative Data Structures (e.g., Hash Maps)

String Parsing (Some experience with regular expressions is helpful)

Students with little or no programming experience may find the practical component very challenging, and we would suggest they ensure that they develop a basic proficiency before attempting the course.

SyllabusWeek 1Intro to linguistics (1) Parts of speechAutomatically assigning parts of speech (‘pos tagging’).Week 2Intro to linguistics (2) Syntax: constituent structureShallow parsing: NP chunkingWeek 3Context Free Grammars and parsers for natural languageIntro to Unification GrammarWeek 4More efficient parsing: charts and packingProbabilistic parsing and disambiguationWeek 5Intro to linguistics (3) Semantics and inferenceLogic for natural language semanticsWeek 6Compositional semanticsAutomated inference for natural languageWeek 7Word sense disambiguation; vector space models of meaningSome text processing applications:Information Extraction; Question AnsweringWeek 8Spoken language dialogue modelling:information state approaches;Markov Decision Processes, reinforcement learning

Reading listThe following textbooks cover much of the material. More detailed references will be given with the lectures. Lecture handouts will be supplied.

James Allen 1995 Natural Language Understanding, Addison-Wesley Pub Co, 2nd edition. An Introduction to Natural Language Processing, Computational Linguistics, and Speech

Recognition Daniel Jurafsky and James H. Martin, 2000, Prentice-Hall.

64

Page 65: Oxford CS Degree

Computer Animation:  2011-2012 Information

Term Michaelmas Term 2011  (20 lectures)

Overview

There will be three practicals.

Assessment will be by a take-home assignment, which will include a significant practical element.

The animation system used for the practicals will be Maya 2012.

Learning outcomes Basics of key-frame animation. Use of a modern software package for animation.

Use of animation and simulation in other domains.

Principles of collision detection and response.

Skill extension through mini-project.

Prerequisites

No specific pre-requisites, other than familiarity with basic operations on matrices and vectors. Basic knowledge of 3D transformations is useful (e.g., from the Computer Graphics course), but not essential. Rigid-body dynamics will be covered, for which some earlier experience would be useful.

Synopsis1. Introduction. Traditional animation. Use of computer animation. [1]2. 2. Scene Composition. Revision of rigid-body transformations (notes provided for those who

haven't seen this before in, e.g., computer graphics). Information required to render rigid objects. Transformation chains. Scene graphs. Scene description languages. [3]

65

Page 66: Oxford CS Degree

3. Basic animation. Time-varying transformations. Interpolation and interpolation functions. Use of quarternions for smooth rotation interpolation. [3]

4. Frame-based animation. Use of the animation program. [4]

5. Moving the camera. Animation tricks. [2]

6. Collision detection and response. Dealing with simple geometries. The GJK algorithm. Dealing with large scenes. Physical response models. [5]

7. Challenges and the future of computer animation. [2]

SyllabusBasic ideas of scene composition in 3D. Time-varying scenes; animation; animation frames and interpolation. Use of cameras. Animation tricks. Other uses of animation and simulation. Collision detection and response. Advanced topics. Challenges and the future.

Reading list

Course text

Computer Animation: Algorithms and Techniques, 2nd Edition ISBN: 0125320000 Rick Parent 47 GBP

Supplemental Reading

Introducing Autodesk Maya 2012, ISBN: 978-0470900215, Dariush Derakhshani, 34 GBP

How to Cheat in Maya 2012, ISBN: 978-0240816982, Eric Luhta and Kenny Roy, 28 GBP

Character Animation: 2D Skills for Better 3D, ISBN: 0240520548 Steve Roberts 24 GBP (More basic (non-computer) animation)

Ideas for the Animated Short: Finding and Building Stories, ISBN: 978-0240808604 Karen Sullivan, Gary Schumer and Kate Alexander, 18 GBP

Collision Detection in Interactive 3D Environments ISBN: 155860801X Gino van den Bergen 47 GBP

Probabilistic Model Checking:  2011-2012

66

Page 67: Oxford CS Degree

Information

Term Michaelmas Term 2011  (20 lectures)

OverviewProbabilistic model checking is a formal technique for analysing systems that exhibit probabilistic behaviour. Examples include randomised algorithms, communication and security protocols, computer networks, biological signalling pathways, and many others. The course provides a detailed introduction to these techniques, covering both the underlying theory (Markov chains, Markov decision processes, temporal logics) and its practical application (using the state-of-the art probabilistic checking tool PRISM, based here in Oxford). The methods used will be illustrated through a variety of real-life case studies, e.g. the Bluetooth/FireWire protocols and algorithms for contract signing and power management.

Learning outcomes

At the end of the course students are expected to: 

Understand the theory (models and logics) used in probabilistic model checking; Be able to apply the basic algorithms used to perform these techniques;

Be able to use the software tool PRISM to model and analyse simple probabilistic systems.

Prerequisites

No prior knowledge of probability will be assumed.

 

Synopsis Introduction to probabilistic model checking Discrete-time Markov chains (DTMCs) and their properties

Probabilistic temporal logics: PCTL, LTL, etc.

The PRISM model checker

PCTL model checking for DTMCs

Expected costs and rewards

Markov decision processes (MDPs)

67

Page 68: Oxford CS Degree

PCTL model checking for MDPs

Counterexamples

Probabilistic LTL model checking

Continuous-time Markov chains (CTMCs)

Model checking for CTMCs

Implementation and data structures: symbolic techniques

Syllabus

Introduction to probabilistic model checking; probabilistic models: discrete-time Markov chains, Markov decision processes, continuous-time Markov chains; probabilistic temporal logics: PCTL, CSL, LTL; model checking algorithms for PCTL, CSL, LTL; the PRISM model checker; symbolic probabilistic model checking.

Reading list Stochastic Model Checking , Marta Kwiatkowska, Gethin Norman and David Parker Automated Verification Techniques for Probabilistic Systems , Vojtěch Forejt, Marta

Kwiatkowska, Gethin Norman and David Parker

Principles of Model Checking, Christel Baier and Joost-Pieter Katoen, MIT Press(in particular, Chapter 10)

The PRISM user manual

Probability and Computing:  2011-2012 Information

Term Michaelmas Term 2011  (20 lectures)

OverviewIn this course we study applications of probabilistic techniques to computer science, focusing on randomised algorithms and the probabilistic analysis of algorithms. Randomisation and probabilistic techniques have applications ranging from communication protocols, combinatorial optimisation, computational geometry, data structures, networks and machine learning. Randomised algorithms, which typically guarantee a correct result only with high probability, are often simpler and faster than

68

Page 69: Oxford CS Degree

corresponding deterministic algorithms. Randomisation can also be used to break symmetry and achieve load balancing in parallel and distributed computing. This course introduces students to those ideas in probability that most are most relevant to computer science. This background theory is motivated and illustrated by a wide-ranging series of applications.

Learning outcomes

At the end of the course students are expected to

Understand basic concepts and tools in probability theory that are relevant to computing, including random variables, independence, moments and deviations, tail inequalities, occupancy problems, the probabilistic method, derandomisation and Markov chains.

Be able to use the above tools to devise and analyse randomised algorithms and carry out the probabilistic analysis of deterministic algorithms.

Understand some of the main paradigms in the design of randomised algorithms, including random sampling, random walks, random rounding, algebraic techniques, foiling the adversary and amplification.

 

Prerequisites

Exposure to probability theory, discrete mathematics, algorithms and linear algebra will be assumed.  Specific concepts that will be assumed include discrete probability spaces, the principle of inclusion-exclusion, conditional probability, random variables, expectation, basic graph theory, the binomial theorem, finite fields, power series, sorting algorithms, asymptotic notation, vector spaces, linear transformations, matrices and determinants.  Graduate students who have not taken a course in algorithms will not be at a significant disadvantage. Diligent students lacking some of the required background but willing to acquaint themselves with the necessary material are encouraged to contact the lecturer to discuss their situation prior to registering for this course.

Synopsis

The material will be mostly drawn from Chapters 1-7, 10 and 13 of the required text "Probability and Computing", by Mitzenmacher and Upfal. Supplementary material may also be taken from the book "Randomized Algorithms" by Motwani and Raghavan.  It is expected that the following will be covered:

Lectures 1--3: Events and Probability. Verifying matrix multiplication, min-cut algorithm, long-path algorithm, Schwartz-Zippel lemma, bipartite matching, isolating lemma.

69

Page 70: Oxford CS Degree

Lectures 4--7: Random Variables and Moments.  Expectation and variance, the coupon collector's problem, the stable marriage problem,randomised quicksort, median finding.  Luby's algorithm

Lectures 8--9: Chernoff Bounds. Las Vegas and Monte Carlo algorithms, set balancing, facility location, random rounding and permutation routing.

Lectures 10--11: Balls and Bins. Poisson approximation, random graphs and balanced allocations.

Lectures 12---14:  Markov Chains and Random Walks.  Random-walk algorithms for 2-SAT, 3-SAT and undirected reachability.

Lectures 15--16: The Monte-Carlo Method.  The DNF counting problem.  Sampling.

Lectures 17---18:  Pairwise Independence and Universal Hash Functions.  Sampling, derandomization, perfect hashing and count-min filters.

Lectures 19---20: The Probabilistic Method. Lovasz local lemma and application to propositional satisfiability; derandomization through conditional expectation.

Syllabus

Tools and Techniques: random variables; conditional expectation; moment bounds; tail inequalities; independence; coupon collection and occupancy problems; the probabilistic method; Markov chains and random walks; algebraic techniques; probability amplification and derandomisation.

Applications: Sorting and searching; graph algorithms; combinatorial optimisation; propositional satisfiability; hashing; routing; random sampling; DNF-counting; bloom filters, count-min filters.

Reading list

Required text:

Probability and Computing, by Michael Mitzenmacher and Eli Upfal, Cambridge University Press.

Also useful:

Randomized Algorithms, by Rajeev Motwani and Prabhakar Raghavan, Cambridge University Press.

Design and Analysis of Randomized Algorithms, by Juraj Hromkovic, Springer.

Automata, Logic and Games:  2011-2012 70

Page 71: Oxford CS Degree

Information

Term Hilary Term 2012  (16 lectures)

Overview

To introduce the mathematical theory underpinning the Computer-Aided Verification of computing systems. The main ingredients are:

Automata (on infnite words and trees) as a computational model of state-based systems. Logical systems (such as temporal and modal logics) for specifying operational behaviour.

Two-person games as a conceptual basis for understanding interactions between a system and its environment.

Learning outcomes

At the end of the course students will be able to:

Describe in detail what is meant by a Buchi automaton, and the languages recognised by simple examples of Buchi automata.

Use linear-time temporal logic to describe behaviourial properties such as recurrence and periodicity, and translate LTL formulas to Buchi automata.

Use S1S to define omega-regular languages, and give an account of the equivalence between S1S definability and Buchi recognisability.

Explain the intuitive meaning of simple modal mu-calculus formulas, and describe the correspondence bewteen property-checking games and modal mu-calculus model checking.

Prerequisites

Knowledge of first-order predicate calculus will be assumed. Familiarity with the basics of Finite Automata Theory and Computability (for example, as covered by the course, Models of Computation) and Complexity Theory would be very helpful. Candidates who do not have the required background are expected to have taken the course, Introduction to the Foundations of Computer Science.

Synopsis Automata on infinite words. Buchi automata: Closure properties. Determinization and Rabin

automata.

71

Page 72: Oxford CS Degree

Nonemptiness and Nonuniversality problems for Buchi automata.

Linear temporal logic and alternating Buchi automata.

Modal mu-calculus: Fundamental Theorem, decidability and finite model property. Parity Games and the Model-Checking Problem: memoryless determinacy, algorithmic issues.

Monadic Second-order Logic and its relationship with the modal mu-calculus.

Reading listSelected parts from:

J. Bradfield and C. P. Stirling. Modal logics and mu-calculi. In J. Bergstra, A. Ponse, and S. Smolka, editors, Handbook of Process Algebra, pages 293{332. Elsevier, North-Holland, 2001.

B. Khoussainov and A. Nerode. Automata Theory and its Applications. Progress in Computer Science and Applied Logic, Volume 21. Birkhauser, 2001.

C. P. Stirling. Modal and Temporal Properties of Processes. Texts in Computer Science. Springer-Verlag, 2001.

W. Thomas. Languages, Automata and Logic. In G. Rozenberg and A. Salomaa, editors, Handbook of Formal Languages, volume 3. Springer-Verlag, 1997.

M. Y. Vardi. An automata-theoretic approach to linear temporal logic. In Logics for Concurrency: Structure versus Automata, ed. F. Moller and G. Birtwistle, LNCS vol. 1043, pp. 238-266, Springer-Verlag, 1996.

The only copy of the Vardi book is in the RSL on open shelves. However, the article in question is availabe in .pdf form online at this address:

http://folli.loria.fr/cds/1998/pdf/degiacomo-nardi/vardi.pdf

Database Systems ImplementationInformation

Term Hilary Term 2012  (20 lectures)

72

Page 73: Oxford CS Degree

Overview

This course examines the data structures and algorithms underlying database management systems such as Oracle or PostgreSQL. It covers techniques from both research literature and commercial systems.

Learning outcomes

At the end of this course, students should

have a good insight into how DBMSs function internally understand how to analyse the performance of data-intensive systems

be familiar with a variety of programming techniques for large-scale data manipulation

apply the insights achieved to build the major components of a mini-DBMS.

Prerequisites

This course assumes a reasonable understanding of the following topics:

developing applications on relational DBMSs (SQL, relational algebra - completed an introductory course on Databases)

sorting/searching techniques (quick/merge sorts, binary trees, hash tables - course on Design and Analysis of Algorithms)

This course will use C and C++. The practicals will have increasing difficulty, to allow students to learn the languages.

Synopsis Hardware: Secondary-storage devices; disk access time; Input/Output model of computation;

optimized disk access; File and System Structure: page layout and access; buffer management; file organizations (heap,

sorted, clustered); row stores versus column stores;

Indexes: Tree-structured (ISAM, B+tree); hash-based (static, extendible, linear); multi-dimensional (UB-tree, k-d-b tree, R-tree)

External Sorting: external n-way merge sort; sorting based on B+trees;

Query Evaluation: Selection (index-based, hash-based, arbitrary selection predicates); projection (duplicate elimination; hash-based, sorting-based); joins (nested-loops, index nested, block nested, sort-merge, hash joins); set operations; aggregation; impact of buffering, pipelining, blocking; evaluation techniques in existing systems;

73

Page 74: Oxford CS Degree

Query Optimization: cardinality estimation for all query operators, histograms ; equivalences of relational algebra; query plans; cost estimation; nested queries; join optimization algorithms (dynamic programming and greedy join enumeration approaches); optimization techniques in existing systems;

Transaction Management: ACID properties; concurrency control (serializability criteria); locking (two-phase locking, index locking, multiple granularity locks, intention locks); deadlock detection; isolation levels; concurrency control in existing systems;

SyllabusThe internals of a relational database management system; data storage; buffer management; indexes; sorting; query evaluation and optimization; transaction management; concurrency control; comparisons of existing commercial systems; use cases: PostgreSQL and IBM DB2.

Reading list

We will follow closely chapters from these two books

Ramakrishan and Gehrke. Database Management Systems, McGraw-Hill, 2002 (3rd ed). Garcia-Molina, Ullman, Widom. Database Systems: The Complete Book. Prentice Hall, 2002 (or

2008, 2nd ed).

We will also discuss (or refer to) relevant research papers published in recent years in top conferences and journals in database systems and data management.

Information Retrieval:  2011-2012 Information

Term Hilary Term 2012  (20 lectures)

OverviewModern internet search engines form the primary interface for most users interacting with the World Wide Web. The dramatic increase in the amount of data that is available on the Web, in recent years, means that automatic methods of Information Retrieval (IR) have acquired greater significance. For the purpose of this course IR is the study of the indexing, processing, storage and querying of textual data. The aim of the course is to provide an introduction to the core principles and techniques used in IR, and to demonstrate how statistical models of language can be used to solve the document indexing and

74

Page 75: Oxford CS Degree

retrieval problems. In addition, we will look at the issues involved in indexing the entire web and the creative solutions to this problem currently deployed by large scale online search providers.

Learning outcomes

On completion of the course students will be expected to:

gain an understanding of the basic concepts and techniques in Information Retrieval; understand how statistical models of text can be used to solve problems in IR, with a focus on

how the vector-space model and the language model are implemented and applied to document retrieval problems;

understand how statistical models of text can be used for other IR applications, for example clustering and news aggregation;

appreciate the importance of data structures, such as an index, to allow efficient access to the information in large bodies of text;

understand common text compression algorithms and their role in the efficient building and storage of inverted indices.

have experience of building a document retrieval system, through the practical sessions, including the implementation of a relevance feedback mechanism;

understand the issues involved in providing an IR service on a web scale, including distributed index construction and user modeling for recommendation engines.

Prerequisites

Prior knowledge of elementary linear algebra would be helpful but is not required for this course. The practical side of this course has a relatively in depth programming component. Students will build a vector space based information retrieval system from scratch using a programming language of their choice. Students should be familiar with object oriented programming, simple data structures such as hash maps, and text processing.

Synopsis Text representation and processing, retrieval models: Boolean and vector space models, TF-IDF,

evaluation in information retrieval; Index construction and compression: inverted index, memory based and sort based inversion

with and without compression, text compression and coding;

Language models: ngram language models, the noisy channel model, probabilistic information retrieval;

Querying: text normalization and stemming, lexicon representations, Boolean and ranked query retrieval, relevance feedback;

75

Page 76: Oxford CS Degree

Document clustering and Text classification;

Lexical semantics and dimensionality reduction: distributional semantics, Latent Semantic Analysis;

Information retrieval on the Web: Page Rank, MapReduce, collaborative filtering, web recommendation engines.

Introduction to other information retrieval systems and challenges: Multimedia Information Retrieval, Mathematical Expression Retrieval, Information Extraction, Document Summarization.

Reading list

Primary Texts

Christopher Manning, Prabhakar Raghavan, and Hinrich Schutze. Introduction to Information Retrieval, 2008. http://nlp.stanford.edu/IR-book/html/htmledition/irbook.html

Ian H. Witten, Alistair Moffat, and Timothy C. Bell. Managing Gigabytes : Compressing and Indexing Documents and Images, Second Edition 1999.

Secondary Texts Jimmy Lin and Chris Dyer. Data-Intensive Text Processing with MapReduce, 2010. Ricardo Baeza-Yates and Berthier Ribeiro-Neto. Modern Information Retrieval, 1999.

Karen Sparck Jones and Peter Willett (editors). Readings in Information Retrieval, 1997.

C. J. van Rijsbergen. Information Retrieval, 1979. http://www.dcs.gla.ac.uk/Keith/Preface.html

Program Analysis:  2011-2012 Information

Term Hilary Term 2012  (20 lectures)

OverviewPrerequisites Functional programming, plus familiarity with Java. A good understanding of compiler construction is essential. Programming Languages is an advantage but not a necessity.

Program analysis provides the theory, algorithms and engineering techniques to answer questions about your programs. For example, you might want to determine what statements could have contributed to the value of an expression. Another application is for a compiler to decide whether

76

Page 77: Oxford CS Degree

an optimisation can be applied. Or you might want some mechanical assistance when refactoring your program. Program analysis is also indispensable when proving properties of large programs, for instance to check that there are no buffer overflows.

An elegant and crisp mathematical framework is common to all these applications. This course will introduce you to that mathematics, and simultaneously show how it leads to beautiful algorithms that solve practically important problems.

Learning outcomesStudents will learn the mathematical theory of lattices, Galois connections, abstract interpretation, and fixpoint computations, Furthermore they will learn to apply those notions in controlflow analysis and dataflow analysis. In turn, those are illustrated by refactoring transformations, optimisations, program understanding tools, and program checkers

Synopsis Overview. Type-based refactorings: examples and demo.

Definition of extract interface. Type constraints.

Type constraint gathering.

Type constraint solving algorithm.

Introduction to first practical.

Lattice theory: fixpoints.

Computing with fixpoints.

Abstract interpretation and Galois connections.

Abstract interpretation and Galois connections continued.

The Soot framework for analysing Java bytecode.

Small compiler optimisations.

Introduction to second practical.

Call graph construction.

Points-to analysis.

Points-to analysis, continued.

Compiler optimisation: Virtual method call resolution.

Introduction to third practical.

77

Page 78: Oxford CS Degree

Analysis in program understanding tools.

Slicing

Slicing, continued.

Optimising AspectJ.

Cflow intraprocedural optimisations.

Cflow interprocedural optimisations.

Syllabus Lattice theory: Galois connections; abstract interpretation; fixpoints. Controlflow analysis and dataflow analysis.

Refactoring transformations: type constraints; solving type constraints.

Range analysis: bounds checking.

Further compiler optimisations: call graph construction; points-to analysis; virtual method resolution.�

Program understanding tools: slicing.

Reading listThe main text will be a set of lecture notes. The following are background material:

Flemming Nielson, Hanne Riis Nielson, Chris Hankin: Principles of Program Analysis. Springer (Corrected 2nd printing, 452 pages, ISBN 3-540-65410-0), 2005.

Frank Tip, Adam Kiezun, Dirk Bäumer: Refactoring for generalization using type constraints. OOPSLA 2003: 13-26.

Robert M. Fuhrer, Frank Tip, Adam Kiezun, Julian Dolby, Markus Keller: Efficiently Refactoring Java Applications to Use Generic Libraries. ECOOP 2005: 71-96

Patrick Cousot, Radhia Cousot: Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. POPL 1977: 238-252

Ondrej Lhoták, Laurie J. Hendren: Context-Sensitive Points-to Analysis: Is It Worth It?. CC 2006: 47-64

David Grove, Craig Chambers: A framework for call graph construction algorithms. ACM Trans. Program. Lang. Syst. 23(6): 685-746 (2001)

The Soot framework, \verb|http://www.sable.mcgill.ca/soot/|

Quantum Computer Science:  2011-2012 78

Page 79: Oxford CS Degree

Information

Term Hilary Term 2012  (24 lectures)

OverviewBoth physics and computer science have been very dominant scientific and technological disciplines in the previous century. Quantum Computer Science aims at combining both and may come to play a similarly important role in this century. Combining the existing expertise in both fields proves to be a non-trivial but very exciting interdisciplinary journey. Besides the actual issue of building a quantum computer or realising quantum protocols it involves a fascinating encounter of concepts and formal tools which arose in distinct disciplines.

Remark: Students who intend to write their MSc thesis in the Quantum Group at Comlab should also take the Categories, Proofs and Processes course in Michaelmas term.

This course provides an interdisciplinary introduction to the emerging field of quantum computer science, explaining basic quantum mechanics (including finite dimensional Hilbert spaces and their tensor products), quantum entanglement, its structure and its physical consequences (e.g. non-locality, no-cloning principle), and introduces qubits. We give detailed discussions of some key algorithms and protocols such as Grover's search algorithm and Shor's factorisation algorithm, quantum teleportation and quantum key exchange, and analyse the challenges their significance for computer science, mathematics etc. We also provide a more conceptual semantic analysis of some of the above. Other important issues such as quantum information theory (including mixed states) will also be covered, although not in great detail. We mainly discuss the circuit model and briefly mention alternative computational paradigms like measurement-based quantum computing, we argue the need for high-level methods, provide some recent results concerning a graphical language and categorical semantics for quantum informatics and delineate the remaining scientific challenges for the future.

Learning outcomesThe student will know by the end of the course what quantum computing and quantum protocols are about, why they matter, and what the scientific prospects of the field are. This includes a structural understanding of some basic quantum mechanics, knowledge of important algorithms such as Grover's and Shor's algorithm and important protocols such as quantum teleportation. The student will also know where to find more details and will be able to access these. Hence this course also offers computer science and mathematics students a first stepping-stone for research in the field, with a particular focus on the newly developing field of quantum computer science semantics, to which Oxford University Computing Laboratory has provided pioneering contributions.

79

Page 80: Oxford CS Degree

Prerequisites

We do not assume any prior knowledge of quantum mechanics. However, a solid understanding of basic linear algebra (finite-dimensional vector spaces, matrices, eigenvectors and eigenvalues, linear maps etc.) is required as a pre-requisite. The course notes and the slides contain an overview of this material, so we advise students with a limited background in linear algebra to consult the course notes before the course starts.

Synopsis

1. Some background

Classical physics Quantum physics

Quantum computer science

2. Hilbert spaces and operators

Inner product and orthonormal bases Adjoints

Unitary, self-adjoint and projection operators

The spectral theorem

3. Quantum theory and qubits Von Neumann formalism Dirac notation

Qubits

The Bloch sphere

4. Entanglement Direct sum and tensor product of Hilbert spaces Composite systems and entanglement

Bell nonlocality

No-cloning theorem

5. Protocols from entanglement

80

Page 81: Oxford CS Degree

Bell basis Teleportation

Entanglement swapping

6. The structure of entanglement and graphical calculus Graphical calculus for quantum theory Map-state duality and compositionality

The logic of bipartite entanglement

7. Quantum algorithms Gates and circuits Mixed states, trace and partial trace

The concept of quantum computation

Grover's search algorithm

Shor's factoring algorithm

Quantum key distribution

8. Quantum logic The lattice of projections Gleason's theorem

Kochen-Specker theorem

9. More on mixed and entangled states Majorisation POVMs

LOCC transformations

Measuring bipartite entanglement

10. Semantics for quantum computing Quantum computing with relations Quantum computing with categories

81

Page 82: Oxford CS Degree

SyllabusFinite dimensional vector space, inner product, complex numbers, linear adjoints, unitary maps, self-adjoint operators, projectors, trace, tensor product of Hilbert spaces, Dirac notation, bit, qubit, entanglement, map-state duality, no-cloning, quantum circuits, quantum gates, Shor's algorithm, Grover's algorithm, quantum teleportation, quantum key-exchange, teleportation and measurement based quantum computing, decoherence, mixed states, quantum information, quantum logic, quantum categorical semantics.

Reading listReading list

Lecture notes which cover the whole course and which provide detailed pointers to additional reading will be made available. Moreover, there will be slides. The following book can serve as a standard reference:

Mermin, N.D. (2007), Quantum Computer Science, Cambridge University Press

Other standard books on the subject that might be of use are:

Gruska, J. (1999), Quantum Computing, McGraw-Hill Nielsen, M. and Chuang, I. L. (2000), Quantum Computation and Quantum Information,

Cambridge University Press

Kitaev, A. Yu., Shen, A. H. and Vyalyi, M. N. (2001), Classical and Quantum Computing, Graduate Studies in Mathematics 47, American Mathematical Society

On-line available courses elsewhere which can be consulted are:

By Braunstein: http://www.weizmann.ac.il/chemphys/schmuel/comp/comp.html By Pub http://www.theory.caltech.edu/people/preskill/ph229/

By Preskil http://www.theory.caltech.edu/people/preskill/ph229/

A different angle which is also very much reflected in the course is available at:

http://arxiv.org/abs/quant-ph/0510032 http://arxiv.org/abs/quant-ph/0506132

Requirements:  2011-2012

82

Page 83: Oxford CS Degree

Information

Term Hilary Term 2012  (16 lectures)

Overview

Many software and hardware development projects go through a phase called 'Requirements Capture and Analysis' which tries to determine the properties a system should have in order to succeed in the environment in which it will be used. This can be a very difficult task, and typical requirements documents contain errors, some of which are very difficult to detect, as well as very expensive to correct later on. Experience shows that many errors arise from social, political and cultural factors and recent research has focused on the problem of reconciling such factors with traditional concerns about the more technical aspects of system development.

This course takes a unique stance to the discussion of requirements in that it acknowledges the involvement of both the social and technical concerns. The course surveys a wide range of different approaches to the problem of determining requirements and aims to provide students with a set of techniques and skills that may be tailored to address a wide range of requirements problems.

The programme of study starts by considering traditional software engineering approaches to requirements engineering, more modern techniques including the use of UML and Use Cases, and progresses through a range of approaches, including ones which consider both technical and social concerns. Practical guidance is also included. Current methods for requirements capture often make implicit assumptions about the nature of social life and conduct and these will be discussed on the course and alternatives presented. The course itself has been designed to challenge many existing conceptions of the design process and there will be plenty of time to discuss the critical issues.

Course presentation combines lectures, classes and student presentations of pre-study exercise. The course is illustrated with a number of case studies, and students are encouraged to select appropriate methods, tools and techniques to address the issues raised by case studies.

The course is designed to enable participants to:

Appreciate how requirements fit into the overall software development lifecycle. Be aware of a variety of methods tools and techniques for requirements capture and analysis.

Become aware of some of the typical issues and problems facing practical requirements engineering.

83

Page 84: Oxford CS Degree

Identify methods tools and techniques for understanding user, work practice and organisational requirements.

The material from the lectures and classes will be assessed by a take-home assignment consisting of a report based on a case study. Individual student class presentation of pre-study material contributes to the assessment.

Learning outcomesAt the end of the course the student will have a breadth of knowledge about the range of requirements methods, tools, and techniques. They will gain an appreciation of at least two methods, and obtain practical guidance on elicitation techniques.

PrerequisitesThere will be a pre-study exercise.

Synopsis The Software Design Process: the need for requirements analysis; the software lifecycle. Classification of Requirements Methods: an orientation from which to assess existing and novel

methods.

Hard Methods: underlying assumptions; practical exercise in use case scenarios.

Requirements Elicitation; various techniques; strengths and weaknesses.

Soft Methods: Soft Systems Methodology; other socio-technical approaches.

Managing the Requirements Process: methods that provide a structure for co-operation between different stakeholders.

Specifying Requirements: functional and non-functional requirements; specification exercise.

Video-based Requirements Capture

Prototyping: the role of prototyping in requirements techniques for prototyping.

Requirements for Future Technologies: Computer Supported Co-operative Work (CSCW); networked multi-media systems; eScience

Reading listThere is no set textbook for this course. References that describe some of the aspects of the course are: Alan M. Davis. (1993). Software Requirements: objects, functions and states. Prentice Hall. (This text covers many of the more traditional approaches to requirements engineering).

Doug Rosenberg and Kendall Scott, Use Case Driven Object Modelling with UML Addison Wesley 1999. (A short introduction to the application of use cases and modelling within a modern software development situation).

84

Page 85: Oxford CS Degree

Marina Jirotka and Joseph Goguen (Eds). (1994). Requirements Engineering: Social and Technical Issues. Academic Press. (This is an edited collection which discusses in detail the role of both social and technical issues in requirements engineering).

Sommerville, I. and Sawyer, P. Requirements Engineering. A good practice guide. John Wiley and Sons. 1997. (A set of guidelines for 'best practice' intended for practitioners in the field).

Software Verification:  2011-2012 Information

Term Hilary Term 2012  (18 lectures)

Overview

 The course presents a comprehensive coverage of the foundations and state-of-the-art in software verification. It begins with a brief overview of the current need for verification tools. Hoare's classic method for reasoning about programs is presented to give a first overview of the concept of verification; the inherent difficulty in using this method is shown. A more formal account on programming languages and their semantics follows.  The notions of correct programs and bugs are discussed and techniques to find bugs are presented. A crucial idea in program verification is to use abstraction to reason about programs, known as the theory of abstract interpretation. Both simple and advanced analyses based on abstraction will be covered. The advanced analyses are incorporated in industrial tools and are applied in the development of large systems. Concluding the course, the notion of modularity in verification is discussed, focussing on issues that arise with programs that operate on heap; furthermore, an overview of the field of termination checking is given.

Learning outcomes

This is a research-oriented course. At the end of the course, the students will

understand the sources of complexity in modern programming languages, understand the use of abstraction to cope with intractability of analysis

have an in-depth knowledge of modern program analysis techniques,

be aware of current research challenges in the area.

85

Page 86: Oxford CS Degree

Prerequisites

A basic understanding of sets and relations, logic and program semantics will be assumed. This course is self-contained and any required background knowledge is taught in the lecture or will be covered in the handouts.

Synopsis1. Motivation and Background (logic, set theory) [2]2.

Axiomatic Semantics (Hoare logic, preconditions, postconditions, loop invariants) [2]

3.Models and Operational Semantics (transition systems, CFGs, operational program semantics, soundness/completeness, undecidability) [2]

4.Bounded Model Checking (program unwindings, unwinding assertions, optimisations) [2]

5.Fixed point theory (lattices, monotone functions, fixed points) [1]

6. Abstract Interpretation (abstract domains, abstract fixed points, may and must analyses) [2]

7.Predicate Abstraction (automated abstraction, lazy abstraction, refinement) [2]

8.Modular Verification and Heap (contracts, invariants, dynamicrames, separation logic) [2]

9.Termination (ranking functions, termination as safety property) [1]

Reading listThe recommended and required reading material will be drawn from the following sources.

Model Checking, Clarke/Peled/Grumberg, MIT Press 1999 and handouts from 2nd edition Decision Procedures, Kroening/Strichman, Springer 2008

Handbook of Satisfiability, Biere, Heule, Van Maaren, Walsh, IOS Press 2009

Principles of Model Checking, Baier, Katoen, MIT Press 2008

Verifiable Programming, Dahl, Prentice Hall PTR 1992

Theory of Data and Knowledge Bases:  2011-2012

86

Page 87: Oxford CS Degree

Information

Lecturer Thomas   Lukasiewicz

Degrees

Schedule C1 — Honour School of Computer Science

Schedule C1 — Honour School of Mathematics and Computer Science

Schedule C — MSc in Computer Science

MSc in Mathematics and Foundations of Computer Science

Term Hilary Term 2012  (16 lectures)

OverviewThe lecture series provides an understanding of the logical foundations of database query languages and knowledge representation formalisms, the expressive power of such languages/formalisms, and the complexity of query answering and reasoning with such languages/formalisms.

Learning outcomesBy the end of this lecture series, you should have a good understanding of the fundamentals of query languages, understand the trade-off between complexity and expressive power of query languages, and understand some basic formalisms of non-monotonic reasoning. You should be in the position of analyzing a query language and expressing knowledge in suitable logical formalisms.

Prerequisites

Basic knowledge of automata theory (e.g., finite state automata), databases (e.g., the relational data model, relational algebra, SQL), and complexity theory  (e.g., NP-completeness) will be assumed. This can be gained from the undergraduate courses Models of Computation, Databases and  Computational Complexity, or the MSc courses Introduction to  Foundations of Computer Science and Databases. Students who have not studied these courses should talk to the lecturer.

Synopsis

We will try to cover the following topics:

1. A brief introduction to databases, finite model theory, and descriptive complexity. 2. Conjunctive queries: complexity and optimization.

3. SQL and first-order queries: complexity, limits of expressive power.

4. Reasoning with propositional Horn theories.

5. Datalog and fixpoint queries: complexity and expressive power.

87

Page 88: Oxford CS Degree

6. Querying semi-structured data.

7. Elements of non-monotonic reasoning and closed-world reasoning.

8. Problems of data integration and data exchange.

9. Advanced material (time permitting).

It is roughly planned to spend two hours for each of the topics 1-8, and to insert additional material (9) dynamically where appropriate.

Reading list

Books:

S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995. L. Libkin. Elements of Finite Model Theory. Springer, 2004. (selected chapters)

A list of papers covering various relevant topics will be supplied in due course.

88