UCAM-CL-TR Technical Report ISSN 1476-2986

Computer Laboratory

List of technical reports

September 2021

15 JJ Thomson Avenue Cambridge CB3 0FD United Kingdom phone +44 1223 763500 https://www.cl.cam.ac.uk/ Technical reports published by the University of Cambridge Computer Laboratory are freely available via the Internet:

https://www.cl.cam.ac.uk/techreports/

ISSN 1476-2986 UCAM-CL-TR-1 at a rate exceeding that appropriate to his share of the machine, he can request, for every job he submits, the M.F. Challis: ‘deadline’ by which he wants it running, and the sys- tem will usually succeed in running his job at about The JACKDAW database package the requested time – rarely later, and only occasionally sooner. October 1974, 15 pages, PDF Every job in the machine has its own ‘deadline’, and the machine is not underloaded. Within limits, each Abstract: This report describes a general database pack- user can request his jobs back when he wants them, age which has been implemented in BCPL on an IBM and the system keeps his use to within the share of the 370/165 at the University of Cambridge. One cur- machine he has been given. The approach is believed to rent application is the provision of an administrative be an original one and to have a number of advantages database for the Computing Service. over more conventional scheduling and controlling al- Entries within a database may include (in addition gorithms. to primitive fields such as ‘salary’ and ‘address’) links to other entries: each link represents a relationship be- UCAM-CL-TR-3 tween two entries and is always two-way. Generality is achieved by including within each database class definitions which define the structure of A.J.M. Stoneley: the entries within it; these definitions may be interro- A replacement for the OS/360 disc gated by program. The major part of the package presents a procedu- space management routines ral interface between an application program and an existing database, enabling entries and their fields to April 1975, 7 pages, PDF be created, interrogated, updated and deleted. The cre- ation of a new database (or modification of an existing Abstract: In the interest of efficiency, the IBM disc space one) by specifying the class definitions is handled by a management routines (Dadsm) have been completely separate program. replaced in the Cambridge 370/165. The first part of the report describes the database A large reduction in the disc traffic has been structure and this is followed by an illustration of the achieved by keeping the lists of free tracks in a more procedural interface. Finally, some of the implementa- compact form and by keeping lists of free VTOC tion techniques used to insure integrity of the database blocks. The real time taken in a typical transaction has are described. been reduced by a factor of twenty. By writing the code in a more appropriate form than the original, the size has been decreased by a factor UCAM-CL-TR-2 of five, thus making it more reasonable to keep it per- manently resident. The cpu requirement has decreased J. Larmouth: from 5% to 0.5% of the total time during normal ser- vice. Scheduling for a share of the machine The new system is very much safer than the old in October 1974, 29 pages, PDF the fact of total system crashes. The old system gave little attention to the consequences of being stopped in Abstract: This paper describes the mechanism used to mid-flight, and it was common to discover an area of schedule jobs and control machine use on the IBM disc allocated to two files. This no longer happens. 370/165 at Cambridge University, England. The same algorithm is currently being used in part at the Univer- UCAM-CL-TR-4 sity of Bradford and implementations are in progress or under study for a number of other British Universities. A.J.M. Stoneley: The system provides computer management with a simple tool for controlling machine use. The manage- The dynamic creation of I/O paths rial decision allocates a share of the total machine re- under OS/360-MVT sources to each user of the system, either directly, or via a hierarchial allocation scheme. The system then un- April 1975, 16 pages, PDF dertakes to vary the turnaround of user jobs to ensure that those decisions are effective, no matter what sort Abstract: In a large computer it is often desirable and of work the user is doing. convenient for an ordinary program to be able to es- At the user end of the system we have great flexi- tablish for itself a logical connection to a peripheral bility in the way in which he uses the resources he has device. This ability is normally provided through a rou- received, allowing him to get a rapid turnaround for tine within the operating system which may be called by those (large or small) jobs which require it, and a slower any user program at any time. OS/360 lacks such a rou- turnaround for other jobs. Provided he does not work tine. For the batch job, peripheral connections can only

3 be made through the job control language and this can- UCAM-CL-TR-9 not be done dynamically at run-time. In the restricted context of TSO (IBM’s terminal system) a routine for Douglas John Cook: establishing peripheral connections does exist, but it is extremely inefficient and difficult to use. Evaluation of a protection system This paper describes how a suitable routine was written and grafted into the operating system of the 181 pages, paper copy Cambridge 370/165. PhD thesis (Gonville & Caius College, April 1978)

UCAM-CL-TR-5 UCAM-CL-TR-10

P. Hazel, A.J.M. Stoneley: Mark Theodore Pezarro: Parrot – A replacement for TCAM Prediction oriented description of April 1976, 25 pages, PDF database systems Abstract: The terminal driving software and hardware 190 pages, paper copy for the Cambridge TSO (Phoenix) system is described. PhD thesis (Darwin College, October 1978) TCAM and the IBM communications controller were replaced by a locally written software system and a UCAM-CL-TR-11 PDP-11 complex. This provided greater flexibility, reli- ability, efficiency and a better “end-user” interface than was possible under a standard IBM system. Branimir Konstatinov Boguraev: Automatic resolution of linguistic UCAM-CL-TR-6 ambiguities Andrew D. Birrell: 222 pages, PDF System programming in a high level PhD thesis (Trinity College, August 1979) language Abstract: The thesis describes the design, implemen- 125 pages, paper copy tation and testing of a natural language analysis sys- PhD thesis (Trinity College, December 1977) tem capable of performing the task of generating para- phrases in a highly ambiguous environment. The em- UCAM-CL-TR-7 phasis is on incorporating strong semantic judgement in an augmented transition network grammar: the sys- Andrew Hopper: tem provides a framework for examining the relation- ship between syntax and semantics in the of Local area computer communication text analysis, especially while treating the related phe- nomena of lexical and structural ambiguity. Word-sense networks selection is based on global analysis of context within April 1978, 192 pages, PDF a semantically well-formed unit, with primary empha- PhD thesis (Trinity Hall, April 1978) sis on the verb choice. In building structures represent- ing text meaning, the analyser relies not on screen- Abstract: In this thesis a number of local area network ing through many alternative structures – intermedi- architectures are studied and the feasibility of a LSI de- ate, syntactic or partial semantic – but on dynami- sign for a universal local network chip is considered. cally constructing only the valid ones. The two tasks The thesis begins with a survey of current network tech- of sense selection and structure building are procedu- nologies and a discussion of some of the problems en- rally linked by the application of semantic routines de- countered in local network design. Existing implemen- rived from Y. Wilks’ preference semantics, which are in- tations of local networks are then discussed, and their voked at certain well chosen points of the syntactic con- performance compared. Ultimately the design consid- stituent analysis – this delimits the scope of their action erations for a general purpose, microprogrammed, LSI and provides context for a particular disambiguation network chip is discussed. Such a circuit is able to han- technique. The hierarchical process of sentence analy- dle a range of network architectures and can be recon- sis is reflected in the hierarchical organisation of ap- figured to suit various traffic patterns. Finally some of plication of these semantic routines – this allows the the protocol requirements of local networks are dis- efficient coordination of various disambiguation tech- cussed, leading to a redesign of the Cambridge ring niques, and the reduction of syntactic backtracking, to provide hardware support for protocol implemen- non-determinism in the grammar, and semantic paral- tation. lelism. The final result of the analysis process is a de- pendency structure providing a meaning representation

4 of the input text with labelled components centred on UCAM-CL-TR-14 the main verb element, each characterised in terms of semantic primitives and expressing both the meaning of J.S. Powers: a constituent and its function in the overall textual unit. The representation serves as an input to the generator, Store to store swapping for organised around the same underlying principle as the analyser – the verb is central to the clause. Currently TSO under OS/MVT the generator works in paraphrase mode, but is specif- June 1980, 28 pages, PDF ically designed so that with minimum effort and vir- tually no change in the program control structure and Abstract: A system of store-to-store swapping incorpo- code it could be switched over to perform translation. rated into TSO on the Cambridge IBM 370/165 is de- The thesis discusses the rationale for the approach scribed. Unoccupied store in the dynamic area is used adopted, comparing it with others, describes the sys- as the first stage of a two-stage backing store for swap- tem and its machine implementation, and presents ex- ping time-sharing sessions; a fixed-head disc provides perimental results. the second stage. The performance and costs of the sys- tem are evaluated. UCAM-CL-TR-12 UCAM-CL-TR-15 M.R.A. Oakley, P. Hazel: HASP “IBM 1130” multileaving I.D. Wilson: remote job entry protocol with The implementation of BCPL on a extensions as used on the University Z80 based microcomputer of Cambridge IBM 370/165 68 pages, PDF BA dissertation (Downing College, May 1980) September 1979, 28 pages, PDF Abstract: The main aim of this project was to achieve as Abstract: This document brings together most of the full an implementation as possible of BCPL on a floppy information required to design, write and operate a disc based microcomputer, running CP/M or CDOS HASP Remote Job Entry Terminal program. Most of (the two being esentially compatible). On the face of the document describes facilities available using any it there seemed so many limiting factors, that, when the host computer supporting the HASP protocols. The re- project was started, it was not at all clear which one mainder of the document describes improvements to (if any) would become a final stumbling block. As it these facilities which have been made in order to en- happened, the major problems that cropped up could hance the reliability of the system, to make it easier to be programmed round, or altered in such a way as to run, and to provide for a wider range of peripherals make them soluble. than the basic system. The main body of the work splits comfortably into three sections, and the writer hopes that, in covering UCAM-CL-TR-13 each section separately, to be able to show how the whole project fits together into the finished implemen- Philip Hazel: tation.

Resource allocation and job UCAM-CL-TR-16 scheduling Jeremy Dion: 1980, 41 pages, PDF Reliable storage in a local network Abstract: The mechanisms for sharing the resources of the Cambridge IBM 370/165 computer system among February 1981, 142 pages, PDF many individual users are described. File store is treated PhD thesis (Darwin College, February 1981) separately from other resources such as central proces- sor and channel time. In both cases, flexible systems Abstract: A recent development in computer science has that provide incentives to thrifty behaviour are used. been the advent of local computer networks, collections The method of allocating resources directly to users of autonomous computers in a small geographical area rather than in a hierarchical manner via faculties and connected by a high-speed communications medium. In departments is described, and its social acceptability is such a situation it is natural to specialise some of the discussed. computers to provide useful services to others in the network. These server machines can be economically

5 advantageous if they provide shared access to expensive UCAM-CL-TR-18 mechanical devices such as discs. This thesis discusses the problems involved in de- Burkard Wordenweber:¨ signing a file server to provide a storage service in a local network. It is based on experience gained from Automatic mesh generation of 2 & 3 the design and implementation of a file server for the dimensional curvilinear manifolds Cambridge ring. An important aspect of the design of a file server is November 1981, 128 pages, paper copy the choice of the service which is provided to client ma- PhD thesis (St John’s College, November 1981) chines. The spectrum of choice ranges from providing a simple remote disc with operations such as read and UCAM-CL-TR-19 write block, to a remote file system with directories and textual names. The interface chosen for the Cambridge Arthur William Sebright Cater: file server is “universal” in that the services it provides are intended to allow easy implementation of both vir- Analysis and inference for English tual memory systems and filing systems. The second major aspect of the file server design September 1981, 223 pages, paper copy concerns reliability. If the server is to store important PhD thesis (Queens’ College, September 1981) information for clients, then it is essential that it be re- sistant to transient errors such as communications or UCAM-CL-TR-20 power failures. The general problems of reliability and crash resistance are discussed in terms of a model de- Avra Cohn, Robin Milner: veloped for this purpose. Different reliability strategies used in current data base and filing systems are related On using Edinburgh LCF to prove to the model, and a mechanism for providing atomic the correctness of a parsing algorithm transactions in the Cambridge file server is described in detail. An improved mechanism which allows atomic February 1982, 23 pages, PDF transactions on multiple files is also described and con- trasted with the first version. The revised design allows Abstract: The methodology of Edinburgh LCF, a mech- several file servers in a local network to cooperate in anized interactive proof system is illustrated through a atomic updates to arbitrary collections of files. problem suggested by Gloess – the proof of a simple parsing algorithm. The paper is self-contained, giving UCAM-CL-TR-17 only the relevant details of the LCF proof system. It is shown how tactics may be composed in LCF to yield B.K. Boguraev, K. Sparck¨ Jones, J.I. Tait: a strategy which is appropriate for the parser problem but which is also of a generally useful form. Also il- Three papers on parsing lustrated is a general mechanized method of deriving structural induction rules within the system. 1982, 22 pages, PDF

Abstract: This collection of three papers examines cur- UCAM-CL-TR-21 rent problems in the parsing of natural language. The first paper investigates the parsing of compound nouns, A. Cohn: and suggests that the existing strategies are inadequate. Accepting that better approaches are needed, the paper The correctness of a precedence then proceeds to examine the implications for natural parsing algorithm in LCF language processing systems. The second paper in the collection examines the task April 1982, 38 pages, PDF of recognising conjunctions within an ATN grammar. To do this only through the grammar specification is Abstract: This paper describes the proof in the LCF sys- difficult and results in a bulky grammar. The paper tem of a correctness property of a precedence parsing therefore presents some ideas for extending the ATN algorithm. The work is an extension of a simpler parser mechanism to better deal with conjunctions. and proof by Cohn and Milner (Cohn & Milner 1982). The final paper considers ways in which semantic Relevant aspects of the LCF system are presented as parsers can exploit syntactic constraints. Two specific needed. In this paper, we emphasize (i) that although semantic parsers are considered: those of Cater and the current proof is much more complex than the ear- Boguraev which are regarded as being representative of lier one, mqany of the same metalanguage strategies two styles of parsing. The main conclusion to be drawn and aids developed for the first proof are used in this is that there are significant disadvantages to semantic proof, and (ii) that (in both cases) a general strategy parsing without complete syntactic processing of the in- for doing some limited forward search is incorporated put. neatly into the overall goal-oriented proof framework.

6 UCAM-CL-TR-22 UCAM-CL-TR-24

M. Robson: B.K. Boguraev, K. Sparck¨ Jones: Constraints in CODD Steps towards natural language to 18 pages, PDF data language translation using general semantic information Abstract: The paper describes the implementation of the data structuring concepts of domains, intra-tuple March 1982, 8 pages, PDF constraints and referential constraints in the relational DBMS CODD. All of these constraints capture some of Abstract: The aim of the work reported here is to max- the semantics of the database’s application. imise the use of general semantic information in an Each class of constraint is described briefly and it is AI task , specifically in a system front end shown how each of them is specified. The constraints for converting natural language questions into formal are stored in the database giving a centralised data database queries. The paper describes the translation model, which contains descriptions of procedures as component of such a front end, which is designed to well as of statistic structures. Some extensions to the work from the question meaning representation pro- notion of referential constraint are proposed and it is duced by a language analyser exploiting only general shown how generalisation hierarchies can be expressed semantics and syntax, to a formal query relying on as sets of referential constraints. It is shown how the database-specific semantics and syntax. Translation is stored data model is used in enforcement of the con- effected in three steps, and the paper suggests that the straints. rich and explicit meaning representations using seman- tic primitives produced for input sentences by the anal- UCAM-CL-TR-23 yser constitute a natural and effective base for further processing. J.I. Tait: UCAM-CL-TR-25 Two papers about the scrabble summarising system Hiyan Alshawi: 12 pages, PDF A clustering technique for semantic network processing Abstract: This report contains two papers which de- scribe parts of the Scrabble English summarizing sys- May 1982, 9 pages, PDF tem. The first, “Topic identification techniques for pre- dictive language analyzers” has been accepted as a Abstract: This paper describes techniques for perform- short communication for the 9th International COnfer- ing serial processing on the type of semantic network ence on Computational Linguistics, in Prague. The sec- exemplified by NETL. They make use of an indexing ond, “General summaries using a predictive language scheme that can be based on semantic clustering. The analyser” is an extended version of a discussion paper basic algorithm is aimed at performing fast intersection which will be presented at the European Conference operations. It is claimed that the scheme is suitable for on Artificial Intelligence in Paris. Both conferences will its current application in text processing. The semantic take place during July 1982. criteria for clustering that have been tried are briefly de- The [second] paper describes a computer system scribed. Extensions of the scheme are suggested for use capable of producing coherent summaries of English with large networks. texts even when they contain sections which the system has not understood completely. The system employs an UCAM-CL-TR-26 analysis phase which is not dissimilar to a script applier together with a rather more sophisticated summariser Brian James Knight: than previous systems. Some deficiencies of earlier sys- tems are pointed out, and ways in which the current Portable system software for implementation overcomes them are discussed. personal computers on a network 204 pages, paper copy PhD thesis (Churchill College, April 1982)

7 UCAM-CL-TR-27 UCAM-CL-TR-30

Martyn Alan Johnson: John Wilkes: Exception handling in domain based A portable BCPL library systems October 1982, 31 pages, PDF 129 pages, paper copy Abstract: Too often, programs written in BCPL are dif- PhD thesis (Churchill College, September 1981) ficult to port from one system to another, not because of the language, but because of differences between ‘stan- UCAM-CL-TR-28 dard’ libraries. Almost without exception, the defini- tions of these libraries are loose, woolly and inaccu- D.C.J. Matthews: rate – the proposed BCPL standards document being a prime example. The author has developed and imple- Poly report mented a new BCPL library which is explicitly designed to aid the portability of programs between systems. In August 1982, 17 pages, PDF addition to being largely portable itself, it has two other features of interest: it uses an exception handling sys- Abstract: Poly was designed to provide a programming tem instead of return codes, and it makes no distinction system with the same flexibility as a dynamically typed between system and user defined stream handlers. This language but without the run-time oveheads. The type paper defines the interface to the package. system, based on that of Russel allows polymorpphic operations to be used to manipulate abstract objects, UCAM-CL-TR-31 but with all the type checking being done at compile- time. Types may be passed explicitly or by inference as parameters to procedures, and may be returned from J. Fairbairn: procedures. Overloading of names and generic types Ponder and its type system can be simulated by using the general procedure mecha- nism. Despite the generality of the language, or perhaps November 1982, 42 pages, PDF because of it, the type system is very simple, consisting of only three classes of object. There is an exception Abstract: This note describes the programming lan- mechanism, similar to that of CLU, and the exceptions guage “Ponder”, which is designed according to the raised in a procedure are considered as part of its ‘type’. principles of referencial transparency and “orthogonal- The construction of abstract objects and hiding of inter- ity” as in [vWijngaarden 75]. Ponder is designed to be nal details of the representation come naturally out of simple, being functional with normal order semantics. the type system. It is intended for writing large programmes, and to be easily tailored to a particular application. It has a sim- UCAM-CL-TR-29 ple but powerful polymorphic type system. The main objective of this note is to describe the D.C.J. Matthews: type system of Ponder. As with the whole of the lan- guage design, the smallest possible number of primi- Introduction to Poly tives is built in to the type system. Hence for example, unions and pairs are not built in, but can be constructed May 1982, 24 pages, PDF from other primitives.

Abstract: This report is a tutorial introduction to the UCAM-CL-TR-32 programming language Poly. It describes how to write and run programs in Poly using the VAX/UNIX im- ¨ plementation. Examples given include polymorphic list B.K. Boguraev, K. Sparck Jones: functions, a double precision integer package and a How to drive a database front end subrange type constructor. using general semantic information November 1982, 20 pages, PDF

Abstract: This paper describes a front end for natural language access to databases making extensive use of general, i.e. domain-independent, semantic information for question interpretation. In the interests of porta- bility, initial syntactic and semantic processing of a question is carried out without any reference to the

8 database domain, and domain-dependent operations UCAM-CL-TR-35 are confined to subsequent, comparatively straightfor- ward, processing of the initial interpretation. The dif- Larry Paulson: ferent modules of the front end are described, and the system’s performance is illustrated by examples. Rewriting in Cambridge LCF February 1983, 32 pages, DVI UCAM-CL-TR-33 Abstract: Many automatic theorem-provers rely on rewriting. Using theorems as rewrite rules helps to sim- John A. Carroll: plify the subgoals that arise during a proof. An island parsing interpreter for LCF is an interactive theorem-prover intended for reasoning about computation. Its implementation of Augmented Transition Networks rewriting is presented in detail. LCF provides a fam- ily of rewriting functions, and operators to combine October 1982, 50 pages, PDF them. A succession of functions is described, from pat- tern matching primitives to the rewriting tool that per- Abstract: This paper describes the implementation of forms most inferences in LCF proofs. an ‘island parsing’ interpreter for an Augmented Tran- The design is highly modular. Each function per- sition Network (ATN). The interpreter provides more forms a basic, specific task, such as recognizing a cer- complete coverage of Woods’ original ATM formalism tain form of tautology. Each operator implements one than his later island parsing implementation; it is writ- method of building a rewriting function from simpler ten in LISP and has been modestly tested. ones. These pieces can be put together in numerous ways, yielding a variety of rewriting strategies. UCAM-CL-TR-34 The approach involves programming with higher- order functions. Rewriting functions are data values, Larry Paulson: produced by computation on other rewriting functions. The code is in daily use at Cambridge, demonstrating Recent developments in LCF: the practical use of functional programming. examples of structural induction UCAM-CL-TR-36 January 1983, 15 pages, PDF Lawrence Paulson: Abstract: Manna and Waldinger have outlined a large The revised logic PPLAMBDA proof that probably exceeds the power of current theorem-provers. The proof establishes the unification A reference manual algorithm for terms composed of variables, constants, March 1983, 28 pages, PDF and other terms. Two theorems from this proof, in- volving structural induction, are performed in the LCF Abstract: PPLAMBDA is the logic used in the Cam- proof assistant. These theorems concern a function that bridge LCF proof assistant. It allows Natural Deduc- searches for an occurrence of one term inside another, tion proofs about computation, in Scott’s theory of par- and a function that lists the variables in a term. tial orderings. The logic’s syntax, axioms, primitive in- Formally, terms are regarded as abstract syntax ference rules, derived inference rules and standard lem- trees. LCF automatically builds the first-order theory, mas are described as are the LCF functions for building with equality, of this recursive data structure. and taking apart PPLAMBDA formulas. The first theorem has a simple proof, induction fol- PPLAMBDA’s rule of fixed-point induction admits lowed by rewriting. The second theorem requires a a wide class of inductions, particularly where flat or fi- cases split and substitution throughout the goal. Each nite types are involved. The user can express and prove theorem is proved by reducing the initial goal to sim- these type properties in PPLAMBDA. The induction pler and simpler subgoals. LCF provides many stan- rule accepts a list of theorems, stating type properties dard proof strategies for attacking goals; the user can to consider when deciding to admit an induction. program additional ones in LCF’s meta-language, ML. This felxibility allows users to take ideas from such UCAM-CL-TR-37 diverse fields as denotational semantics and logic pro- gramming. Christopher Gray Girling: Representation and authentication on computer networks 154 pages, paper copy PhD thesis (Queens’ College, April 1983)

9 UCAM-CL-TR-38 UCAM-CL-TR-41

Mike Gray: Mike Gordon: Views and imprecise information in LCF LSM, A system for specifying databases and verifying hardware 119 pages, paper copy September 1983, 53 pages, PDF PhD thesis (November 1982) Abstract: The LCF LSM system is designed to show UCAM-CL-TR-39 that it is practical to prove the correctness of real hard- ware. The system consists of a programming environ- ment (LCF) and a specification language (LSM). The Lawrence Paulson: environment contains tools for manipulating and rea- Tactics and tacticals in Cambridge soning about the specifications. Verification consists in proving that a lov-level (usually structural) description LCF is behaviourally equivalent to a high-level functional description. Specifications can be fully hierarchical, and July 1983, 26 pages, PDF at any level devices can be specified either functionally or structurally. Abstract: The tactics and tacticals of Cambridge LCF As a first case study a simple microcoded computer are described. Tactics reason about logical connectives, has been verified. This proof is described in a com- substitution and rewriting; tacticals combine tactics panion report. In this we also illustrate the use of the into more powerful tactics. LCF’s package for manag- system for other kinds of manipulation besides verifi- ing an interactive proof is discussed. This manages the cation. For example, we show how to derive an im- subgoal tree, presenting the user with unsolved goals plementation of a hard-wired controller from a micro- and assembling the final proof. program and its decoding and sequencing logic. The While primarily a reference manual, the paper con- derivation is done using machine checked inference; tains a brief introduction to goal-directed proof. An this ensures that the hard-wired controller is equiva- example shows typical use of the tactics and subgoal lent to the microcoded one. We also show how to code package. a . These examples illustrate our belief that LCF is a good environment for implementing a UCAM-CL-TR-40 wide range of tools for manipulating hardware speci- fications. W. Stoye: This report has two aims: first to give an overview of the ideas embodied in LCF LSM, and second, to be The SKIM microprogrammer’s guide a user manual for the system. No prior knowledge of LCF is assumed. October 1983, 33 pages, PDF UCAM-CL-TR-42 Abstract: This paper describes the design and imple- mentation of the SKIM micorprocessor. The processor has a 24 bit ALU with 16 general purpose registers. Mike Gordon: The main unique feature is a large store of Proving a computer correct with the up to 64K 40 bit words, with the intention that the mi- crocode could be used like the machine code on a con- LCF LSM hardware verification ventional processor, with operating system primitives system being programmed in microcode. The processor has been constructed from TTL logic, September 1983, 49 pages, PDF with a microcode assembler running on Phoenix. A de- bugger for both the hardware and microcode programs Abstract: A machine generated correctness proof of a runs on the host machine, currently a BBC Microcom- simple computer is described. puter. At the machine code level the computer has a mem- The processor architecture is discussed, with ex- ory and two registers: a 13 bit program and a amples of microcode programming. comparisons with 16-bit accumulator. There are 8 machine instructions: other processors are made, and some of the limitations halt, unconditional jump, jump when the accumulator of the present design are noted. contains 0, add contents of a memory location to accu- mulator, subtract contents of a location from accumu- lator, load accumulator from memory, store contents of accumulator in memory, and skip. The machine can be interrupted by pushing a button on its front panel.

10 The implementation which we prove correct has 6 UCAM-CL-TR-44 data registers, and ALU, a memory, and a microcode controller. The controller consists of a ROM holding Lawrence Paulson: 26 30-bit microinstructions, a microprogram counter, and some combinatorial microinstruction decode logic. Structural induction in LCF Formal specifications of the target and host ma- chines are given, and we describe the main steps in November 1983, 35 pages, paper copy proving that the host correctly fetches, decodes and ex- ecutes machine instructions. UCAM-CL-TR-45 The utility of LCF LSM for general manipulaton is illustrated in two appendices. In appendix 1 we show Karen Sparck¨ Jones: how to code a microassembler. In appendix 2 we use the LCF LSM inference rules to design a hard-wired Compound noun interpretation controller equivalent to the original microcoded one. N.B. This report should be read in conjunction with problems LCF LSM: A system for specifying and verifying hard- July 1983, 16 pages, PDF ware. University of Cambridge, Computer Laboratory technical report number 41. Abstract: This paper discusses the problems of com- pound noun interpretation in the context of automatic UCAM-CL-TR-43 language processing. Given that compound processing implies identifying the senses of the words involved, de- Ian Malcom Leslie: termining their bracketing, and establishing their un- derlying semantic relations, the paper illustrates the Extending the local area network need, even in comparatively favourable cases, for in- ference using pragmatic information. This has conse- February 1983, 71 pages, PDF quences for language processor architectures and, even PhD thesis (Darwin College, February 1983) more, for speech processors.

Abstract: This dissertation is concerned with the de- UCAM-CL-TR-46 velopment of a large computer network which has many properties associated with local area computer networks, including high bandwidth and lower error Nicholas Henry Garnett: rates. The network is made up of component local area networks, specifically Cambridge rings, which are con- Intelligent network interfaces nected either through local ring-ring bridges or through 140 pages, paper copy a high capacity satellite link. In order to take advan- PhD thesis (Trinity College, May 1983) tage of the characteristics of the resulting network, the protocols used are the same simple protocols as those used on a single Cambridge ring. This in turn allows UCAM-CL-TR-47 many applications, which might have been thought of as local area network applications, to run on the larger John Irving Tait: network. Much of this work is concerned with an intercon- Automatic summarising of English nection strategy which allows hosts of different com- texts ponent networks to communicate in a flexible man- ner without building an extra internetwork layer into 137 pages, PDF protocol hierarchy. The strategy arrived at is neither a PhD thesis (Wolfson College, December 1982) datagram approach nor a system of concatenated er- ror and flow controlled virtual circuits. Rather, it is a Abstract: This thesis describes a computer program lightweight virtual circuit approach which preserves the called Scrabble which can summarise short English order of blocks sent on a circuit, but which makes no texts. It uses large bodies of predictions about the likely other guarantees about the delivery of these blocks. An contents of texts about particular topics to identify the extra internetwork protocol layer is avoided by modify- commonplace material in an input text. Pre-specified ing the system used on a single Cambridge ring which summary templates, each associated with a different binds service names to addresses so that it now binds topic are used to condense the commonplace material service names to routes across the network. in the input. Filled-in summary templates are then used to form a framework into which unexpected material in the input may be fitted, allowing unexpected ma- terial to appear in output summary texts in an essen- tially unreduced form. The system’s summaries are in English.

11 The program is based on technology not dissimilar 143 pages, paper copy to a script applier. However, Scrabble represents a sig- PhD thesis (Wolfson College, 1983) nificant advance over previous script-based summaris- ing systems. It is much less likely to produce misleading UCAM-CL-TR-50 summaries of an input text than some previous systems and can operate with less information about the subject Lawrence Paulson: domain of the input than others. These improvements are achieved by the use of three Verifying the unification algorithm in main novel ideas. First, the system incorporates a new LCF method for identifying the idea or topics of an input text. Second, it allows a section of text to have more March 1984, 28 pages, PDF, DVI than one topic at a time, or at least a composite topic which may be dealt with by the computer program si- Abstract: Manna and Waldinger’s theory of substitu- multaneously applying the text predictions associated tions and unification has been verified using the Cam- with more than one simple topic. Third, Scrabble in- bridge LCF theorem prover. A proof of the monotonic- corporates new mechanisms for the incorporation of ity of substitution is presented in detail, as an exam- unexpected material in the input into its output sum- ple of interaction with LCF. Translating the theory into mary texts. The incorporation of such material in the LCF’s domain-theoretic logic is largely straightforward. output summary is motivated by the view that it is pre- Well-founded induction on a complex ordering is trans- cisely unexpected material which is likely to form the lated into nested structural inductions. Correctness of most salient matter in the input text. unification is expressed using predicates for such prop- The performance of the system is illustrated by erties as idempotence and most-generality. The verifica- means of a number of example input texts and their tion is presented as a series of lemmas. The LCF proofs Scrabble summaries. are compared with the original ones, and with other ap- proaches. It appears difficult to find a logic that is both UCAM-CL-TR-48 simple and flexible, especially for proving termination.

Hiyan Alshawi: UCAM-CL-TR-51 A mechanism for the accumulation Glynn Winskel, Kim Guldstrand Larsen: and application of context in Using information systems to solve text processing recursive domain equations effectively November 1983, 17 pages, PDF July 1984, 41 pages, PDF

Abstract: The paper describes a mechanism for the rep- Abstract: This paper aims to make two main contribu- resentation and application of context information for tions. One is to show how to use the concrete nature automatic natural language processing systems. Con- of Scott’s information systems to advantage in solving text information is gathered gradually during the read- recursive domain equations. The method is based on ing of the text, and the mechanism gives a way of com- the substructure relation between information systems. bining the effect of several different types of context This essentially makes a complete partial order (cpo) factors. Context factors can be managed independently, of information systems. Standard domain constructions while still allowing efficient access to entities in focus. like function space can be made continuous on this cpo The mechanism is claimed to be more general than the so the solution of recursive domain equations reduces global focus mechanism used by Grosz for discourse to the more familiar construction of forming the least- understanding. Context affects the interpretation pro- fixed point of a continuous function. The second con- cess by choosing the results, and restricting the process- tribution again relies on the concrete nature of infor- ing, of a number of important language interpretation mation systems, this time to develop a basic theory of operations, including lexical disambiguation and refer- effectively given information systems and through this ence resolution. The types of context factors that have present a simple treatment of effectively given domains. been implemented in an experimental system are de- scribed, and examples of the application of context are UCAM-CL-TR-52 given. Steven Temple: UCAM-CL-TR-49 The design of a ring communication David Charles James Matthews: network Programming language design with 132 pages, PDF polymorphism PhD thesis (Corpus Christi College, January 1984)

12 Abstract: This dissertation describes the design of a UCAM-CL-TR-54 high speed local area network. Local networks have been in use now for over a decade and there is a prolif- Lawrence Paulson: eration of different systems, experimental ones which are not widely used and commercial ones installed in Lessons learned from LCF hundreds of locations. For a new network design to be of interest from the research point of view it must August 1984, 16 pages, PDF have a feature or features which set it apart from exist- ing networks and make it an improvement over exist- Abstract: The history and future prospects of LCF ing systems. In the case of the network described, the are discussed. The introduction sketches basic concepts research was started to produce a network which was such as the language ML, the logic PPLAMBDA, and considerably faster than current designs, but which re- backwards proof. The history discusses LCF proofs tained a high degree of generality. about denotational semantics, functional programs, As the research progressed, other features were con- and digital circuits, and describes the evolution of ideas sidered, such as ways to reduce the cost of the network about structural induction, tactics, logics of computa- and the ability to carry data traffic of many different tion, and the use of ML. The biography contains thirty- types. The emphasis on high speed is still present but five references. other aspects were considered and are discussed in the dissertation. The network has been named the Cam- UCAM-CL-TR-55 bridge Fast Ring and and the network hardware is cur- rently being implemented as an at the Ben Moszkowski: University of Cambridge Computer Laboratory. The aim of the dissertation is to describe the back- Executing temporal logic programs ground to the design and the decisions which were made during the design process, as well as the design August 1984, 27 pages, PDF itself. The dissertation starts with a survey of the uses of local area networks and examines some established Abstract: Over the last few years, temporal logic has networks in detail. It then proceeds by examining the been investigated as a tool for reasoning about com- characteristics of a current network installation to as- puter programs, digital circuits and message-passing sess what is required of the network in that and simi- systems. In the case of programs, the general feeling has lar applications. The major design considerations for a been that temporal logic is an adjunct to existing lan- high speed network controller are then discussed and guages. For example, one might use temporal logic to a design is presented. Finally, the design of computer specify and prove properties about a program written interfaces and protocols for the network is discussed. in, say, CSP. This leads to the annoyance of having to simultaneously use two separate notations. UCAM-CL-TR-53 In earlier work we proposed that temporal logic it- self directly serve as the basis for a programming lan- guage. Since then we have implemented an interpreter Jon Fairbairn: for such a language called Tempura. We are developing A new type-checker for a functional Tempura as a tool for directly executing suitable tem- poral logic specifications of digital circuits and other language discrete time systems. Since every Tempura statement is also a temporal formula, we can use the entire tempo- July 1984, 16 pages, PDF ral logic formalism for our assertion language and se- mantics. Tempura has the two seemingly contradictory Abstract: A polymorphic type checker for the func- properties of being a logic programming langauge and tional language Ponder [Fairbairn 82] is described. The having imperative constructs such as assignment state- initial sections give an overview of the syntax of Pon- ments. der, and some of the motivation behind the design of The presentation given here first describes the syn- the type system. This is followed by a definition of the tax of a first order temporal logic having the operators relation of ‘generality’ between these types, and of the ◦ (next) and  (always). This serves as the basis for notion of type-validity of Ponder programs. An algo- the Tempura programming language. The lesser known rithm to determine whether a Ponder program is type- temporal operator chop is subsequently introduced, re- valid is then presented. The final sections give examples sulting in Interval Temporal Logic. We then show how of useful types which may be constructed within the to incorporate chop and related constructs into Tem- type system, and describe some of the areas in which it pura. is thought to be inadequate.

13 UCAM-CL-TR-56 UCAM-CL-TR-59 William Stoye: Glynn Winskel: A new scheme for writing functional On the composition and operating systems decomposition of assertions September 1984, 30 pages, PDF November 1984, 35 pages, PDF Abstract: A scheme is described for writing nondeter- ministic programs in a functional language. The scheme Abstract: Recently there has been a great deal of interest is based on message passing between a number of ex- in the problem of how to compose modal assertions, in pressions being evaluated in parallel. I suggest that order to deduce the truth of an assertion for a compo- it represents a significant improvement over previous sition of processes in a parallel programming language, methods employing a nondeterministic merge primi- from the truth of certain assertions for its components. tive, and overcomes numerous drawbacks in that ap- This paper addresses that problem from a theo- proach. The scheme has been designed in a practical retical standpoint. The programming language used is context, and is being used to write an operating sys- Robin Milner’s Synchronous Calculus of Communicat- tem for SKIM, a functionally programmed machine. It ing Systems (called SCCS), while the language of asser- is not yet well understood in a mathematical sense. tions is a fragment of dynamic logic which, despite its simplicity, is expressive enough to characterise obser- UCAM-CL-TR-57 vational equivalence. It is shown how, with respect to Lawrence C. Paulson: each operation ‘op’ in SCCS, every assertion has a de- composition which reduces the problem of proving the Constructing recursion operators in assertion holds of a compound process built up using intuitionistic type theory ‘op’ to proving assertions about its components. These results provide the foundations of a proof system for October 1984, 46 pages, PDF, DVI SCCS with assertions. Abstract: Martin-Lof’s¨ Intuitionistic Theory of Types is becoming popular for formal reasoning about com- UCAM-CL-TR-60 puter programs. To handle recursion schemes other than primitive recursion, a theory of well-founded rela- Hiyan Alshawi: tions is presented. Using primitive recursion over higher types, induction and recursion are formally derived for Memory and context mechanisms for a large class of well-founded relations. Included are < automatic text processing on natural numbers, and relations formed by inverse images, addition, multiplication, and exponentiation of 192 pages, paper copy other relations. The constructions are given in full de- PhD thesis (Trinity Hall, December 1983) tail to allow their use in theorem provers for Type The- ory, such as Nuprl. The theory is compared with work UCAM-CL-TR-61 in the field of ordinal recursion over higher types.

UCAM-CL-TR-58 Karen Sparck¨ Jones: Glynn Winskel: User models and expert systems Categories of models for concurrency December 1984, 44 pages, PDF

October 1984, 35 pages, PDF Abstract: This paper analyses user models in expert sys- Abstract: It is shown how a variety of models for con- tems in terms of the many factors involved: user roles, current processes can be viewed as categories in which user properties, model types, model functions in rela- familiar constructions turn out to be significant categor- tion to different aspects of system performance, and ically. Constructions to represent various parallel com- sources, e.g. linguistic or non-linguistic, of modelling positions are often based on a product construction, for information. The aim of the detailed discussion, with instance. In many cases different models can be related extensive examples illustrating the complexity of mod- by a pair of functors forming an adjunction between the elling, is to clarify the issues involved in modelling, as a two categories. Because of the way in which such pairs necessary preliminary to model building. of functors preserve categorical constructions, the ad- junction serves to translate between the different mod- els, so it is seen how semantics expressed in terms of one model translate to semantics in terms of another.

14 UCAM-CL-TR-62 UCAM-CL-TR-64

Michael Robson: Branimir K. Boguraev, Karen Sparck¨ Jones: Constraint enforcement in a A framework for inference in relational database management natural language front ends to system databases 106 pages, paper copy February 1985, 73 pages, paper copy PhD thesis (St John’s College, March 1984) UCAM-CL-TR-65 UCAM-CL-TR-63 Mark Tillotson: David C.J. Matthews: Introduction to the programming Poly manual language “Ponder” February 1985, 46 pages, PDF May 1985, 57 pages, paper copy Abstract: Poly is a general purpose, High-level pro- gramming language. It has a simple type system which UCAM-CL-TR-66 is also very powerful. Higher order procedures, poly- morphic operations, parameterised abstract types and M.J.C. Gordon, J. Herbert: modules are all supported by a single mechanism. Poly is strongly typed. All objects have a specifica- A formal hardware verification tion which the compiler can use to check that opera- methodology and its application to a tions applied to them are sensible. Type errors cannot cause run time faults. The language is safe, meaning network interface chip that any faults occuring at run time will result in ex- May 1985, 39 pages, PDF ceptions which can be caught. All veriables must be ini- tialised before use, so faults due to undefined variables Abstract: We describe how the functional correctness cannot occur. Poly allows higher order procedures to of a circuit design can be verified by machine checked be declared and used; these take another procedure as formal proof. The proof system used is LCF LSM [1], a parameter, or return a procedure as the result. Since a version of Milner’s LCF [2] with a different logical Poly is statically scoped, this may still refer to the ar- calculus called LSM. We give a tutorial introduction to guments and local variables of the procedure which re- LSM in the paper. turned it. Our main example is the ECL chip of the Cam- Poly allows polymorphic operations. Thus, it is pos- bridge Fast Ring (CFR) [3]. Although the ECL chip is sible to write one program to perform an operation on quite simple (about 360 gates) it is nevertheless real. data of any type, provided only that the operation is Minor errors were discovered as we performed the for- available for the data type. Abstract types may be cre- mal proof, but when the corrected design was even- ated and manipulated. These can be specified in such a tually fabricated it was functionally correct first time. way that only the functions to manipulate these objects The main steps in verification were: (1) Writing a high- are available to the user. This has the advantage that the level behavioural specification in the LSM notation. (2) implementation can easily be changed, provided that it Translating the circuit design from its Modula-2 repre- has the same external properties. Abstract types can be sentation in the Cambridge Design Automation System parameterised so that a set of types can be defined in a [4] to LSM. (3) Using the LCF LSM theorem proving single definition. Types in Poly are similar to modules in system to mechanically generate a proof that the be- other languages. For example, types can be separately haviour determined by the design is equivalent to the compiled. An abstract type which makes use of other specified behaviour. types can be written as though it were polymorphic; it In order to accomplish the second of these steps, an will work if it is given any type which has the required interface between the Cambridge Design Automation operations. Its operation may be to return a new type System and the LCF LSM system was constructed. which may be used directly or as a parameter to other polymorphic abstract types.

15 UCAM-CL-TR-67 UCAM-CL-TR-69

Lawrence C. Paulson: Lawrence C. Paulson: Natural deduction theorem proving Proving termination of normalization via higher-order resolution functions for conditional expressions May 1985, 22 pages, PDF June 1985, 16 pages, PDF, DVI

Abstract: An experimental theorem prover is described. Abstract: Boyer and Moore have discussed a recursive Like LCF it is embedded in the metalanguage ML and function that puts conditional expressions into normal supports backward proof using tactics and tacticals. form. It is difficult to prove that this function terminates The prover allows a wide class of logics to be intro- on all inputs. Three termination proofs are compared: duced using Church’s representation of quantifiers in (1) using a measure function, (2) in domain theory us- the typed lambda-calculus. The inference rules are ex- ing LCF, (3) showing that its “recursion relation”, de- pressed as a set of generalized Horn clauses containing fined by the pattern of recursive calls, is well-founded. higher-order variables. Depth-first subgoaling along in- The last two proofs are essentially the same though ference rules is essentially linear resolution, but using conducted in markedly different logical frameworks. higher-order unification instead of first-order. This con- An obviously total variant of the normalize function is stitutes a higher-order Prolog interpreter. presented as the ‘computational meaning’ of those two The rules of Martin Lof’s¨ Constructive Type The- proofs. ory have been entered into the Prover. Special tactics A related function makes nested recursive calls. The inspect a goal and decide which type theory rules may three termination proofs become more complex: termi- be appropriate, avoiding excessive backtracking. These nation and correctness must be proved simultaneously. tactics can automatically derive the types of many Type The recursion relation approach seems flexible enough Theory expressions. Simple functions can be derived in- to handle subtle termination proofs where previously teractively. domain theory seemed essential.

UCAM-CL-TR-68 UCAM-CL-TR-70

Mike Gordon: Kenneth Graham Hamilton: HOL A remote procedure call system A machine oriented formulation of 109 pages, paper copy higher order logic PhD thesis (Wolfson College, December 1984)

July 1985, 52 pages, PDF UCAM-CL-TR-71

Abstract: In this paper we describe a formal language Ben Moszkowski: intended as a basis for hardware specification and ver- ification. The language is not new; the only originality Executing temporal logic programs in what follows lies in the presentation of the details. Considerable effort has gone into making the formal- August 1985, 96 pages, paper copy ism suitable for manipulation by computer. The logic described here underlies an automated UCAM-CL-TR-72 proof generator called HOL. The HOL logic is derived from Church’s Simple Type Theory by: making the syn- W.F. Clocksin: tax more readable, allowing types to contain variables, and building in the Axiom of Choice via Hilbert’s - Logic programming and the operator. The exact syntax of the logic is defined relative to specification of circuits a theory, which determines the types and constants May 1985, 13 pages, PDF that are available. Theories are developed incrementally starting from the standard theories of truth-values or booleans, and of individuals. This paper describes the logic underlying the HOL system.

16 Abstract: Logic programming (see Kowalski, 1979) them constructed from existing subresources by fab- can be used for specification and automatic reasoning ricators. The resource management system accepts re- about electrical circuits. Although propositional logic source requirements from clients and picks from the has long been used for describing the truth functions alternatives in these data bases the “best” match (as of combinational circuits, the more powerful Predicate defined by the resource management policy). Calculus on which logic programming is based has seen The resource management issues addressed include relatively little use in design automation. Previous re- resource description, location and allocation, construc- searchers have introduced a number of techniques sim- tion, monitoring and reclamation, authentication and ilar to logic programming, but many of the useful con- protection, and policy. The design and implementation sequences of the logic programming methodology have of two resource management servers is discussed. not been exploited. This paper first reviews and com- pares three methods for representing circuits, which UCAM-CL-TR-74 will be called here the functional method, the exten- sional method, and the definitional method. The latter Mike Gordon: method, which conveniently admits arbitrary sequen- tial circuits, is then treated in detail. Some useful con- Hardware verification by formal sequences of using this method for writing directly ex- ecutable specifications of circuits are described. These proof include the use of quantified variables, verification of August 1985, 6 pages, PDF hypothetical states, and sequential simulation. Abstract: The use of mathematical proof to verify hard- UCAM-CL-TR-73 ware designs is explained and motivated. The hierarchi- cal verification of a simple n-bit CMOS counter is used Daniel Hammond Craft: as an example. Some speculations are made about when and how formal proof will become used in industry. Resource management in a system UCAM-CL-TR-75 116 pages, PDF PhD thesis (St John’s College, March 1985) Jon Fairbairn: Design and implementation of a Abstract: The Cambridge Distributed System, based on the Cambridge Ring local area network, includes a het- simple typed language based on the erogeneous collection of machines known as the pro- lambda-calculus cessor bank. These machines may run network servers, or may be loaded with services and allocated to users May 1985, 107 pages, PDF dynamically. The machines and the variety of services PhD thesis (Gonville & Caius College, December they can support (eg. different operating systems, com- 1984) pilers, formatters) are viewed as resources available to other components of the distributed system. Abstract: Despite the work of Landin and others as By using a processor bank, two fundamental lim- long ago as 1966, almost all recent programming lan- itations of the personal computer approach to dis- guages are large and difficult to understand. This thesis tributed computing can be overcome: responsiveness is a re-examination of the possibility of designing and for computation-intensive tasks is not limited by the implementing a small but practical language based on single, personal machine because tasks may expand very few primitive constructs. into processor bank machines as necessary; and appli- The text records the syntax and informal semantics cations are not limited to the operating system or lan- of a new language called Ponder. The most notable fea- guages available on the personal computer because all tures of the work are a powerful type-system and an of the systems or languages which run on processor efficient implementation of normal order reduction. bank machines are at the users disposal, both for im- In contrast to Landin’s ISWIM, Ponder is statically plementing new applications and for importing appli- typed, an expedient that increases the simplicity of the cations from other systems. Resource management is language by removing the requirement that operations seen as one of the four areas which must be addressed must be defined for incorrect arguments. The type sys- to realize these advantages. tem is a powerful extension of Milner’s polymorphic The resource management system must match client type system for ML in that it allows local quantifica- requirements for resources to those resources which are tion of types. This extension has the advantage that available on the network. To do this it maintains two types that would otherwise need to be primitive may data bases: one contains information describing exist- be defined. ing resources, and the other contains information indi- cating how to obtain resources from servers or have

17 The criteria for the well-typedness of Ponder pro- UCAM-CL-TR-78 grammes are presented in the form of a natural de- duction system in terms of a relation of generality be- Glynn Winskel: tween types. A new type checking algorithm derived A complete proof system for SCCS from these rules is proposed. Ponder is built on the λ-calculus without the need with model assertions for additional computation rules. In spite of this ab- September 1985, 23 pages, PDF stract foundation an efficient implementation based on Hughes’ super-combinator approach is described. Some Abstract: This paper presents a proof system for Robin evidence of the speed of Ponder programmes is in- Milner’s Synchronous Calculus of Communicating Sys- cluded. tems (SCCS) with modal assertions. The language of The same strictures have been applied to the de- assertions is a fragment of dynamic logic, sometimes sign of the syntax of Ponder, which, rather than having called Hennessy-Milner logic after they brought it to many pre-defined clauses, allows the addition of new attention; while rather weak from a practical point of constructs by the use of a simple extension mechanism. view, its assertions are expressive enough to charac- terise observation equivalence, central to the work of UCAM-CL-TR-76 Milner et al. on CCS and SCCS. The paper includes a completeness result and a proof of equivalence between R.C.B. Cooper, K.G. Hamilton: an operational and denotational semantics for SCCS. Its emphasis is on the theoretical issues involved in the Preserving abstraction in concurrent construction of proof systems for parallel programming programming langauges. August 1985, 16 pages, PDF UCAM-CL-TR-79 Glynn Winskel: Abstract: Recent programming languages have at- tempted to provide support for concurrency and for Petri nets, algebras and morphisms modular programming based on abstract interfaces. Building on our experience of adding monitors to CLU, 38 pages, PDF a language orientated towards data abstraction, we ex- Abstract: It is shown how a category of Petri nets can plain how these two goals conflict. In particular we be viewed as a subcategory of two sorted algebras over discuss the clash between conventional views on inter- multisets. This casts Petri nets in a familiar framework face abstraction and the programming style required and provides a useful idea of morphism on nets differ- for avoiding monitor deadlock. We argue that the best ent from the conventional definition – the morphisms compromise between these goals is a combination of a here respect the behaviour of nets. The categorical con- fine grain locking mechanism together with a method structions with result provide a useful way to synthe- for explicitly defining concurrency properties for se- sise nets and reason about nets in terms of their com- lected interfaces. ponents; for example various forms of parallel compo- sition of Petri nets arise naturally from the product in UCAM-CL-TR-77 the category. This abstract setting makes plain a use- ful functor from the category of Petri nets to a cate- Mike Gordon: gory of spaces of invariants and provides insight into the generalisations of the basic definition of Petri nets Why higher-order logic is a – for instance the coloured and higher level nets of good formalisation for specifying and Kurt Jensen arise through a simple modificationof the sorts of the algebras underlying nets. Further it provides verifying hardware a smooth formal relation with other models of con- currency such as Milner’s Calculus of Communicating September 1985, 28 pages, PDF Systems (CCS) and Hoare’s Communicating Sequential Processes (CSP). Abstract: Higher order logic was originally developed as a foundation for mathematics. In this paper we show UCAM-CL-TR-80 how it can be used as: 1. a hardware description lan- guage, and 2. a formalism for proving that designs meet Lawrence C. Paulson: their specifications. Examples are given which illustrate various spec- Interactive theorem proving with ification and verification techniques. These include a Cambridge LCF CMOS inverter, a CMOS full , an n-bit ripple- carry adder, a sequential multiplier and an edge- A user’s manual triggered D-type register. November 1985, 140 pages, paper copy

18 UCAM-CL-TR-81 Abstract: An interactive theorem prover, Isabelle, is un- der development. In LCF, each inference rule is repre- William Robert Stoye: sented by one function for forwards proof and another (a tactic) for backwards proof. In Isabelle, each infer- The implementation of functional ence rule is represented by a Horn clause. Resolution gives both forwards and backwards proof, supporting languages using custom hardware a large class of logics. Isabelle has been used to prove December 1985, 151 pages, PDF theorems in Martin-Lof’s¨ Constructive Type Theory. PhD thesis (Magdalene College, May 1985) Quantifiers pose several difficulties: substitution, bound variables, Skolemization. Isabelle’s representa- Abstract: In recent years functional programmers have tion of logical syntax is the typed lambda-calculus, re- produced a great many good ideas but few results. quiring higher-order unification. It may have potential While the use of functional languages has been enthu- for logic programming. Depth-first search using infer- siastically advocated, few real application areas have ence rules constitutes a higher-order Prolog. been tackled and so the functional programmer’s views and ideas are met with suspicion. UCAM-CL-TR-83 The prime cause of this state of affairs is the lack of widely available, solid implementations of functional Ian David Wilson: languages. This in turn stems from two major causes: (1) Our understanding of implementation techniques Operation system design for was very poor only a few years ago, and so any im- large personal workstations plementation that is “mature” is also likely to be un- useably slow. (2) While functional languages are excel- 203 pages, paper copy lent for expressing algorithms, there is still considerable PhD thesis (Darwin College, July 1985) debate in the functional programming community over the way in which input and output operations should UCAM-CL-TR-84 be represented to the programmer. Without clear guid- ing principles implementors have tended to produce ad- Martin Richards: hoc, inadequate solutions. My research is concerned with strengthening the BSPL: case for functional programming. To this end I con- a language for describing the structed a specialised processor, called SKIM, which could evaluate functional programs quickly. This al- behaviour of synchronous hardware lowed experimentation with various implementation April 1986, 56 pages, paper copy methods, and provided a high performance implemen- tation with which to experiment with writing large functional programs. UCAM-CL-TR-85 This thesis describes the resulting work and includes the following new results: (1) Details of a practical Glynn Winskel: turner-style combinator reduction implementation fea- turing greatly improved storage use compared with pre- Category theory and models for vious methods. (2) An implementation of Kennaway’s parallel computation director string idea that further enhances performance and increases understanding of a variety of reduction April 1986, 16 pages, PDF strategies. (3) Comprehensive suggestions concerning the representation of input, output, and nondetermin- Abstract: This report will illustrate two uses of category istic tasks using functional languages, and the writing theory: Firstly the use of category theory to define se- of operating systems. Details of the implementation of mantics in a particular model. How semantic construc- these suggestions developed on SKIM. (4) A number of tions can often be seen as categorical ones, and, in par- observations concerning fuctional programming in gen- ticular, how parallel compositions are derived from a eral based on considerable practical experience. categorical product and a nun-deterministic sum. These categorical notions can provide a basis for reason- ing about computations and will be illustrated for the UCAM-CL-TR-82 model of Petri nets. Secondly, the use of category theory to relate differ- Lawrence C. Paulson: ent semantics will be examined; specifically, how the re- lations between various concrete models like Petri nets, Natural deduction proof as event structures, trees and state machines are expressed higher-order resolution as adjunctions. This will be illustrated by showing the coreflection between safe Petri nets and trees. December 1985, 25 pages, PDF, DVI

19 UCAM-CL-TR-86 UCAM-CL-TR-88

Stephen Christopher Crawley: David Maclean Carter: The Entity System: an object based A shallow processing approach to filing system anaphor resolution April 1986, 120 pages, paper copy May 1986, 233 pages, paper copy PhD thesis (St John’s College, December 1985) PhD thesis (King’s College, December 1985)

UCAM-CL-TR-87 UCAM-CL-TR-89

Kathleen Anne Carter: Jon Fairbairn: Computer-aided type face design Making form follow function May 1986, 172 pages, PDF An exercise in functional PhD thesis (King’s College, November 1985) programming style

Abstract: This thesis tackles the problems encountered June 1986, 9 pages, PDF when trying to carry out a creative and intuitive task, such as type face design, on a computer. A brief his- Abstract: The combined use of user-defined infix opera- tory of printing and type design sets the scene for a dis- tors and higher order functions allows the programmer cussion of digital type. Existing methods for generating to invent new control structures tailored to a particular and handling digital type are presented and their rela- problem area. tive merits are discussed. Consideration is also given to This paper is to suggest that such a combination has the nature of designing, independent of the tools used. beneficial effects on the ease of both writing and read- The importance of intuition and experience in such a ing programmes, and hence can increase programmer task is brought out. Any new tools must allow the de- productivity. As an example, a parser for a simple lan- signer to exercise his skills of hand and eye, and to guage is presented in this style. judge the results visually. The different abstractions that It is hoped that the presentation will be palatable to can be used to represent a typeface in a computer are people unfamiliar with the concepts of functional pro- discussed with respect to the manner of working that gramming. they force upon the designer. In the light of this discussion some proposals are UCAM-CL-TR-90 made for a new system for computer-aided type face de- sign. This system must be highly interactive, providing Andy Hopper, Roger M. Needham: rapid visual feedback in response to the designer’s ac- tions. Designing is a very unstructured task, frequently The Cambridge Fast Ring networking with a number of activities being pursued at once. Hence the system must also be able to support multi- system (CFR) ple activities, with the user free to move between them June 1986, 25 pages, PDF at any time. The characteristics of various types of interactive Abstract: Local area networks have developed from graphical environment are then considered. This discus- slow systems operating at below 1MBs to fast systems sion leads on to proposals for an environment suitable at 50MBs or more. We discuss the choices facing a de- for supporting type face design. The proposed anviron- signer as faster speeds for networks are contemplated. ment is based on the provision of a number of windows The 100MBs Cambridge Fast Ring is described. The on the screen, each supporting a different activity. A ring protocol allows one of a number of fixed size slots mouse, graphics tablet and keyboard are all continu- to be used once or repeatedly. The network design al- ously available for interection with the system. The rest lows sets of rings to be constructed by pushing the of the thesis discusses the implementation of this graph- bridge function to the lowest hardware level. Low cost ical environment and the type face design system that and ease of use is normally achieved by design of spe- makes use of it. The final chapter evaluates the success cial chips and we describe a two-chip VLSI implemen- of both the underlying software and of the type face tation. This VLSI hardware forms the basis of a kit-of- design system itself. parts from which many different network components can be constructed.

20 UCAM-CL-TR-91 about 2500 lines long. This program is an interactive spreadsheet using a mouse and bitmapped display. I dis- Albert Camilleri, Mike Gordon, cuss programming techniques and practical problems Tom Melham: facing functional languages with illustrative examples from programs I have written. Hardware verification using higher-order logic UCAM-CL-TR-93 September 1986, 25 pages, PDF J.P. Bennett:

Abstract: The Hardware Verification Group at the Uni- Automated design of an instruction versity of Cambridge is investigating how various kinds set for BCPL of digital systems can be verified by mechanised formal proof. This paper explains our approach to represent- June 1986, 56 pages, paper copy ing behaviour and structure using higher order logic. Several examples are described including a ripple carry UCAM-CL-TR-94 adder and a sequential device for computing the fac- torial function. The dangers of inaccurate models are illustrated with a CMOS exclusive-or gate. Avra Cohn, Mike Gordon: A mechanized proof of correctness of UCAM-CL-TR-92 a simple counter Stuart Charles Wray: June 1986, 80 pages, paper copy Implementation and programming UCAM-CL-TR-95 techniques for functional languages June 1986, 117 pages, PDF Glynn Winskel: PhD thesis (Christ’s College, January 1986) Event structures Abstract: In this thesis I describe a new method of strict- Lecture notes for the Advanced ness analysis for lazily evaluated functional languages, Course on Petri Nets and a method of code generation making use of the information provided by this analysis. I also describe July 1986, 69 pages, PDF techniques for practical programming in lazily evalu- ated functional languages, based on my experience of Abstract: Event structures are a model of computa- writing substantial functional programs. tional processes. They represent a process as a set of My new strictness analyser is both faster and more event occurrences with relations to express how events powerful than that of Mycroft. It can be used on any causally depend on others. This paper introduces event program expressed as super-combinator definitions and structures, shows their relationship to Scott domains it uses the additional classifications absent and danger- and Petri nets, and surveys their role in denotational ous as well as strict and lazy. This analyser assumes semantics, both for modelling laguages like CCS and that functional arguments to higher order functions are CSP and languages with higher types. completely lazy. I describe an extension of my analyser which dis- UCAM-CL-TR-96 covers more strictness in the presence of higher order functions, and I compare this with higher order analy- sers based on Mycroft’s work. I also describe an exten- Glynn Winskel: sion of my analyser to lazy pairs and discuss strictness Models and logic of MOS circuits analysers for lazy lists. Strictness analysis brings useful performance im- Lectures for the Marktoberdorf provements for programs running on conventional ma- Summerschool, August 1986 chines. I have implemented my analyser in a compiler for Ponder, a lazily evaluated functional language with October 1986, 47 pages, PDF polymorphic typing. Results are given, including the surprising result that higher order strictness analysis is no better than first order strictness analysis for speeding up real programs on conventional machines. I have written substantial programs in Ponder and describe in some detail the largest of these which is

21 Abstract: Various models of hardware have been pro- and discussing the view of power-domains as free non- posed though virtually all of them do not model cir- deterministic algebras. Finally, the relationship between cuits adequately enough to support and provide a for- the present work and that of Winskel is examined. mal basis for many of the informal arguments used by designers of MOS circuits. Such arguments use rather UCAM-CL-TR-99 crude discrete notions of strength – designers cannot be too finicky about precise resistances and capacitances David C.J. Matthews: when building a chip – as well as subtle derived no- tions of information flow between points in the circuit. An overview of the Poly One model, that of R.E. Bryant, tackles such issues in reasonable generality and has been used as the basis of programming language several hardware simulators. However Bryant’s model August 1986, 11 pages, PDF is not compositional. These lectures introduce Bryant’s ideas and present a compositional model for the be- Abstract: Poly is a general purpose programming lan- haviour of MOS circuits when the input is steady, show guage based on the idea of treating types as first class how this leads to a logic, and indicate the difficulties in values. It can support polymorphic operations by pass- providing a full and accurate treatment for circuits with ing types as parameters to procedures, and abstract changing inputs. types and parameterised types by returning types as re- sults. UCAM-CL-TR-97 Although Poly is not intended specifically as a database programming language it was convenient to Alan Mycroft: implement it is a persistent storage system. This allows the user to retain data structures from one session to A study on abstract interpretation the next, and can support large programming systems and “validating microcode such as the Poly compiler and a Standard ML system. algebraically” UCAM-CL-TR-100 October 1986, 22 pages, PDF Jeff Joyce, Graham Birtwistle, Mike Gordon: Abstract: This report attempts to perfrom two roles: the first part aims to give a state-of-the-art introduc- Proving a computer correct in tion to abstract interpretation with as little mathemat- ics as possible. The question of the ‘best’ meta-language higher order logic for abstract interpretation is, however, left open. The December 1986, 57 pages, paper copy second part gives a tutorial introduction to an applica- tion of abstract interpretation based on the relational style of Mycroft and Jones (1985). This report does UCAM-CL-TR-101 not claim to have introduced any new techniques, but rather aims to make the existing literature understand- David Russel Milway: able to a wider audience. Binary routing networks UCAM-CL-TR-98 December 1986, 131 pages, paper copy PhD thesis (Darwin College, December 1986) E. Robinson: Power-domains, modalities and the UCAM-CL-TR-102 Vietoris monad David C.J. Matthews: October 1986, 16 pages, PDF A persistent storage system for Poly Abstract: It is possible to divide the syntax-directed ap- and ML proaches to programming language semantics into two classes, “denotational”, and “proof-theoretic”. This January 1987, 16 pages, PDF paper argues for a different approach which also has the effect of linking the two methods. Drawing on re- cent work on locales as formal spaces we show that this provides a way in which we can hope to use a proof-theoretical semantics to give us a denotational one. This paper reviews aspects of the general the- ory, before developing a modal construction on locales

22 Abstract: The conventional strategy for implementing Abstract: This paper describes a compositional model interactive languages has been based on the use of a for MOS circuits. Like the model of Bryant (1984), it “workspace” or “core-image” which is read in at the covers some of the effects of capacitance and resistance start of a session and written out at the end. While this used frequently in designs. Although this has formed is satisfactory for small systems it is inefficient for large the basis of several hardware simulators, it suffers from programs. This report describes how an idea originally the inadequacy that it is not compositional, making it invented to simplify database programming, the persis- difficult to reason in a structured way. tent store, was adapted to support program develop- The present paper restricts its attention to the static ment in an interactive language. behaviour of circuits, representing this as the set of pos- Poly and ML are both semi-functional languages in sible steady states the circuit can settle into. A good the sense that they allow functions as first class ob- understanding of such static behaviour is necessary to jects but they have variables (references) and use call- treat sequential circuits. This paper further takes the by-value semantics. Implementing such languages in a view that it is useful to have a language to describe persistent store poses some problems but also allows the construction of circuits, and to this end borrows optimisations which would not be possible if their type ideas from Hoare’s Communicating Sequential Pro- systems did not apply certain constraints. cesses, and Milner’s Calculus of Communicating Sys- The basic system is designed for single-users but the tems. problems of sharing data between users is discussed and an experimental system for allowing this is described. UCAM-CL-TR-106

UCAM-CL-TR-103 Thomas F. Melham:

Mike Gordon: Abstraction mechanisms for HOL hardware verification A proof generating system for May 1987, 26 pages, PDF higher-order logic Abstract: It is argued that techniques for proving the January 1987, 56 pages, paper copy correctness of hardware designs must use abstraction mechanisms for relating formal descriptions at different levels of detail. Four such abstraction mechanisms and UCAM-CL-TR-104 their formalisation in higher order logic are discussed.

Avra Cohn: UCAM-CL-TR-107 A proof of correctness of Thierry Coquand, Carl Gunter, the Viper : Glynn Winskel: the first level DI-domains as a model of January 1987, 46 pages, PDF polymorphism Abstract: The Viper microprocessor designed at the May 1987, 19 pages, PDF Royal Signals and Radar Establishment (RSRE) is one of the first commercially produced computers to have Abstract: This paper investigates a model of the poly- been developed using modern formal methods. Viper is morphic lambda calculus recently described by Girard specified in a sequence of decreasingly abstract levels. (1985). This model differs from earlier ones in that all In this paper a mechanical proof of the equivalence of the types are interpreted as domains rather than clo- the first two of these levels is described. The proof was sures or finitary projections on a universal domain. The generated using a version of Robin Milner’s LCF sys- objective in this paper is to generalize Girard’s con- tem. struction to a larger category called dI-domains, and secondly to show how Girard’s construction (and this UCAM-CL-TR-105 generalization) can be done abstractly. It demonstrates that the generalized construction can be used to do de- Glynn Winskel: notational semantics in the ordinary way, but with the added feature of type polymorphism. A compositional model of MOS circuits April 1987, 25 pages, PDF

23 UCAM-CL-TR-108 Abstract: The idea of this note is to show how Winskel’s static-configuration model of circuits is related for- Andrew John Wilkes: mally to Gordon’s relational model. Once so related, the simpler proofs in the relational model can, for in- Workstation design for distributed stance, be used to justify results in terms of the static- configurations model. More importantly, we can ex- computing hibit general conditions on circuits which ensure that June 1987, 179 pages, PDF assertions which hold of a circuit according to the sim- PhD thesis (Wolfson College, June 1984) pler model are correct with respect to the more accu- rate model. The formal translation makes use of a sim- Abstract: This thesis discusses some aspects of the ple adjunction between (partial order) categories asso- design of computer systems for local area networks ciated with the two models, in a way reminiscient of ab- (LANs), with particular emphasis on the way such sys- stract interpretation. Preliminary results suggest similar tems present themselves to their users. Too little atten- lines of approach may work for other kinds of abstrac- tion to this issue frequently results in computing envi- tion such as temporal abstraction used in e.g. Melham’s ronments that cannot be extended gracefully to accom- work to reason about hardware, and, more generally, modate new hardware or software and do not present make possible a formal algebraic treatment of the rela- consistent, uniform interfaces to either their human tionship between different models of hardware. users or their programmatic clients. Before computer systems can become truly ubiquitous tools, these prob- UCAM-CL-TR-111 lems of extensibility and accessibility must be solved. This dissertation therefore seeks to examine one possi- K. Sparck¨ Jones: ble approach, emphasising support for program devel- Realism about user modelling opment on LAN based systems. June 1987, 32 pages, PDF UCAM-CL-TR-109 Abstract: This paper reformulates the framework for user modelling presented in an earlier technical report, Jeffrey Joyce: ‘User Models and Expert Systems’, and considers the Hardware verification of VLSI regular implications of the real limitations on the knowledge likely to be available to a system for the value and ap- structures plication of user models. July 1987, 20 pages, PDF UCAM-CL-TR-112

Abstract: Many examples of hardware specification fo- D.A. Wolfram: cus on hierarchical specification as a means of control- ling structural complexity in design. Another method Reducing thrashing by adaptive is the use of iteration. This paper, however, presents a third method, namely the mapping of irregular combi- backtracking national functions to regular structures. August 1987, 15 pages, PDF Regular structures often result in solutions which are economical in terms of area and design time. The Abstract: Adaptive backtracking dynamically reduces automatic generation of a regular structure such as a thrashing caused by blind backtracking and recurring ROM or PLA from a functional specification usually failures, by locating early backtrack points and delet- accommodates minor changes to the functional specifi- ing choices which are not part of any solution. Search cation. problems with hereditary bounding properties are sol- The mapping of irregular combinational functions uble by this method. These problems include searches to a regular structure separates function from circuit in theorem proving, logic programming, reason mainte- design. This paper shows how this separation can be nance, and planning. The location of a backtrack point exploited to derive a behavioural specification of a reg- uses a particular minimal inconsistent subset, which is ular structure parameterized by the functional specifi- called the cause set. A rejection set is computed from cation. the union of cause sets and rejection sets at a failure are used to locate subsequent backtrack points. A choice is UCAM-CL-TR-110 deleted when a rejection set is a singleton. The worst case overhead is O(nf(n)) in time if the bounding prop- 2 Glynn Winskel: erty can be tested in O(f(n)) time, and O(n ) in space. An implementation confirms the expected exponential Relating two models of hardware speed-ups for problems whose solution involves much thrashing. July 1987, 16 pages, PDF

24 UCAM-CL-TR-113 sophisticated data processing facilities in a workstation can usefully be combined with highly available telecom- Lawrence C. Paulson: munications facilities such as the telephone, to offer the user new services which make the working day more The representation of logics in pleasant and productive. That these facilities should be provided across one integrated network, rather than by higher-order logic several parallel single medium networks is an important August 1987, 29 pages, PDF organisational convenience to the system builder. The work described in this dissertation is relevant Abstract: Intuitionistic higher-order logic — the frag- principally in a local area context—in the wide area ment comtaining implication, universal quantification, economics and traffic balance dictate that the empha- and equality — can serve as a meta-logic for formaliz- sis will be on only the network level of integration for ing various logics. As an example, axioms formalizing some time now. The work can be split into three parts: first-order logic are presented, and proved sound and i) the use of a packet network to carry mixed me- complete by induction on proof trees. dia. This has entailed design of packet voice proto- Proofs in higher-order logic represent derivations of cols which produce delays low enough for the network rules as well as proofs of theorems. A proof develops by to interwork with national telephone networks. The deriving rules using higher-order resolutions. The dis- system has also been designed for minimal cost per charge of assumptions involves derived meta-rules for telephone—packet-switched telephone systems have ‘lifting’ a proposition. traditionally been more expensive than circuit-switched Quantifiers require a similar lifting rule or else types. The network used as a foundation for this work Hilbert’s -operator. The alternatives are contrasted has been the Cambridge Fast Ring. through several examples. Hilbert’s  underlies Is- ii) use of techniques well established in distributed abelle’s original treatment of quantifiers, but the lifting computing systems to build an ‘integrated services rule is logically simpler. PABX (Private Automatic Branch Exchange)’. Current The meta-logic is used in the latest version of the PABX designs have a very short life expectancy and an theorem prover Isabelle. It extends the logic used in ear- alarmingly high proportion of their costs is due to soft- lier versions. Compared with other meta-logics, higher- ware. The ideas presented here can help with both of order logic has a weaker type system but seems easier these problems, produce an extensible system and pro- to implement. vide a basis for new multi-media services. iii) development of new user level Integrated Ser- vices. Work has been done in three areas. The first is UCAM-CL-TR-114 multi-media documents. A voice editing interface is de- scribed along with the system structure required to sup- Stephen Ades: port it. Secondly a workstation display has been built to support a variety of services based upon image manip- An architecture for integrated services ulation and transmission. Finally techniques have been on the local area network demonstrated by which a better interface to telephony functions can be provided to the user, using methods of September 1987, 166 pages, PDF control typical of workstation interfaces. PhD thesis (Trinity College, January 1987) UCAM-CL-TR-115 Abstract: This dissertation concerns the provision of in- tegrated services in a local area context, e.g. on busi- ness premises. The term integrated services can be un- I.S. Dhingra: derstood at several levels. At the lowest, one network Formal validation of an integrated may be used to carry traffic of several media—voice, data, images etc. Above that, the telephone exchange circuit design style may be replaced by a more versatile switching system, incorporating facilities such as stored voice messages. August 1987, 29 pages, PDF Its facilities may be accessible to the user through the interface of the workstation rather than a telephone. Abstract: In dynamic circuit design many rules must be At a higher level still, new services such as multi-media followed which govern the correctness of the design. In document manipulation may be added to the capabili- this paper a dynamic CMOS design style using a two ties of a workstation. phase non-overlapping clock with its intricate design Most of the work to date has been at the lowest rules is presented together with formal means of show- of these levels, under the auspices of the Integrated ing that a circuit follows these rules. Services Digital Network (ISDN), which mainly con- cerns wide area communications systems. The thesis presented here is that all of the above levels are impor- tant in a local area context. In an office environment,

25 UCAM-CL-TR-116 UCAM-CL-TR-119

Thierry Coquand, Carl Gunter, Robert Cooper: Glynn Winskel: Pilgrim: a debugger for distributed Domain theoretic models of systems polymorphism July 1987, 19 pages, PDF September 1987, 52 pages, paper copy Abstract: Pilgrim is a source level debugger for con- UCAM-CL-TR-117 current CLU programs which execute in a distributed environment. It integrates conventional debugging fa- cilities with features for debugging remote procedure J.M. Bacon, K.G. Hamilton: calls and critical region based process interactions. Pil- Distributed computing with RPC: grim is unusual in that it functions on programs in the target environment under conditions of actual use. the Cambridge approach This has caused a trade-off between providing rich and detailed information to the programmer and avoiding October 1987, 15 pages, PDF any unwanted alteration to the computation being de- bugged. Another complication is debugging one client Abstract: The Cambridge Distributed Computing Sys- of a network server while avoiding interference with the tem (CDCS) is described and its evolution outlined. server’s other clients. A successful methodology for this The Mayflower project allowed CDCS infrastructure, case requires assistance from the server itself. services and applications to be programmed in a high level, object oriented, language, Concurrent CLU. The UCAM-CL-TR-120 Concurrent CLU RPC facility is described in detail. It is a non-transparent, type checked, type safe system which employs dynamic binding and passes objects of D. Wheeler: arbitrary graph structure. Recent extensions accomo- Block encryption date a number of languages and transport protocols. A comparison with other RPC schemes is given. November 1987, 4 pages, PDF

UCAM-CL-TR-118 Abstract: A fast and simple way of encrypting computer data is needed. The UNIX crypt is a good way of do- B.K. Boguraev, K. Sparck¨ Jones: ing this although the method is not cryptographically sound for text. The method suggested here is applied Material concerning a study of to larger blocks than the DES method which uses 64 cases bit blocks, so that the speed of encyphering is reason- able. The algorithm is designed for software rather than May 1987, 31 pages, PDF hardware. This forgoes two advantages of the crypt al- gorithm, namely that each character can be encoded Abstract: This note describes and illustrates a study of and decoded independently of other characters and that deep cases using a large sample of sentences. We have the identical process is used both for encryption and used a language analyser which builds meaning repre- decryption. However this method is better for coding sentations expressing semantic case roles; specifically blocks directly. Boguraev’s (1979) analyser, which builds dependency trees with word senses defined by semantic category UCAM-CL-TR-121 primitive formulae, and with case labels, i.e. semantic relation primitives. This note highlights the importance Jonathan Billington: of the source material for those interested in case-based representations of sentence meaning, and indicates the A high-level petri net specification of potential utility of the study results. the Cambridge Fast Ring M-access service December 1987, 31 pages, PDF

26 Abstract: Numerical Petri Nets (a high level inhibitor Abstract: This article describes the formal specification net) are used to characterise the Cambridge Fast Ring and verification of an integrated circuit which is part Hardware at a high level of abstraction. The NPN of a local area network interface. A single formal lan- model describes the service provided to users of the guage is used to describe the structure and behaviour hardware (stations, monitors, bridges and ring trans- at all levels in the design hierarchy, and an associated mission plant), known as the M-Access service defini- proof assistant is used to generate all formal proofs. tion in order to remove ambiguities and as a basis for The implementation of the circuit, described as a struc- the development and verification of the protocols using ture of gates and flip-flops, is verified via a number of the M-Access service. levels with respect to a high-level formal specification of required behaviour. The high-level formal specifica- UCAM-CL-TR-122 tion is shown to be close to precise natural language description of the circuit behaviour. John Herbert: The specification language used, HOL [Gor- don85a], has the advantage of permitting partial speci- Temporal abstraction of digital fications. It turns out that partial specification has an designs important effect on the specification and verification methodology and this is presented. We have also evalu- February 1988, 34 pages, PDF ated aspects of conventional design, such as techniques for locating errors and the use of simulation, within Abstract: Formal techniques have been used to ver- the case study of formal methods. We assert that proof ify the function of reasonably large digital devices strategies must assist error location and that simulation ([Hunt85], [Cohn87]), and also to describe and reason has a role alongside formal verification. about digital signal behaviour at a detailed timing level [Hanna85], [Herbert86]. Different models are used: UCAM-CL-TR-124 simple synchronous models of components are the basis for verifying high-level functional specifications; more detailed models which capture the behaviour of signals John Herbert: in real time are the basis of proofs about timing. The Formal verification of basic memory procedure called temporal abstraction is a technique for formally relating these two behavioural models. devices The background to temporal abstraction is pre- February 1988, 46 pages, PDF sented and the details of its implementation in HOL. The HOL language ([Gordon85a]) is a computerised version of higher-order logic which has an associated Abstract: Formal methods have been used recently to proof assistant also called HOL. In HOL one may spec- verify high-level functional specifications of digital sys- ify behaviour at both the functional and timing lev- tems. Such formal proofs have used simple models of els. This work describes how the relationship between circuit components. In this article we describe comple- these levels may also be described in HOL and reasoned mentary work which uses a more detailed model of about using the HOL system. components and demonstrates how hardware can be The formal transformation of descriptions of be- specified and verified at this level. haviour at the timing level to behaviour at the func- In this model all circuits can be described as struc- tional level involves generating and verifying timing tures of gates, each gate having an independent prop- constraints. This process can be identified with the con- agation delay. The behaviour of digital signals in real ventional design activity of timing analysis. This work time is captured closely. The function and timing of shows that timing verification can be viewed, not as a asynchronous and synchronous memory elements im- separate phase of design, but as part of a single verifica- plemented using gates is derived. Formal proofs of cor- tion process which encompasses functional and timing rectness show that, subject to certain constraints on verification. A single formal language, HOL, is used to gate delays and signal timing parameters, these de- describe all aspects of the behaviour and a single ver- vices act as memory elements and exhibit certain timing ification system provides all the proofs of correctness. properties. The use of uniform, formal techniques is shown to have All the proofs have been mechanically generated us- a number of advantages. ing Gordon’s HOL system.

UCAM-CL-TR-123 UCAM-CL-TR-125

John Herbert: Juanito Camilleri: Case study of the Cambridge Fast An operational semantics for Occam Ring ECL chip using HOL February 1988, 24 pages, PDF February 1988, 38 pages, PDF

27 Abstract: Occam is a programming language designed UCAM-CL-TR-128 to support concurrent applications, especially those im- plemented on networks of communicating processors. Robert Charles Beaumont Cooper: The aim of this paper is to formulate the meaning of the language constructs of Occam by semantic defini- Debugging concurrent and tions which are intended as a direct formalisation of the natural language descriptions usually found in pro- distributed programs gramming language manuals [Inmos 3]. This is done by February 1988, 111 pages, PDF defining a syntax directed transition system where the PhD thesis (Churchill College, December 1987) transitions associated to a phrase are a function of the transitions associated to its components. This method is Abstract: This thesis aims to make one aspect of dis- by no means novel. The concepts here were introduced tributed programming easier: debugging. The principles in [Plotkin 8] and are applied in [Plotkin 9] where an for designing and implementing an interactive debug- operational semantics for CSP [Hoare 2] was presented. ger for concurrent and distributed programs are pre- The operational semantics for a subset of Ada is de- sented. These programs are written in a high-level lan- fined in [Li 6], where tasking and exception handling guage with type-checked remote procedure calls. They are modelled. For simplicity only a subset of Occam execute on the nodes of a local computer network and is defined. Timing, priority, replicators and BYTE sub- interact with the other programs and services which ex- scription are omitted. Other features of Occam which ist on such a network. deal with the associated components of an Occam pro- The emphasis is on debugging programs in the en- gram with a set of physical resources (i.e. configura- vironment in which they will eventually operate, rather tions) are also omitted since they do not effect the se- than some simulated environment oriented specifically mantic interpretation of a program. to the needs of debugging. Thus the debugging facili- ties impose a low overhead on the program and may be UCAM-CL-TR-126 activated at any time. Ideally the actions of the debugger should be trans- M.E. Leeser: parent to the execution of the program being debugged. The difficult problem of avoiding any alteration to the Reasoning about the function and relative ordering of inter-process events is examined in timing of integrated circuits with detail. A method of breakpointing a distributed com- putation is presented which achieves a high degree of Prolog and temporal logic transparency in the face of arbitary process interactions through shared memory. February 1988, 50 pages, paper copy The problems of debugging programs that interact with network services, which are shared concurrently UCAM-CL-TR-127 with other users of the distributed environment, are examined. A range of debugging techniques, some of John Carroll, Bran Boguraev, Claire Grover, which are directly supported by the debugger, are dis- Ted Briscoe: cussed. A set of facilities for debugging remote procedure A development environment for calls is presented, and the functions required of the op- erating system kernel and runtime system to support large natural language grammars debugging are also discussed. A distributed debugger is February 1988, 44 pages, PDF itself an example of a distributed program and so is- sues such as functional distribution and authentication are addressed. Abstract: The Grammar Development Environment These ideas have been implemented in Pilgrim, a de- (GDE) is a powerful software tool designed to help a bugger for Concurrent CLU programs running under linguist or grammarian experiment with and develop the Mayflower supervisor within the Cambridge Dis- large natural language grammars. (It is also, however, tributed Computing System. being used to help teach students on courses in com- putational linguistics). This report describes the gram- matical formalism employed by the GDE, and contains UCAM-CL-TR-129 detailed instructions on how to use the system. Source code for a Common Lisp version of the soft- Jeremy Peter Bennett: ware is available from the University of Edinburgh Ar- tificial Intelligence Applications Institute. A methodology for automated design of computer instruction sets March 1988, 147 pages, PDF PhD thesis (Emmanuel College, January 1987)

28 Abstract: With semiconductor technology providing UCAM-CL-TR-131 scope for increasingly complex computer architectures, there is a need more than ever to rationalise the Karen Sparck¨ Jones: methodology behind computer design. In the 1970’s, byte stream architectures offered a rationalisation of Architecture problems in the computer design well suited to microcoded hardware. In the 1980’s, RISC technology has emerged to sim- construction of expert systems for plify computer design and permit full advantage to be document retrieval taken of very large scale integration. However, such ap- proaches achieve their aims by simplifying the problem December 1986, 28 pages, PDF to a level where it is within the comprehension of a simple human being. Such an effort is not sufficient. Abstract: The idea of an expert system front end of- There is a need to provide a methodology that takes the fering the user effective direct accessto a document re- burden of design detail away from the human designer, trieval system is an attractive one. The paper consid- leaving him free to cope with the underlying principles ers two specific approaches to the construction of such involved. an expert interface, Belkin and Brooks and their col- In this dissertation I present a methodology for the leagues’ treatment of the functions of such a front end design of computer instruction sets that is capable of based on the analysis of human intermediaries, and Pol- automation in large part, removing the drudgery of in- litt’s experimental implementation of a query formula- dividual instruction selection. The methodology does tor for searching Cancerline. The distributed expert sys- not remove the need for the designer’s skill, but rather tem model proposed by Belkin and Brooks is a plaus- allows precise refinement of his ideas to obtain an opti- able one, and Pollitt’s system can be regarded as a first mal instruction set. step towards it. But there are major problems about In developing this methodology a number of pieces this type of architecture, and the paper argues in par- of software have been designed and implemented. ticular that in seeking to develop more powerful front Compilers have been written to generate trial instruc- ends of the kind envisaged there is one important issue, tion sets. An instruction set generator program has been the nature of the language used for communication be- written and the instruction set it proposes evaluated. Fi- tween the contributing experts, that requires for atten- nally a prototype language for instruction set design has tion than it has hitherto received. been devised and implemented. UCAM-CL-TR-132 UCAM-CL-TR-130 Miriam Ellen Leeser: Lawrence C Paulson: Reasoning about the function and The foundation of a generic theorem timing of integrated circuits with prover Prolog and temporal logic March 1988, 44 pages, PDF, DVI April 1988, 151 pages, paper copy This paper is a revised version of UCAM-CL-TR-113. PhD thesis (Queens’ College, December 1987)

Abstract: Isabelle is an interactive theorem prover that UCAM-CL-TR-133 supports a variety of logics. It represents rules as propo- sitions (not as functions) and builds proofs by combin- ing rules. These operations constitute a meta-logic (or Lawrence C. Paulson: ‘logical framework’) in which the object-logics are for- malized. Isabelle is now based on higher-order logic – a A preliminary users manual for precise and well-understood foundation. Isabelle Examples illustrate use of this meta-logic to formal- ize logics and proofs. Axioms for first-order logic are May 1988, 81 pages, PDF, DVI shown sound and complete. Backwards proof is for- malized by meta-reasoning about object-level entail- Abstract: This is an early report on the theorem prover ment. Isabelle and several of its object-logics. It describes Higher-order logic has several practical advantages Isabelle’s operations, commands, data structures, and over other meta-logics. Many proof techniques are organization. This information is fairly low-level, but known, such as Huet’s higher-order unification proce- could benefit Isabelle users and implementors of other dure. systems.

29 UCAM-CL-TR-134 UCAM-CL-TR-137

Avra Cohn: F.V. Hasle: Correctness properties Mass terms and plurals: of the Viper black model: from linguistic theory to natural the second level language processing May 1988, 114 pages, paper copy June 1988, 171 pages, PDF

UCAM-CL-TR-135 Abstract: Two linguistic theories within the tradition of formal semantics are investigated. One is concerned Thomas F. Melham: with mass terms, and the other with plurals. Special attention is paid to the possibility of im- Using recursive types to reason about plementing the theories on a computer. With this goal in mind their basic ideas are examined, and the lin- hardware in higher order logic guistic implications are discussed. In the process, var- May 1988, 30 pages, PDF ious features of the theories are made formally precise. This leads to two formal systems, one for represent- ing the meanings of sentences with mass terms, and an- Abstract: The expressive power of higher order logic other similar one for plurals. The systems are specified makes it possible to define a wide variety of data types by machine-executable translation relations from frag- within the logic and to prove theorems that state the ments of natural language into logical representations. properties of these types concisely and abstractly. This The underlying model-theoretic semantics of each paper describes how such defined data types can be theory is partially axiomatised. From the axiomatisa- used to support formal reasoning in higher order logic tions all of the paradigmatic inferences of each theory about the behaviour of hardware designs. can be proved in a purely deductive manner. This is de- manstrated by a number of rigorous proofs of natural UCAM-CL-TR-136 language inferences. Finally some methodological issues are raised. Both Jeffrey J. Joyce: theories recommend a particular approach within for- mal semantics for natural language. I explore the Formal specification and verification methodological views underlying the theories, and dis- of asynchronous processes in cuss whether the authors actually follow the methods which they recommend. higher-order logic June 1988, 45 pages, PDF UCAM-CL-TR-138

Abstract: We model the interaction of a synchronous Michael Burrows, Martın´ Abadi, process with an asynchronous memory process using Roger Needham: a four-phase “handshaking” protocol. This example demonstrates the use of higher-order logic to reason Authentication: a practical study in about the behaviour of synchronous systems such as belief and action which communicate requests to asyn- chronous devices and then wait for unpredictably long June 1988, 19 pages, PDF periods until these requests are answered. We also de- scribe how our model could be revised to include some Abstract: Questions of belief and action are essential in of the detailed timing requirements found in real sys- the analysis of protocols for the authentication of prin- tems such as the M68000 microprocessor. One en- cipals in distributed computing systems. In this paper hancement uses non-determinism to model minimum we motivate, set out and exemplify a logic specifically setup times for asynchronous inputs. Experience with designed for this analysis; we show how protocols dif- this example suggests that higher-order logic may also fer subtly with respect to the required initial assump- be a suitable formalism for reasoning about more ab- tions of the participants and their final beliefs. Our stract forms of concurrency. fomalism has enabled us to isolate and express these differences in a way that was not previously possible, and it has drawn attention to features of the protocols of which we were perviously unaware. The reasoning about particular protocols has been mechanically veri- fied.

30 This paper starts with an informal account of the rather than have the latter replace the former. The re- problem, goes on to explain the formalism to be used, sult is that behavioural definitions can be simulated un- and gives examples of its application to real protocols til one is reasonably sure that the specification is cor- from the literature. The final sections deal with a formal rect. Furthermore, proving the correctness with respect semantics of the logic and conclusions. to these simulated specifications avoids the inadequa- cies of simulation where it may not be computation- UCAM-CL-TR-139 ally feasible to demonstrate correctness by exhaustive testing. Simulation here has a different purpose: to get Paul R. Manson: specifications correct as early as possible in the verifi- cation process. Its purpose is not to demonstrate the Petri net theory: a survey correctness of the implementation – this is done in the verification stage when the very same specifications that June 1988, 77 pages, PDF were simulated are proved correct. The thesis discusses the implementation of an exe- Abstract: The intense interest in concurrent (or “paral- cutable subset of the HOL logic, the version of Higher lel”) computation over the past decade has given rise to Order Logic embedded in the HOL theorem prover. It is a large number of languages for concurrent program- shown that hardware can be effectively described using ming, representing many conflicting views of concur- both relations and functions; relations being suitable rency. for abstract specification and functions being suitable The discovery that concurrent programming is sig- for execution. The difference between relational and nificantly more difficult than sequential programming functional specifications are discussed and illustrated has prompted considerable research into determining a by the verification of an n-bit adder. Techniques for ex- tractable and flexible theory of concurrency, with the ecuting functional specifications are presented and var- aim of making concurrent processing more accessible, ious optimisation strategies are shown which make the and indeed the wide variety of concurrent languages execution of the logic efficient. It is further shown that merely reflects the many different models of concur- the process of generating optimised functional defini- rency which have also been developed. tions from relational definitions can be automated. Ex- This report, therefore introduces Petri nets, dis- ample simulations of three hardware devices (a facto- cussing their behaviour, interpretation and relationship rial machine, a small computer and a communications to other models of concurrency. It defines and dis- chip) are presented. cusses several restrictions and extensions of the Petri net model, showing how they relate to basic Petri nets, UCAM-CL-TR-141 while explaining why they have been of historical im- portance. Finally it presents a survey of the analysis Roy Want: methods applied to Petri nets in general and for some of the net models introduced here. Reliable management of voice in a distributed system UCAM-CL-TR-140 July 1988, 127 pages, PDF Albert John Camilleri: PhD thesis (Churchill College, December 1987) Executing behavioural definitions in Abstract: The ubiquitous personal computer has found its way into most office environments. As a result, higher order logic widespread use of the Local Area Network (LAN) for the purposes of sharing distributed computing re- July 1988, 183 pages, PDF sources has become common. Another technology, the PhD thesis (Darwin College, February 1988) Private Automatic Branch Exchange (PABX), has ben- efited from large research and development by the tele- Abstract: Over the past few years, computer scien- phone companies. As a consequence, it is cost effective tists have been using formal verification techniques to and has widely infiltrated the office world. Its primary show the correctness of digital systems. The verification purpose is to digitised voice but, with the grow- process, however, is complicated and expensive. Even ing need for communication between computers it is proofs of simple circuits can involve thousands of logi- also being adapted to switch data. However, PABXs cal steps. Often it can be extremely difficult to find cor- are generally designed around a centralised switch in rect device specifications and it is desirable that one sets which bandwidth is permanently divided between its off to prove a correct specification from the start, rather subscribers. Computing requirements need much larger than repeatedly backtrack from the verification process bandwidths and the ability to connect to several ser- to modify the original definitions after discovering they vices at once, thus making the conventional PABX un- were incorrect or inadequate. suitable for this application. The main idea presented in the thesis is to amal- Some LAN technologies are suitable for switching gamate the techniques of simulation and verification, voice and data. The additional requirement for voice

31 is that point to point delay for network packets should constructed. Furthermore, if the reserved service traf- have a low upper-bound. The 10 Mb/s Cambridge Ring fic load is limited on each input port to a maximum of is an example of this type of network, but is relatively 80% of switch port saturation, then a maximum de- low bandwidth gives it limited application in this area. lay across the switch of the order of 100 µsecs may be Networks with larger bandwidths (up to 100 Mb/s) are guaranteed, for 99% of the reserved service traffic, re- now becoming available comercially and could support gardless of the unreserved service traffic load. a realistic population of clients requiring voice and data communication. UCAM-CL-TR-143 Transporting voice and data in the same network has two main advantages. Firstly, from a practical point Lawrence C. Paulson: of view, wiring is minimised. Secondly, applications which integrate both media are made possible, and Experience with Isabelle hence digitised voice may be controlled by client pro- grams in new and interesting ways. A generic theorem prover In addition to the new applications, the original tele- August 1988, 20 pages, PDF, DVI phony facilities must also be available. They should, at least by default, appear to work in an identical way to Abstract: The theorem prover Isabelle is described our tried and trusted impression of a telephone. How- briefly and informally. Its historical development is ever, the control and management of a network tele- traced from Edinburgh LCF to the present day. The phone is now in the domain of distributed computing. main issues are unification, quantifiers, and the rep- The voice connections between telephones are virtual resentation of inference rules. The Edinburgh Logical circuits. Control and data information can be freely Framework is also described, for a comparison with Is- mixed with voice at a network interface. The new prob- abelle. An appendix presents several Isabelle logics, in- lems that result are the management issues related to cluding set theory and Constructive Type Theory, with the distributed control of real-time media. examples of theorems. This thesis describes the issues as a distributed com- puting problem and proposes solutions, many of which UCAM-CL-TR-144 have been demonstrated in a real implementation. Par- ticular attention has been paid to the quality of ser- Juanito Camilleri: vice provided by the solutions. This amounts to the de- sign of helpful operator interfaces, flexible schemes for An operational semantics for occam the control of voice from personal workstations and, in particular, a high reliability factor for the backbone August 1988, 27 pages, PDF telephony service. This work demonstrates the advan- This is an extended version of UCAM-CL-TR-125, in tages and the practicality of integrating voice and data which we include the operational semantics of priority services within the Local Area Network. alternation.

UCAM-CL-TR-142 Abstract: Occam is a programming language designed to support concurrent applications, especially those im- plemented on networks of communicating processors. Peter Newman: The aim of this paper is to formulate the meaning of A fast packet switch for the the language constructs of Occam by semantic defini- tions which are intended as a direct formalisation of integrated services backbone network the natural language descriptions usually found in pro- gramming language manuals [Inmos 5]. This is done by July 1988, 24 pages, PDF defining a syntax directed transition system where the transitions associated to a phrase are a function of the Abstract: With the projected growth in demand for transitions associated to its components. This method is bandwidth and telecommunications services, will come by no means novel. The concepts here were introduced the reguirement for a multi-service backbone network in [Plotkin 10] and are applied in [Plotkin 11] where of far greater efficiency, capacity and flexibility than an operational semantics for CSP [Hoare 4] was pre- the ISDN is able to satisfy. This class of network has sented. The operational semantics for a subset of Ada is been termed the Broadband ISDN, and the design of defined in [Li 6], where tasking and exception handling the switching node of such a network is the subject of are modelled. For simplicity only a subset of Occam is much current research. This paper investigates one pos- defined. Timing, replicators and BYTE subscription are sible solution. The design and performance, for multi- omitted. Other features of Occam which deal with the service traffic, is presented of a fast packet switch based association of components of an Occam program with upon a non-buffered, multi-stage interconnection net- a set of physical resources (i.e. configurations) are also work. It is shown that for an implementation in current omitted since they do not effect the semantic interpre- CMOS technology, operating at 50 MHz, with tation of a program. a total traffic capacity of up to 150 Gbit/sec may be

32 UCAM-CL-TR-145 Abstract: This paper describes the use of formal meth- ods to verify a very simple microprocessor. The hi- Michael J.C. Gordon: erarchical structure of the microprocessor implemen- tation is formally specified in higher-order logic. The Mechanizing programming logics in behaviour of the microprocessor is then derived from a switch level model of MOS (Metal Oxide Semicon- higher order logic ductor) behaviour using inference rules of higher-order September 1988, 55 pages, PDF logic with assistance from a mechanical theorem prov- ing system. The complexity of the formal proof is con- Abstract: Formal reasoning about computer programs trolled by a multi-level approach based on increas- can be based directly on the semantics of the program- ingly abstract views of time and data. While tradi- ming language, or done in a special purpose logic like tional methods such as multi-level simulation may re- Hoare logic. The advantage of the first approach is that veal errors or inconsistencies, formal verification can it guarantees that the formal reasoning applies to the provide greater certainty about the correctness of a de- language being used (it is well known, for example, sign. The main difference with formal verification, and that Hoare’s assignment axiom fails to hold for most its strength, is that behaviour at one level is formally programming languages). The advantage of the second dervied from lower levels with a precise statement of approach is that the proofs can be more direct and nat- the conditions under which one level accurately models ural. lower levels. In this paper, an attempt to get the advantages of both approaches is described. The rules of Hoare logic UCAM-CL-TR-148 are mechanically derived from the semantics of a sim- ple imperative programming language (using the HOL Jonathan Billington: system). These rules form the basis for a simple pro- gram verifier in which verification conditions are gen- Extending coloured petri nets erated by LCF-style tactics whose validations use the September 1988, 82 pages, PDF derived Hoare rules. Because Hoare logic is derived, rather than postulated, it is straightforward to mix se- mantic and axiomatic reasoning. It is also straightfor- Abstract: Jensen’s Coloured Petri Nets (CP-nets) are ward to combine the constructs of Hoare logic with taken as the starting point for the development of other application-specific notations. This is briefly illus- a specification technique for complex concurrent sys- trated for various logical constructs, including termi- tems. To increase its expressive power CP-nets are ex- nation statements, VDM-style ‘relational’ correctness tended by including capacity and inhibitor functions. A specifications, weakest precondition statements and dy- class of extended CP-nets, known as P-nets, is defined namic logic formulae. that includes the capacity function and the threshold in- The theory underlying the work presented here is hibitor extension. The inhibitor extension is defined in well known. Our contribution is to propose a way of a totally symmetrical way to that of the usual pre place mechanizing this theory in a way that makes certain map (or incidence function). Thus the inhibitor and pre practical details work out smoothly. place maps may be equated by allowing a marking to be purged by a single transition occurrence, useful when specifying the abortion of various procedures. A chap- UCAM-CL-TR-146 ter is devoted to developing the theory and notation for the purging of a place’s marking or part of its marking. Thomas F. Melham: Two transformations from P-nets to CP-nets are presented and it is proved that they preserve interleav- Automating recursive type definitions ing behaviour. These are based on the notion of com- in higher order logic plementary places defined for PT-nets and involve the definition and proof of a new extended complementary September 1988, 64 pages, paper copy place invariant for CP-nets The graphical form of P-nets, known as a P-Graph, UCAM-CL-TR-147 is presented formally and draws upon the theories de- veloped for algebraic specification. Arc inscriptions are Jeffrey Joyce: multiples of tuples of terms generated by a many-sorted signature. Transition conditions are Boolean expres- Formal specification and verification sions derived from the same signature. An interpreta- tion of the P-Graph is given in terms of a corresponding of microprocessor systems P-net. The work is similar to that of Vautherin but in- September 1988, 24 pages, PDF cludes the inhibitor and capacity extension and a num- ber of significant differences. in the P-Graph concrete sets are associated with places, rather than sorts and likewise there are concrete initial marking and capacity

33 functions. Vautherin associates equations with transi- poor performance. Protection domains should be al- tions rather than the more general Boolean expressions. located only for genuine security reasons, rather than P-Graphs are useful for specification at a concrete level. at every subroutine boundary. Compilers can better en- Classes of the P-Graph, known as Many-sorted Alge- force modularity and good programming style without braic Nets and Many-sorted Predicate/Transition nets, adding the expense of security enforcement to every are defined and illustrated by a number of examples. An subroutine call. Second, the ideas of reduced instruc- extended place capacity notation is developed to allow tion set computers (RISC) can be applied to capability for the convenient representation of resource bounds in systems to simplify the operations required. The disser- the graphical form. tation identifies a minimum set of hardware functions Some communications-oriented examples are pre- needed to obtain good performance for a capability sys- sented including queues and the Demon Game of in- tem. This set is much smaller than previous research ternational standards fame. had indicated necessary. The report concludes with a discussion of future A prototype implementation of some of the capa- work. In particular, an abstract P-Graph is defined that bility features is described. The prototype was imple- is very similar to Vautherin’s Petri net-like schema, but mented on a re-microprogrammed VAX-11/730 com- including the capacity and inhibitor extensions and puter. The dissertation examines the performance and associating boolean expressions with transitions. This software compatibility implications of the new capa- will be useful for more abstract specifications (eg classes bility architecture, both in the context of conventional of communications protocols) and for their analysis. computers, such as the VAX, and in the context of RISC It is believed that this is the first coherent and formal processors. presentation of these extensions in the literature. UCAM-CL-TR-150 UCAM-CL-TR-149 Albert John Camilleri: Paul Ashley Karger: Simulation as an aid to verification Improving security and performance using the HOL theorem prover for capability systems October 1988, 23 pages, PDF October 1988, 273 pages, PDF, PostScript PhD thesis (Wolfson College, March 1988) Abstract: The HOL theorem proving system, developed by Mike Gordon at the University of Cambridge, is a Abstract: This dissertation examines two major limita- mechanism of higher order logic, primarily intended for tions of capability systems: an inability to support secu- conducting formal proofs of digital system designs. In rity policies that enforce confinement and a reputation this paper we show that hardware specifications writ- for relatively poor performance when compared with ten in HOL logic can be executed to enable simula- non-capability systems. tion as a means of supporting formal proof. Specifica- The dissertation examines why conventional capa- tions of a small microprocessor are described, showing bility systems cannot enforce confinement and proposes how HOL logic sentences can be transformed into exe- a new secure capability architecture, called SCAP, in cutable code with minimum risk of introducing incon- which confinement can be enforced. SCAP is based on sistencies. A clean and effective optimisation strategy the earlier Cambridge Capability System, CAP. The dis- is recommended to make the executable specifications sertation shows how a non-discretionary security policy practical. can be implemented on the new architecture, and how the new architecture can also be used to improve trace- UCAM-CL-TR-151 ability of access and revocation of access. The dissertation also examines how capability sys- Inderpreet-Singh Dhingra: tems are vulnerable to discretionary Trojan horse at- tacks and proposes a defence based on rules built Formalising an integrated circuit into the command-language interpreter. System-wide garbage collection, commonly used in most capabil- design style in higher order logic ity systems, is examined in the light of the non- November 1988, 195 pages, PDF discretionary security policies and found to be funda- PhD thesis (King’s College, March 1988) mentally insecure. The dissertation proposes alternative approaches to storage management to provide at least Abstract: If the activities of an integrated circuit de- some of the benefits of system-wide garbage collection, signer are examined, we find that rather than keeping but without the accompanying security problems. track of all the details, he uses simple rules of thumb Performance of capability systems is improved by which have been refined from experience. These rules two major techniques. First, the doctrine of program- of thumb are guidelines for deciding which blocks to ming generality is addressed as one major cause of use and how they are to be connected. This thesis gives

34 a formal foundation, in higher order logic, to the de- Abstract: As distributed computing systems become sign rules of a dynamic CMOS integrated circuit design widespread, the sharing of data between people using style. a large number of computers becomes more important. Correctness statements for the library of basic ele- One of the most popular ways to facilitate this shar- ments are fomulated. These statements are based on a ing is to provide a common file system, accessible by small number of definitions which define the behaviour all the machines on the network. This approach is sim- of transistors and capacitors and the necessary axiomi- ple and reasonably effective, but the performance of sation of the four valued algebra for signals. The cor- the system can degrade significantly if the number of rectness statements of large and complex circuits are machines is increased. By using a hierarchical network, then derived from the library of previously proved cor- and arranging that machines typically access files stored rectness statements, using logical inference rules instead in the same section of the network it is possible to build of rules of thumb. For example, one gate from the li- very large systems. However, there is still a limit on the brary can drive another only if its output constraints number of machines that can share a single file server are satisfied by the input constraints of the gate that it and a single network effectively. drives. In formalising the design rules, these constraints A good way to decrease network and server load is are captured as predicates and are part of the correct- to file data on client machines, so that data need ness statements of these gates. So when two gates are to not be fetched from the centralized server each time it is be connected, it is only necessary to check that the pred- accessed. This technique can improve the performance icates match. These ideas are fairly general and widely of a distributed file system and is used in a number of applicable for formalising the rules of many systems. working systems. However, caching brings with it the A number of worked examples are presented based overhead of maintaining consistency, or cache coher- on these formal techniques. Proofs are presented at var- ence. That is, each machine in the network must see the ious stages of development to show how the correctness same data in its cache, even though one machine may be statement for a device evolves and how the proof is con- modifying the data as others are reading it. The prob- structed. In particular it is demonstrated how such for- lem is to maintain consistency without dramatically in- mal techniques can help improve and sharpen the final creasing the number of messages that must be passed specifications. between machines on the network. As a major case study to test all these techniques, a Some existing file systems take a probabilistic ap- new design for a gigital phase-locked loop is presented. proach to consistency, some explicitly prevent the ac- This has been designed down to the gate level using tivities that can cause inconsistency, while others pro- the above dynamic design style, and has been described vide consistency only at the some cost in functionality and simulated using ELLA. Some of the subcomponents or performance. In this dissertation, I examine how dis- have been formally verified down to the detailed circuit tributed file systems are typically used, and the degree level while others have merely been specified without to which caching might be expected to improve perfor- formal proofs of correctness. An informal proof of cor- mance. I then describe a new file system that attempts to rectness of this device is also presented based on the cache significantly more data than other systems, pro- formal specifications of the various submodules. vides strong consistency guarantees, yet requires few additional messages for cache management. UCAM-CL-TR-152 This new file-system provides fine-grain sharing of a file concurrently open on multiple machines on the Andrew Mark Pullen: network, at the granularity of a single byte. It uses a simple system of multiple-reader, single writer locks Motion development for computer held in a centralized server to ensure cache consistency. The problem of maintaining client state in a centralized animation server are solved by using efficient data structures and November 1988, 163 pages, paper copy crash recovery techniques. PhD thesis (Churchill College, August 1987) UCAM-CL-TR-154 UCAM-CL-TR-153 I.B. Crabtree, R.S. Crouch, D.C. Moffat, N.J. Pirie, S.G. Pulman, G.D. Ritchie, Michael Burrows: B.A. Tate: Efficient data sharing A natural language interface to an December 1988, 99 pages, PDF intelligent planning system PhD thesis (Churchill College, September 1988) January 1989, 14 pages, PDF

Abstract: An intelligent planning system is an example of a software aid which, although developed by special- ists, is intended to be used by non-programmers for a

35 wide variety of tasks. There is therefore a need for a UCAM-CL-TR-157 communication medium which allows the application specialist, and the non-expert user to specify their needs Juanito Camilleri: without knowing the details of the system. This kind of system is one where the ‘mice and Introducing a priority operator to menus’ approach is unlikely to be able to provide a very CCS flexible interface since the range and type of potential queries is not predictable in advance. Clearly, therefore, January 1989, 19 pages, PDF some kind of language is a necessity here. The aim of this project is to experiment with the use of English lan- Abstract: In this paper we augment the syntax of CCS guage as the medium of communication. The kind of by introducing a priority operator. We present a syn- system we would eventually be able to build would be tax directed operational semantics of the language as a one where the user could use the planner to organise labelled transition system. A new equivalence relation some external activity, trying out alternative scenarios, which is based on Milner’s strong observational equiv- and then interact with the system during the execution alence [11] is defined and proved to be a congruence. of the resulting plans, making adjustments where nec- We also give some examples which illustrate the use of essary. the operator and emphasise the novelty of the approach used to introduce the notion prior to process algebras. UCAM-CL-TR-155 UCAM-CL-TR-158 S.G. Pulman, G.J. Russell, G.D. Ritchie, A.W. Black: Karen Sparck¨ Jones: Computational morphology of Tailoring output to the user: English What does user modelling in January 1989, 15 pages, PDF generation mean? Abstract: This paper describes an implemented com- August 1988, 21 pages, PDF puter program which uses various kinds of linguistic knowledge to analyse existing or novel word forms Abstract: This paper examines the implications for lin- in terms of their components. Three main types of guistic output generation tailored to the interactive sys- knowledge are required (for English): knowledge about tem user, of earlier analyses of the components of user spelling or phonological changes consequent upon af- modelling and of the constraints realism imposes on fixation (notice we are only dealing with isolated word modelling. Using a range of detailed examples it argues forms); knowledge about the syntactic or semantic that tailoring based only on the actual dialogue and on properties of affixation (i.e. inflexional and derivational the decision model required for the system task is quite morphology), and knowledge about the properties of adequate, and that more ambitious modelling is both the stored base forms of words (which in our case are dangerous and unnecessary. always themselves words, rather than more abstract en- tities). These three types of information are stored as UCAM-CL-TR-159 data files, represented in exactly the form a linguist might employ. These data files are then compiled by Andrew M. Pitts: the system to produce a run-time program which will analyse arbitrary word forms presented to it in a way Non-trivial power types can’t be consistent with the original linguistic description. subtypes of polymorphic types UCAM-CL-TR-156 January 1989, 12 pages, PostScript Steve Pulman: Abstract: This paper establishes a new, limitative rela- Events and VP modifiers tion between the polymorphic lambda calculus and the kind of higher-order type theory which is embodied in January 1989, 10 pages, PDF the logic of toposes. It is shown that any embedding in a Abstract: This paper concerns the anaysis of adverbial topos of the cartesian closed category of (closed) types and PP modifiers of VP suggested by Davidson, where of a model of the polymorphic lambda calculus must verbs are regarded as introducing reference to events, place the polymorphic types well away from the pow- and such modifiers are predicates of these events. Sev- ertypes σ → Ω of the topos, in the sense that σ → Ω is eral problems raised by it are described and a solution is a subtype of a polymorphic type only in the case that presented. The paper then goes on to suggest some ex- σ isempty (and hence σ → Ω is terminal). As corollar- tensions of the theory in order to be able to cope with ies we obtain strengthenings of Reynold’s result on the temporal and aspectual modification of VPs. non-existence of set-theoretic models of polymorphism.

36 UCAM-CL-TR-160 UCAM-CL-TR-163

Andrew Gordon: Ann Copestake, Karen Sparck¨ Jones: PFL+: A Kernal Scheme for Functions Inference in a natural language front I/O end for databases February 1989, 26 pages, PDF February 1989, 87 pages, PDF

Abstract: In place of the common separation of func- Abstract: This report describes the implementation and tional I/O into continuation and stream based schemes, initial testing of knowledge representation and infer- an alternative division between Data Driven and Strict- ence capabilities within a modular database front end ness Driven mechanisms for I/O is proposed. The designed for transportability. data driven mechanism determines I/O actions by the Weak Head Normal Form of programs, while strict- UCAM-CL-TR-164 ness driven I/O is based on suspensions – I/O actions are triggered when demand arises for the value of a Li Gong, David J. Wheeler: suspension during normal order reduction. The data driven and strictness driven I/O mechanisms are exem- A matrix key distribution system plified by the output list and input list, respectively, in Landin’s stream based I/O scheme. October 1988, 20 pages, PDF PFL+ is a functional I/O scheme, able to express ar- bitary I/O actions and both data driven and strictness Abstract: A new key distribution scheme is presented. driven constructs in terms of a small kernel of primi- It is based on the distinctive idea that lets each node tives. PFL+ could be added to any functional language. have a set of keys of which it shares a distinct subset It is based on Holmstrom’s¨ PFL [5], a parallel func- with every other node. This has the advantage that the tional language with embedded communication and numbers of keys that must be distributed and main- concurrency operators from CCS. PFL+ adds non-strict tained are reduced by a square root factor; moreover, communication, behaviours with results and primitives two nodes can start conversation with virtually no de- to make suspensions. lay. Two versions of the scheme are given. Their per- Examples are given of how PFL+ can dervive from formance and security analysis shows it is a practical these primitives both stream based I/O and the repre- solution to some key distribution problems. sentation of the file system as a function. UCAM-CL-TR-165 UCAM-CL-TR-161 Peter Newman: D.C.J. Matthews: Fast packet switching for integrated Papers on Poly/ML services February 1989, 150 pages, paper copy March 1989, 145 pages, paper copy PhD thesis (Wolfson College, December 1988) UCAM-CL-TR-162 UCAM-CL-TR-166 Claire Grover, Ted Briscoe, John Carroll, Bran Boguraev: Jean Bacon: The Alvey natural language tools Evolution of operating system grammar (2nd Release) structures April 1989, 90 pages, paper copy March 1989, 28 pages, PDF

Abstract: The development of structuring within oper- ating systems is reviewed and related to the simultane- ous evolution of concurrent programming languages. First traditional, multi-user systems are considered and their evolution from monolithic closed systems to gen- eral domain structured systems is traced. Hardware support for protected sharing is emphasised for this type of system.

37 The technology directed trend towards single user UCAM-CL-TR-169 workstations requires a different emphasis in system design. The requirement for protection in such systems Andrew Franklin Seaborne: is less strong than in multi-user systems and, in a single language system, may to some extent be provided by Filing in a heterogeneous network software at compile time rather than hardware at run time. Distributed systems comprising single user work- April 1989, 131 pages, PDF stations and dedicated server machines are considered PhD thesis (Churchill College, July 1987) and the special requirements for efficient implementa- tion of servers are discussed. Abstract: Heterogeneity is becoming a common feature The concepts of closed but structured and open sys- in local area networks as the variety of equipment that tem designs are helpful. It is argued that the open ap- is marketed increases. Each such system will have its proach is most suited to the requirements of single user own mix of hardware and software but it is still desir- and distributed systems. Experiences of attempting to able to be able to bring in new applications and ma- implement systems over a closed operating system base chines and integrate them with the existing equipment. are presented. Careful design is required to be able to introduce Progress towards support for heterogeneity in dis- new subsystems into the network in a manner that re- tributed systems, so that interacting components writ- duces the manpower needed. If binary compatibility ten in a range of languages may interwork and may run for application programs is achieved then new software on a variety of hardware, is presented. can be introduced without the need for source code al- The benefits of taking an object orientated view for terations. If the design of the computing environment system-level as well as language-level objects and for is correctly constructed then the introduction of new specification, generation and design of systems are dis- hardware will not require alterations or cause disrup- cussed and work in this area is described. tion to the rest of the system. An outline of formal approaches aimed at specifica- There is a reduction in the ability to share informa- tion, verification and automatic generation of software tion through files being accessible to many people and is given. from many locations when there are a number of filing Finally, design issues are summarised and conclu- systems present in the network. Ideally a single filing sions drawn. system spanning all operating systems that exist in the distributed computing environment would give maxi- mum possible sharing. UCAM-CL-TR-167 Any existing file service will provide a set of facil- ities for the construction of a name space by its client Jeffrey J. Joyce: or enforce a predefined naming structure which is not compatible with any other. This thesis describes a single A verified compiler for a verified network filing system that has been constructed by sep- microprocessor arating file storage from file naming. By introducing a directory service to manage the name space, and using March 1989, 67 pages, paper copy file servers only for file storage, the need for each client to be extended to take account of every file service is UCAM-CL-TR-168 avoided. A single network file transfer protocol allows the directory service to authenticate each request and J.M. Bacon, I.M. Leslie, R.M. Needham: allows for the introduction of new equipment with no disruption to the existing system. Distributed computing with a processor bank UCAM-CL-TR-170 April 1989, 15 pages, PDF Ursula Martin, Tobias Nipkow:

Abstract: The Cambridge Distributed Computing Sys- Ordered rewriting and confluence tem (CDCS) was designed some ten years ago and was May 1989, 18 pages, paper copy in everyday use at the Computer Laboratory until De- cember 1988. An overview of the basic design of CDCS is given, an outline of its evolution and a description UCAM-CL-TR-171 of the distributed systems research projects that were based on it. Experience has shown that a design based Jon Fairbairn: on a processor bank leads to a flexible and extensible distributed system. Some types with inclusion properties in ∀, →, µ June 1989, 10 pages, PDF

38 Abstract: This paper concerns the ∀, →, µ type system UCAM-CL-TR-176 used in the non-strict functional programming language Ponder. While the type system is akin to the types of T.J.W. Clarke: Second Order Lambda-calculus, the absence of type ap- plication makes it possible to construct types with use- Implementing aggregates in parallel ful inclusion relationships between them. To illustrate this, the paper contains definitions of functional languages a natural numbers type with many definable subtypes, August 1989, 13 pages, PDF and of a record type with inheritance. Abstract: Many constructions which are difficult to UCAM-CL-TR-172 write efficiently in pure functional languages have as Julia Rose Galliers: underlying semantics an aggregate. An aggregate is a collection of individual elements whose order does not A theoretical framework for matter, it can thus be constructed functionally using a commutative associative combining operator. Equiva- computer models of cooperative lent and more efficient implementations for aggregates dialogue, acknowledging multi-agent exist which are operational. A new construction, the A- , an aggregate specified operationally which in- conflict troduces provably local data indeterminacy, is defined. July 1989, 226 pages, paper copy Operational specification of an aggregate, in which each element is specified by a separate function call, UCAM-CL-TR-173 does not necessarily destroy referential transparency in a functional language. Aggregates defined using joins Roger William Stephen Hale: on partial orders allow early termination if an oper- ational implementation is used: Arvind’s ‘I-structures’ Programming in temporal logic and Burton’s ‘improving values’ are examples of this. July 1989, 182 pages, paper copy PhD thesis (Trinity College, October 1988) UCAM-CL-TR-177

UCAM-CL-TR-174 P.A.J. Noel: James Thomas Woodchurch Clarke: Experimenting with Isabelle in General theory relating to the ZF Set Theory implementation of concurrent September 1989, 40 pages, PDF symbolic computation Abstract: The theorem prover Isabelle has been used to August 1989, 113 pages, paper copy axiomatise ZF set theory with natural deduction and to PhD thesis (Trinity College, January 1989) prove a number of theorems concerning functions. In particular the axioms and inference rules of four the- UCAM-CL-TR-175 ories have been derived in the form of theorems of set theory. The four theories are: Lawrence C. Paulson: λ βη, a form of typed lambda calculus with equality, A formulation of the simple theory of O 0, a form of simple type theory, an intuitionistic first order theory with propositions types (for Isabelle) interpreted as the type of their proofs, August 1989, 32 pages, PDF, DVI PPλ, the underlying theory of LCF. Most of the theorems have deen derived using back- Abstract: Simple type theory is formulated for use with ward proofs, with a small amount of automation. the generic theorem prover Isabelle. This requires ex- plicit type inference rules. There are function, prod- UCAM-CL-TR-178 uct, and subset types, which may be empty. Descrip- tions (the eta-operator) introduce the Axiom of Choice. Jeffrey J. Joyce: Higher-order logic is obtained through reflection be- tween formulae and terms of type bool. Recursive types Totally verified systems: and functions can be formally constructed. Isabelle proof procedures are described. The logic linking verified software to verified appears suitable for general mathematics as well as hardware computational problems. September 1989, 25 pages, PDF

39 Abstract: We describe exploratory efforts to design and UCAM-CL-TR-181 verify a compiler for a formally verified microproces- sor as one aspect of the eventual goal of building to- Tobias Nipkow: tally verified systems. Together with a formal proof of correctness for the microprocessor this yields a precise Proof transformations for equational and rigorously established link between the semantics of the source language and the execution of compiled theories code by the fabricated microchip. We describe in par- September 1989, 17 pages, PDF ticular: (1) how the limitations of real hardware influ- enced this proof; and (2) how the general framework Abstract: This paper contrasts two kinds of proof sys- provided by higher order logic was used to formalize tems for equational theories: the standard ones ob- the compiler correctness problem for a hierarchically tained by combining the axioms with the laws of equa- structured language. tional logic, and alternative systems designed to yield decision procedures for equational problems. UCAM-CL-TR-179 Two new matching alogorithms for (among other theories) associativity, associativity + commutativity, Ursula Martin, Tobias Nipkow: and associativity + commutativity + identity are pre- sented, the emphasis is not so much on individual theo- Automating Squiggol ries but on the general method of proof transformation as a tool for showing the equivalence of different proof September 1989, 16 pages, PDF systems. After studying proof translations defined by rewrit- Abstract: The Squiggol style of program development is ing systems, equivalence tests based on the notion of shown to be readily automated using LP, an equational resolvant theories are used to derive new matching reasoning theorem prover. Higher-order functions are and in some cases unification procedures for a num- handled by currying and the introduction of an appli- ber of equational theories. Finally the combination of cation operator. We present an automated version of resolvant systems is investigated. Bird’s development of the maximum segment sum al- gorithm, and a similar treatment of a proof of the bino- UCAM-CL-TR-182 mial theorem.

UCAM-CL-TR-180 John M. Levine, Lee Fedder: The theory and implementation of Tobias Nipkow: a bidirectional question answering Formal verification of data type system refinement: October 1989, 27 pages, PDF Theory and practice Abstract: This paper describes a question answering September 1989, 31 pages, PDF system which is a limited instance of the general bidi- rectional architecture suggested by Appelt (1987), The Abstract: This paper develops two theories of data ab- novel features of our approach include the use of a lin- straction and refinement: one for applicative types, as guistically well-motivated set of functional features; a they are found in functional programming languages, bidirectional grammar which encodes these features di- and one for state-based types found in imperative lan- rectly; a question answering program which uses the guages. The former are modelled by algebraic struc- thematic organisation of the user’s input to construct a tures, the latter by automata. The automaton theoretic cooperative reply; and a tactical generation component model covers not just data types but distributed systems which can be used with Montague semantics. in general. Within each theory two examples of data refinement are presented and formally verified with the UCAM-CL-TR-183 theorem prover Isabelle. The examples are an abstract specification and two implementations of a memory system, and a mutual exclusion algorithm. Rachel Cardell-Oliver: The specification and verification of sliding window protocols in higher order logic October 1989, 25 pages, PDF

40 Abstract: This report describes the formal specification Multi-Service protocol family is to provide a com- and verification of a class of sliding window proto- plete architecture which allows use of the full facili- cols using higher order logic. It is proved that a model ties of asynchronous transfer mode networks by multi- for implementations of the protocol locically implies media applications. To maintain comparable perfor- safety and liveness invariants, and that these invariants mance with the underlying media, certain elements of in turm imply an abstract specification of the protocol. the MSN protocol stack are designed with implementa- The specification and implementation models used in tion in hardware in mind. The interconnection of het- the proof are based on techniques developed for hard- erogeneous networks, and networks belonging to dif- ware verification in HOL at Cambridge. This model ferent security and administrative domains, is consid- and proof will eventually be used as the basis for a more ered vital, so the MSN architecture takes an internet- general sliding window protocol model. working approach.

UCAM-CL-TR-184 UCAM-CL-TR-187

David Lawrence Tennenhouse: Ann Copestake, Karen Sparck¨ Jones: Site interconnection and the Natural language interfaces to exchange architecture databases September 1989, 36 pages, PostScript October 1989, 225 pages, paper copy PhD thesis (Darwin College, September 1988) Abstract: This paper reviews the state of the art in nat- ural language access to databases. This has been a long- UCAM-CL-TR-185 standing area of work in natural language processing. But though some commercial systems are now avail- Guo Qiang Zhang: able, providing front ends has proved much harder than was expected, and the necessary limitations on front Logics of domains ends have to be recognised. The paper discusses the issues, both general to language and task-specific, in- December 1989, 250 pages, paper copy volved in front end design, and the way these have PhD thesis (Trinity College, May 1989) been addressed, concentrating on the work of the last decade. The focus is on the central process of translat- UCAM-CL-TR-186 ing a natural language question into a database query, but other supporting functions are also covered. The Derek Robert McAuley: points are illustrated by the use of a single example ap- plication. The paper concludes with an evaluation of Protocol design for high speed the current state, indicating that future progress will depend on the one hand on general advances in natu- networks ral language processing, and on the other on expanding January 1990, 100 pages, PostScript the capabilities of traditional databases. PhD thesis (Fitzwilliam College, September 1989) UCAM-CL-TR-188 Abstract: Improvements in fibre optic communication and in VLSI for network switching components have Timothy E. Leonard: led to the consideration of building digital switched Specification of computer networks capable of providing point to point commu- nication in the gigabit per second range. Provision of architectures: bandwidths of this magnitude allows the consideration a survey and annotated bibliography of a whole new range of telecommunications services, integrating video, voice, image and text. These multi- January 1990, 42 pages, PDF service networks have a range of requirements not met by traditional network architectures designed for dig- Abstract: I first define and archi- ital telephony or computer applications. This disserta- tecture specification, explain how the conflict between tion describes the design, and an implementation, of the clarity and ambiguity makes writing specifications dif- Multi-Service Network architecture and protocol fam- ficult, and introduce and consider the advantages and ily, which is aimed at supporting these services. problems of formal specifications. I then survey all the Asynchronous transfer mode networks provide the literature on architecture specification, and introduce basic support required for these integrated services, and the literature on technical writing and on formal speci- the Multi-Service Network architecture is designed pri- fication in general. I close with an annotated bibliogra- marily for these types of networks. The aim of the phy.

41 UCAM-CL-TR-189 UCAM-CL-TR-191

Lawrence C. Paulson, Tobias Nipkow: Cosmos Nicolaou: Isabelle tutorial and user’s manual An architecture for real-time January 1990, 142 pages, PDF, DVI multimedia communications systems February 1990, 30 pages, PDF Abstract: This (obsolete!) manual describes how to use the theorem prover Isabelle. For beginners, it explains Abstract: An architecture for real-time multimedia how to perform simple single-step proofs in the built- communications systems is presented. A multimedia in logics. These include first-order logic, a classical se- communication systems includes both the communica- quent calculus, ZF set theory, Constructie Type Theory, tion protocols used to transport the real-time data and and higher-order logic. Each of these logics is described. also the Distributed Computing system (DCS) within The manual then explains how to develop advanced which any applications using these protocols must ex- tactics and tacticals and how to derive rules. Finally, ecute. The architecture presented attempts to integrate it describes how to define new logics within Isabelle. these protocols with the DCS in a smooth fashion in order to ease the writing of multimedia applications. UCAM-CL-TR-190 Two issues are identified as being essential to the suc- cess of this integration: namely the synchronisation of Ann Copestake: related real-time data streams, and the management of heterogeneous multimedia hardware. The synchronisa- Some notes on mass terms and tion problem is tackled by defining explicit synchroni- plurals sation properties at the presentation level and by pro- viding control and synchronisation operations within January 1990, 65 pages, PostScript the DCS which operate in terms of these properties. The heterogeneity problems are addressed by separating the Abstract: This report describes a short investigation data transport semantics (protocols themselves) from into some possible treatments of mass nouns and plu- the control semantics (protocol interfaces). The control rals. It aims to provide a grammar and axiomatisation semantics are implemented using a distributed, typed with a reasonable coverage of these phenomena, so that interface, scheme within the DCS (i.e. above the pre- a range of sentences can be parsed, and inferences made sentation layer), whilst the protocols themselves are im- automatically. plemented within the communication subsystem. The The previous work on the subject, mainly due to interface between the DCS and communications sub- Hasle (1988) is reviewed, and the limitations of both system is referred to as the orchestration interface and the original theories and Hasle’s implementation are can be considered to lie in the presentation and session demonstrated. Some more recent work, especially that layers. relevant to Link’s theory, is also discussed. A conforming prototype implementation is cur- The present grammar and axiomatisation is de- rently under construction. scribed. Although it is not the implementation of any particular theory, it draws on the work of Link, Krifka UCAM-CL-TR-192 and Roberts. Some of the problems with the present approach are discussed, although possible solutions Lawrence C. Paulson: would need to be considered in a wider context. The aim is to show what types of phenomena can be treated Designing a theorem prover by a relatively simple approach. The implemented grammar covers everything that May 1990, 57 pages, PDF, DVI was treated by Hasle’s implementation, and extends that coverage in a varietry of ways, while providing Abstract: The methods and principles of theorem a better integration of the treatment of mass nouns prover design are presented through an extended ex- and plurals than the earlier work. It was written in the ample. Starting with a sequent calculus for first-order CFG+ formalism, and some parts of the axiomatisation logic, an automatic prover (called Folderol) is devel- have been tested using the HOL system. oped. Folderol can prove quite a few complicated theo- rems, although its search strategy is crude and limited. Folderol is coded in Standard ML and consists largely of pure functions. Its complete listing is included. The report concludes with a survey of other research in theorem proving: the Boyer/Moore theorem prover, Automath, LCF, and Isabelle.

42 UCAM-CL-TR-193 UCAM-CL-TR-197

Julia Rose Galliers: Thomas Clarke: Belief revision and a theory of The semantics and implementation of communication aggregates May 1990, 30 pages, PDF or how to express concurrency without Abstract: This report concerns choices about changing belief. It describes research to establish and model a destroying determinism principled theoretical basis by which rational agents au- July 1990, 25 pages, PDF tonomously choose whether, as well as how to revise their beliefs. Aspects of the various problems in belief Abstract: This paper investigates the relationship be- revision are discussed, and solved in the context of an tween declarative semantics and concurrent computa- AI tool for reason maintenance extended to cover situa- tion. A fundamental programming construction, the ag- tions of new evidence as not assumed ‘truth’. Primarily gregate, is identified. Aggregates have a simple declar- this results from the inclusion of a non numeric the- ative semantics, yet cannot be written in pure func- ory of strength of belief, which relates strength to per- tional languages. The addition of aggregates to a func- sistence in the context of challenge. Such autonomous tional language increases expressiveness without de- belief revision is presented as the basis of a theory of stroying determinism or referential transparency. Spe- communication, as a special case of reasoning about cific aggregates can be used to implememnt concurrent change in an uncertain world with incomplete informa- graph marking, time deterministic merge of lazy lists, tion, comprising others similarly constrained. and write once locations. UCAM-CL-TR-194 UCAM-CL-TR-198 Julia Rose Galliers: Andrew M. Pitts: Proceedings of the First Belief Evaluation Logic Representation and Agent August 1990, 31 pages, PostScript Architectures Workshop March 1990, 199 pages, paper copy Abstract: A new typed, higher-order logic is described which appears particularly well fitted to reasoning about forms of computation whose operational be- UCAM-CL-TR-195 haviour can be specified using the Natural Semantics style of structural operational semantics. The logic’s un- Jeffrey J. Joyce: derlying type system is Moggi’s computational metalan- guage, which enforces a distinction between computa- Multi-level verification of tions and values via the categorical structure of a strong microprocessor-based systems monad. This is extended to a (constructive) predicate logic with modal formulas about evaluation of compu- May 1990, 163 pages, paper copy tations to values, called evaluation modalities. The cat- PhD thesis (Pembroke College, December 1989) egorical structure corresponding to this kind of logic is explained and a couple of examples of categorical mod- UCAM-CL-TR-196 els given. As a first example of the naturalness and applicabil- John Peter Van Tassell: ity of this new logic to program semantics, we investi- gate the translation of a (tiny) fragment of Standard ML The semantics of VHDL with Val and into a theory over the logic, which is proved computa- tionally adequate for ML’s Natural Semantics. Whilst Hol: it is tiny, the ML fragment does however contain both towards practical verification tools higher-order functional and imperative features, about which the logic allows us to reason without having to June 1990, 77 pages, paper copy mention global states explicitly.

43 UCAM-CL-TR-199 Abstract: Recent advances in microelectronics have given designers of digital hardware the potential to Richard Boulton, Mike Gordon, build devices of remarkable size and complexity. Along John Herbert, John Van Tassel: with this however, it becomes increasingly difficult to ensure that such systems are free from design errors, The HOL verification of ELLA where complete simulation of even moderately sized designs circuits is impossible. One solution to these problems is that of hardware verification, where the functional August 1990, 22 pages, PostScript behaviour of the hardware is described mathematically and formal proof is used to show that the design meets Abstract: HOL is a public domain system for gener- rigorous specifications of the intended operation. ating proofs in higher order predicate calculus. It has This dissertation therefore seeks to develop this, been in experimental and commercial use in several showing how reasoning about the correctness of hard- countries for a number of years. ware using formal proof can be achieved using fun- ELLA is a hardware design language developed at damental abstraction mechanisms to relate specifica- the Royal Signals and Radar Establishment (RSRE) and tions of hardware at different levels. Therefore a sys- marketed by Computer General Electronic Design. It tematic method is described for defining any instance of supports simulation models at a variety of different ab- a wide class of concrete data types in higher order logic. straction levels. This process has been automated in the HOL theorem A preliminary methodology for reasoning about prover, and provides a firm logical basis for represent- ELLA designs using HOL is described. Our approach is ing data in formal specifications. to semantically embed a subset of the ELLA language Further, these abstractions have been developed into in higher order logic, and then to make this embed- a new technique for modelling the behaviour of entire ding convenient to use with parsers and pretty-printers. classes of hardware designs. This is based on a for- There are a number of semantic issues that may affect mal representation in logic for the structure of circuit the ease of verification. We discuss some of these briefly. designs using the recursive types defined by the above We also give a simple example to illustrate the method- method. Two detailed examples are presented showing ology. how this work can be applied in practice. Finally, some techniques for temporal abstraction UCAM-CL-TR-200 are explained, and the means for asserting the correct- Tobias Nipkow, Gregor Snelting: ness of a model containing time-dependent behaviour is described. This work is then illustrated using a case Type classes and overloading study; the formal verification on HOL of a simple ring communication network. resolution via order-sorted unification [Abstract by Nicholas Cutler (librarian), as none August 1990, 16 pages, PDF was submitted with the report.]

Abstract: We present a type inference algorithm for UCAM-CL-TR-202 a haskell-like language based on order-sorted unifica- tion. The language features polymorphism, overload- ing, type classes and multiple inheritance. Class and in- Andrew Charles Harter: stance declarations give rise to an order-sorted algebra Three-dimensional integrated circuit of types. Type inference esentially reduces to the Hind- ley/Milner algorithm where unification takes place in layout this order-sorted algebra of types. The theory of order- sorted unification provides simple sufficient conditions August 1990, 179 pages, paper copy which ensure the existence of principal types. The se- PhD thesis (Corpus Christi College, April 1990) mantics of the language is given by a translation into ordinary λ-calculus. We prove the correctness of our UCAM-CL-TR-203 type inference algorithm with respect to this semantics. Valeria C.V. de Paiva: UCAM-CL-TR-201 Subtyping in Ponder Thomas Frederick Melham: (preliminary report) Formalizing abstraction mechanisms August 1990, 35 pages, PDF for hardware verification in higher order logic Abstract: This note starts the formal study of the type system of the functional language Ponder. Some of the August 1990, 233 pages, PDF problems of proving soundness and completeness are PhD thesis (Gonville & Caius College, August 1989)

44 discussed and some preliminary results, about frag- UCAM-CL-TR-206 ments of the type system, shown. It consists of 6 sections. In section 1 we review Rachel Cardell-Oliver: briefly Ponder’s syntax and describe its typing system. In section 2 we consider a very restricted fragment of Formal verification of real-time the language for which we can prove soundness of the type inference mechanism, but not completeness. protocols using higher order logic Section 3 describes possible models of this fragment August 1990, 36 pages, PDF and some related work. Section 4 describes the type- inference algorithm for a larger fragment of Ponder and Abstract: A protocol is a distributed program which in section 5 we come up against some problematic ex- controls communication between machines in a com- amples. Section 6 is a summary of further work. puter network. Two or more programs are executed on different computers which communicate only via the UCAM-CL-TR-204 medium connecting them. Protocol implementations are difficult to under- Roy L. Crole, Andrew M. Pitts: stand and write correctly because the interaction be- tween programs and their non-deterministic, real-time New foundations for fixpoint environment is complex. For this reason protocols are computations: FIX-hyperdoctrines often specified using an abstract model. However few abstract specification techniques model the problems and the FIX-logic which occur in real implementations. In particular, the correctness of many protocols depends on real-time is- August 1990, 37 pages, PostScript sues such as the correct setting of timers and fast re- sponses to incoming messages. Abstract: This paper introduces a new higher-order This paper presents techniques for modelling real- typed constructive predicate logic for fixpoint computa- time protocols at different levels of abstraction, from tions, which exploits the categorical semantics of com- implementation behaviour to abstract requirements putations introduced by Moggi and contains a strong specifications. The language used for these models is version of Martin Lof’s¨ ‘iteration type’. The type sys- higher order logic. The techniques are illustrated by the tem enforces a separation of computations from values. specification and verification of the class of sliding win- The logic contains a novel form of fixpoint induction dow protocols. The HOL system, a machine implemen- and can express partial and total correctness statements tation of higher order logic [2], as used to both specify about evaluation of computations to values. The con- and verify this example and a full listing of the HOL structive nature of the logic is witnessed by strong met- theories for sliding window protocols is given in Ap- alogical properties which are proved using a category- pendix B. theoretic version of the ‘logical relations’ method. UCAM-CL-TR-207 UCAM-CL-TR-205 Stuart Philip Hawkins: Lawrence C. Paulson, Andrew W. Smith: Video replay in computer animation Logic programming, functional programming and inductive October 1990, 161 pages, paper copy PhD thesis (Queens’ College, December 1989) definitions 29 pages, PDF, DVI UCAM-CL-TR-208

Abstract: This paper reports an attempt to combine Eike Ritter: logic and functional programming. It also questions the traditional view that logic programming is a form of Categorical combinators for the first-order logic, arguing instead that the essential na- calculus of constructions ture of a logic program is an inductive definition. This revised view of logic programming suggests the design October 1990, 43 pages, paper copy of a combined logic/functional language. A slow but working prototype is described.

45 UCAM-CL-TR-209 are partially ordered and classify types, thus giving rise to an order-sorted algebra of types. Type classes in the Andrew William Moore: functional language Haskell can be understood as sorts in this sense. Sufficient conditions on the sort structure Efficient memory-based learning for to ensure the existence of principal types are discussed. Finally we suggest a new type system for the λ-calculus robot control which may pave the way to a complete unification al- November 1990, 248 pages, PDF gorithm for polymorphic terms. PhD thesis (Trinity Hall, October 1990) UCAM-CL-TR-211 Abstract: This dissertation is about the application of machine learning to robot control. A system which has Karen Sparck¨ Jones: no initial model of the robot/world dynamics should be able to construct such a model using data received The role of artificial intelligence in through its sensors—an approach which is formalized information retrieval here as the SAB (State-Action-Behaviour) control cycle. A method of learning is presented in which all the expe- November 1990, 13 pages, PDF riences in the lifetime of the robot are explicitly remem- bered. The experiences are stored in a manner which Abstract: This paper reviews four potential roles for ar- permits fast recall of the closest previous experience to tificial intelligence in information retrieval, evaluating any new situation, thus permitting very quick predic- AI from a realistic point of view and within a wide in- tions of the effects of proposed actions and, given a goal formation management context. The conclusion is that behaviour, permitting fast generation of a candidate ac- AI has limited potential, not just because AI is itself tion. The learning can take place in high-dimensional insufficiently developed, but because many informa- non-linear control spaces with real-valued ranges of tion management tasks are properly shallow informa- variables. Furthermore, the method avoids a number tion processing ones. There is nevertheless an impor- of shortcomings of earlier learning methods in which tant place for specific applications of AI or AI-derived the controller can become trapped in inadequate perfor- technology when particular constraints can be placed mance which does not improve. Also considered is how on the information management tasks involved. the system is made resistant to noisy inputs and how it adapts to environmental changes. A well founded UCAM-CL-TR-212 mechanism for choosing actions is introduced which solves the experiment/perform dilemma for this domain with adequate computational efficiency, and with fast K.L. Wrench: convergence to the goal behaviour. The dissertation ex- A distributed and-or parallel Prolog plains in detail how the SAB control cycle can be in- tegrated into both low and high complexity tasks. The network methods and algorithms are evaluated with numerous experiments using both real and simulated robot do- December 1990, 82 pages, PDF mains. The final experiment also illustrates how a com- pound learning task can be structured into a hierarchy Abstract: A model is proposed for the parallel exe- of simple learning tasks. cution of Prolog, exploiting both dependent and- and full or-parallelism. The model is implemented on a dis- UCAM-CL-TR-210 tributed network of loosely-coupled processors and has no need of shared memory nor multiprocessor hard- ware. Tobias Nipkow: Known as APPNet, the model makes use of ora- Higher-order unification, cles to partition the search space dynamically, thereby enabling processing elements to be allocated a unique polymorphism, and subsorts portion of the computation. No communication takes place between processing elements. In executing prob- 15 pages, PDF lems that do not exhibit any and-parallelism, all solu- tions found represent final answers to the query. When Abstract: This paper analyses the problems that arise an and-parallel problem is executed, the solutions gen- in extending Huet’s higher-order unification algorithm erated are only partial solutions. The sets of partial so- from the simply typed λ-calculus to one with type vari- lution are then joined to produce consistent final so- ables. A simple, incomplete, but in practice very use- lutions. Back-unification is the process whereby partial ful extension to Huet’s algorithm is discussed. This ex- solutions are unified according to a template derived tension takes an abstract view of types. As a particu- from the program. lar instance we explore a type system with ML-style polymorphism enriched with a notion of sorts. Sorts

46 Prolog source programs need not be modified by the In the last chapter a comonad and a monad are de- user. Static analysis is, however, carried out automati- fined to model the exponentials “!” and “?”. To de- cally on all programs by a preprocessor before their ex- fine these endofunctors, we use Beck’s distributive laws ecution in the APPNet to ensure that clauses are not dis- in an interesting way. Finally, we show that the Kleisli tributed before it is feasible to do so. Side-effecting con- category GC! is cartesian closed and that the categories structs are identified and the appropriate restrictions DC and GC are related by a Kleisli construction. are placed on the parallel execution strategy. UCAM-CL-TR-214 UCAM-CL-TR-213 J.A. Bradshaw, R.M. Young: Valeria Correa Vaz de Paiva: Integrating knowledge of purpose The Dialectica categories and knowledge of structure for January 1991, 82 pages, PDF design evaluation PhD thesis (Lucy Cavendish College, November 1988) February 1991, 20 pages, PDF Abstract: This work consists of two main parts. The first one, which gives it its name, presents an internal Abstract: This paper describes a knowledge represen- categorical version of Godel’s¨ “Dialectica interpreta- tation strategy, for mechanical devices, which com- tion” of higher-order arithmetic. The idea is to anal- bines Knowledge of Structure and Knowledge of Pur- yse the Dialectica interpretation using a cetegory DC pose. Knowledge of Purpose specifies how devices are where objects are relations on objects of a basic cate- expected to behave and Knowledge of Structure de- gory C and maps are pairs of maps of C satisfying a tails how devices are connected. Knowing ‘correct’ be- pullback condition. If C is finitely complete, DC exists haviour (Knowledge of Purpose) it is possible to use- and has a very natural symmetric monoidal structure. fully comment on any generated behaviour, predicted If C is locally cartesian closed then DC is symmetric or actual. Generation of behaviour is a bottom up pro- monoidal closed. If we assume C with stable and dis- cess (from components to systems) whereas behaviour joint coproducts, DC has cartesian products and weak- evaluation is top down (from systems to components). coproducts and satisfies a weak form of distributivity. Common purpose is used to group devices into systems. Using the structure above, DC is a categorical model The core evaluation activity is the generation of an for intuitionistic linear logic. envisionment graph (similar to that described by deK- Moreover if C has free monoids then DC has cofree leer and Brown [deK84]). The complete graph repre- comonoids and the corresponding comonad “!” on sents the full set of predicted behaviour states for the DC, which has some special properties, can be used represented device. These behaviour states are com- to model the exponential “of course!” in Intuitionis- pared with the Knowledge of Purpose behaviour de- tic Linear Logic. The category of “!”-coalgebras is iso- scriptions; if conflicts are found then these are described morphic to the category of comonoids in DC and, if and the structure and purpose descriptions of the de- we assume commutative monoids in C, the “!”-Kleisli vice are scanned to establish the source of the conflict. category, which is cartesian closed, corresponds to the The ideas discussed in this paper are implemented in Diller-Nahm variant of the Dialectica interpretation. the Doris system which is described. The second part introduces the categories GC. The objects of GC are the same objects of DC, but mor- UCAM-CL-TR-215 phisms are easier to handle, since they are maps in C in opposite directions. If C is finitely complete, the cat- Paul Curzon: egory GC exists. If C is cartesian closed, we can de- fine a symmetric monoidal structure and if C is locally A structured approach to the cartesian closed as well, we can define inernal homs verification of low level microcode in GC that make it a symmetric monoidal closed cate- gory. Supposing C with stable and disjoint coproducts, 265 pages, PDF we can define cartesian products and coproducts in GC PhD thesis (Christ’s College, May 1990) and, more interesting, we can define a dual operation to the tensor product bifunctor, called “par”. The oper- Abstract: Errors in microprograms are especially se- ation “par” is a bifunctor and has a unit “⊥”, which is rious since all higher level programs on the machine a dualising object. Using the internal hom and ⊥ we de- depend on the microcode. Formal verification presents fine a contravariant functor “(−)⊥” which behaves like one avenue which may be used to discover such errors. negation and thus it is used to model linear negation. Previous systems which have been used for formally We show that the category GC, with all the structure verifying microcode may be categorised by the form in above, is a categorical model for Linear Logic, but not which the microcode is supplied. Some demand that it exactly the classical one. be written in a high level microprogramming language. Conventional software verification techniques are then

47 applied. Other methods allow the microcode to be sup- UCAM-CL-TR-218 plied in the form of a memory image. It is treated as data to an interpreter modelling the behaviour of the Tobias Nipkow: . The proof is then performed by sym- bolic execution. A third solution is for the code to be Higher-order critical pairs supplied in an and modelled at that level. The assembler instructions are converted to com- April 1991, 15 pages, PDF mands in a modelling language. The resulting program is verified using traditional software verification tech- Abstract: We consider rewrite systems over simply niques. typed λ-terms with restricted left-hand sides. This gives In this dissertation I present a new universal micro- rise to a one-step reduction relation whose transitive, program verification system. It achieves many of the ad- reflexive and symmetric closure coincides with equality. vantages of the other kinds of systems by adopting a hy- The main result of this paper is a decidable confluence brid approach. The microcode is supplied as a memory criterion which extends the well-known critical pairs to image, but it is transformed by the system to a high level a higher-order setting. Several applications to typed λ- program which may be verified using standard soft- calculi and proof theory are shown. ware verification techniques. The structure of the high level program is obtained from user supplied documen- UCAM-CL-TR-219 tation. I show that this allows microcode to be split into small, independently validatable portions even when it Ian M. Leslie, Derek M. McAuley, was not written in that way. I also demonstrate that Mark Hayter, Richard Black, Reto Beller, the techniques allow the complexity of detail due to the underlying microarchitecture to be controlled at an Peter Newman, Matthew Doar: early stage in the validation process. I suggest that the Fairisle project working documents system described would combine well with other vali- dation tools and provide help throughout the firmware Snapshot 1 development cycle. Two case studies are given. The first describes the verification of Gordon’s computer. This March 1991, 56 pages, PDF example being fairly simple, provides a good illustra- tion of the techniques used by the system. The second Abstract: This report contains the current versions case study is concerned with the High Level Hardware of the documents associated with the fairisle project. Orion computer which is a commercially produced ma- These include both papers and draft documents. This chine with a fairly complex microarchitecture. This ex- collection of documents was made on March 21, ample shows that the techniques scale well to produc- 1991. Updated versions will be issued with later snap- tion . shot numbers which will replace earlier versions. The present collection includes the following documents: UCAM-CL-TR-216 Fairisle: Network architecture and components / Ian Leslie and Derek McAuley. Fairisle port controller: design and ideas / Mark Carole Susan Klein: Hayter and Richard Black. Exploiting OR-parallelism in Prolog Fairisle VME interface (draft) / Reto Beeler. A Slotted ring copy fabric for a multicast fast packet using multiple sequential machines switch / Peter Newman and Matthew Doar. Universal Fairisle connector (proposed) 250 pages, paper copy PhD thesis (Wolfson College, October 1989) UCAM-CL-TR-220 UCAM-CL-TR-217 Cosmos Andrea Nicolaou: Bhaskar Ramanathan Harita: A distributed architecture for Dynamic bandwidth management multimedia communication systems 160 pages, paper copy 192 pages, paper copy PhD thesis (Wolfson College, October 1990) PhD thesis (Christ’s College, December 1990)

48 UCAM-CL-TR-221 products of this were fed into subsidiary stages of anal- ysis to provide an assessment of the activity of the var- Robert Milne: ious discourse entities within each text. A concurrent process examined the occurrence of orthographically Transforming axioms for data types identical noun phrase forms. Appendices give the ten texts, a complete specification of the version of the fo- into sequential programs cusing algorithm in use, and the full experimental re- 44 pages, PDF sults. These suggest, especially when the brevity of the test texts is taken into account, that the type of informa- Abstract: A process is proposed for refining specifica- tion given by focusing has potential but limited value tions of abstract data types into efficient sequential im- for summarising. plementations. The process needs little manual inter- vention. It is split into three stages, not all of which UCAM-CL-TR-224 need always be carried out. The three stages entail in- Ted Briscoe, John Carroll: terpreting equalities as behavioural equivalences, con- verting functions into procedures and replacing axioms Generalised probabilistic LR parsing by programs. The stages can be performed as automatic transformations which are certain to produce results of natural language (corpora) that meet the specifications, provided that simple con- with unification-based grammars ditions hold. These conditions describe the adequacy of the specifications, the freedom from interference be- 45 pages, paper copy tween the procedures, and the mode of construction of the procedures. Sufficient versions of these conditions UCAM-CL-TR-225 can be checked automatically. Varying the conditions Valeria de Paiva: could produce implementations for different classes of specification. Though the transformations could be au- Categorical multirelations, tomated, the intermediate results, in styles of specifica- tion which cover both functions and procedures, have linear logic and petri nets interest in their own right and may be particularly ap- (draft) propriate to object-oriented design. May 1991, 29 pages, PDF UCAM-CL-TR-222 Abstract: This note presents a categorical treatment of multirelations, which is, in a loose sense a generalisa- Jonathan Billington: tion of both our previous work on the categories GC, and of Chu’s construction A NC [Barr’79]. The main Extensions to coloured petri nets and motivation for writing this note was the utilisation of their application to protocols the category GC by Brown and Gurr [BG90] to model Petri nets. We wanted to extend their work to deal 190 pages, paper copy with multirelations, as Petri nets are usually modelled PhD thesis (Clare Hall, May 1990) using multirelations pre and post. That proved easy enough and people interested mainly in concurrency UCAM-CL-TR-223 theory should refer to our joint work [BGdP’91], this note deals with the mathematics underlying [BGdP’91]. The upshot of this work is that we build a model of In- Philip Gladwin, Stephen Pulman, tuitionistic Linear Logic (without modalities) over any Karen Sparck¨ Jones: symmetric monoidal category C with a distinguished object (N, ≤, ◦, e −◦) – a closed poset. Moreover, if Shallow processing and the category C is cartesian closed with free monoids, automatic summarising: we build a model of Intuitionistic Linear Logic with a a first study non-trivial modality ‘!’ over it. May 1991, 65 pages, PDF UCAM-CL-TR-226 Kwok-yan Lam: Abstract: This report describes a study of ten simple texts, investigating various discourse phenomena to see A new approach for improving how they might be exploited, in shallow text process- ing, for summarising purposes. The processing involved system availability was a simulation of automatic analysis which is in prin- June 1991, 108 pages, paper copy ciple within reach of the state of the art. Each text was PhD thesis (Churchill College, January 1991) treated by a version of Sidner’s focusing algorithm. The

49 UCAM-CL-TR-227 UCAM-CL-TR-232

Juanito Albert Camilleri: Francisco Corella: Priority in process calculi Mechanising set theory June 1991, 203 pages, paper copy July 1991, 217 pages, PDF PhD thesis (Trinity College, October 1990) PhD thesis (Corpus Christi College, June 1989)

Abstract: Set theory is today the standard foundation UCAM-CL-TR-228 of mathematics, but most proof development sysems (PDS) are based on type theory rather than set theory. Mark Hayter, Derek McAuley: This is due in part to the difficulty of reducing the rich mathematical vocabulary to the economical vocabulary The desk area network of the set theory. It is known how to do this in principle, May 1991, 11 pages, PostScript but traditional explanations of mathematical notations in set theoretic terms do not lead themselves easily to Abstract: A novel architecture for use within an end mechanical treatment. computing system is described. This attempts to extend We advocate the representation of mathematical the concepts used in modern high speed networks into notations in a formal system consisting of the ax- computer system design. A multimedia workstation is ioms of any version of ordinary set theory, such as being built based on this concept to evaluate the ap- ZF, but within the framework of higher-order logic proach. with λ-conversion (H.O.L.) rather than first-order logic (F.O.L.). In this system each notation can be repre- sented by a constant, which has a higher-order type UCAM-CL-TR-229 when the notation binds variables. The meaning of the notation is given by an axiom which defines the repre- David J. Brown: senting constant, and the correspondence between the ordinary syntax of the notation and its representation Abstraction of image and pixel in the formal language is specified by a rewrite rule. The The thistle display system collection of rewrite rules comprises a rewriting system of a kind which is computationally well behaved. August 1991, 197 pages, paper copy The formal system is justified by the fact than set PhD thesis (St John’s College, February 1991) theory within H.O.L. is a conservative extension of set theory within F.O.L. Besides facilitating the represen- UCAM-CL-TR-230 tation of notations, the formal system is of interestbe- cause it permits the use of mathematical methods which J. Galliers: do not seem to be available in set theory within F.O.L. A PDS, called Watson, has been built to demon- Proceedings of the Second strate this approach to the mechanization of mathe- matics. Watson embodies a methodology for interactive Belief Representation and proof which provides both flexibility of use and a rela- Agent Architectures Workshop tive guarantee of correctness. Results and proofs can be saved, and can be perused and modified with an ordi- (BRAA ’91) nary text editor. The user can specify his own notations August 1991, 255 pages, paper copy as rewrite rules and adapt the mix of notations to suit the problem at hand; it is easy to switch from one set of notations to another. As a case study, Watson has been UCAM-CL-TR-231 used to prove the correctness of a latch implemented as two cross-coupled nor-gates, with an approximation of Raphael Yahalom: time as a continuum.

Managing the order of transactions in UCAM-CL-TR-233 widely-distributed data systems John Carroll, Ted Briscoe, Claire Grover: August 1991, 133 pages, paper copy PhD thesis (Jesus College, October 1990) A development environment for large natural language grammars July 1991, 65 pages, paper copy

50 UCAM-CL-TR-234 UCAM-CL-TR-238

Karen Sparck¨ Jones: Ted Briscoe, Ann Copestake, Two tutorial papers: Valeria de Paiva: Information retrieval & Thesaurus Proceedings of the ACQUILEX August 1991, 31 pages, PDF Workshop on Default Inheritance in the lexicon Abstract: The first paper describes the characteristics of information retrieval from documents or texts, the October 1991, 180 pages, paper copy development and status of automatic indexing and re- trieval, and the actual and potential relations between UCAM-CL-TR-239 information retrieval and artificial intelligence. The sec- ond paper discusses the properties, construction and ac- Mark Thomas Maybury: tual and potential uses of thesauri, as semantic classifi- cations or terminological knowledge bases, in informa- Planning multisentential English text tion retrieval and natural language processing. using communicative acts UCAM-CL-TR-235 December 1991, 329 pages, PDF PhD thesis (Wolfson College, July 1991) Heng Wang: Abstract: The goal of this research is to develop expla- Modelling and image generation nation presentation mechanisms for knowledge based systems which enable them to define domain terminol- 145 pages, paper copy ogy and concepts, narrate events, elucidate plans, pro- PhD thesis (St John’s College, July 1991) cesses, or propositions and argue to support a claim or advocate action. This requires the development of de- UCAM-CL-TR-236 vices which select, structure, order and then linguisti- cally realize explanation content as coherent and cohe- John Anthony Bradshaw: sive English text. With the goal of identifying generic explanation pre- Using knowledge of purpose and sentation strategies, a wide range of naturally occurring texts were analyzed with respect to their communica- knowledge of structure as a basis tive structure, function, content and intended effects on for evaluating the behaviour of the reader. This motivated an integrated theory of com- municative acts which characterizes text at the level mechanical systems of rhetorical acts (e.g. describe, define, narrate), illo- 153 pages, paper copy cutionary acts (e.g. inform, request), and locutionary PhD thesis (Gonville & Caius College, June 1991) acts (ask, command). Taken as a whole, the identified communicative acts characterize the structure, content and intended effects of four types of text: description, UCAM-CL-TR-237 narration, exposition, argument. These text types have distinct effects such as getting the reader to know about Derek G. Bridge: entities, to know about events, to understand plans, processes, or propositions, or to believe propositions or Computing presuppositions in an want to perform actions. In addition to identifying the incremantal language processing communicative function and effect of text at multiple levels of abstraction, this dissertation details a tripartite system theory of focus of attention (discourse focus, temporal 212 pages, paper copy focus and spatial focus) which constrains the planning PhD thesis (Wolfson College, April 1991) and linguistic realization of text. To test the integrated theory of communicative acts and tripartite theory of focus of attention, a text gener- ation system TEXPLAN (Textual EXplanation PLAN- ner) was implemented that plans and linguistically re- alizes multisentential and multiparagraph explanations from knowledge based systems. The communicative acts identified during text analysis were formalized over sixty compositional and (in some cases) recursive plan

51 operators in the library of a hierarchical planner. Dis- December 1991, 204 pages, paper copy course, temporal and spatial models were implemented PhD thesis (Wolfson College, November 1991) to track and use attentional information to guide the organization and realization of text. Because the plan UCAM-CL-TR-242 operators distinguish between the communicative func- tion (e.g. argue for a proposition) and the expected ef- Glenford Ezra Mapp: fect (e.g. the reader believes the proposition) of commu- An object-oriented approach to nicative acts, the system is able to construct a discourse model of the structure and function of its textual re- management sponses as well as a user model of the expected effects January 1992, 150 pages, PDF of its responses on the reader’s knowledge, beliefs, and PhD thesis (Clare Hall, September 1991) desires. The system uses both the discourse model and user model to guide subsequent utterances. To test its Abstract: Advances in computer technology are being generality, the system was interfaced to a variety of do- pooled together to form a new computing environment main applications including a neuropsychological diag- which is characterised by powerful workstations with nosis system, a mission planning system, and a knowl- vast amounts of memory connected to high speed net- edge based mission simulator. The system produces de- works. This environment will provide a large num- scriptions, narratives, expositions and arguments from ber of diverse services such as multimedia communi- these applications, thus exhibiting a broader ranger of cations, expert systems and object-oriented databases. rhetorical coverage then previous text generation sys- In order to develop these complex applications in an tems. efficient manner, new interfaces are required which are simple, fast and flexible and allow the programmer to UCAM-CL-TR-240 use an object-oriented approach throughout the design and implementation of an application. Virtual memory Juanito Camilleri: techniques are increasingly being used to build these new facilities. Symbolic compilation and In addition since CPU speeds continue to increase faster than disk speeds, an I/O bottleneck may develop execution of programs by proof: in which the CPU may be idle for long periods wait- a case study in HOL ing for paging requests to be satisfied. To overcome this problem it is necessary to develop new paging algo- December 1991, 31 pages, PDF rithms that better reflect how different objects are used. Thus a facility to page objects on a per-object basis is Abstract: This paper illustrates the symbolic compi- required and a testbed is also needed to obtain experi- lation and execution of programs by proof using the mental data on the paging activity of different objects. proof assistant HOL. We formalise the operational se- Virtual memory techniques, previously only used in mantics of an Occam-like programming language oc mainframe and minicomputer architectures, are being and show how synchronous communication in oc com- employed in the memory management units of mod- piles to an intermediate programming language Safe, ern microprocessors. With very large address spaces be- whose compilation yields instructions intended to drive coming a standard feature of most systems, the use of machines that communicate via shared memory. We memory mapping is seen as an effective way of provid- show how the symbolic formal manipulation of terms ing greater flexibility as well as improved system effi- of a programming language, subject to the definition ciency. of its semantics, can animate a desired effect — be it This thesis presents an object-oriented interface for compilation or execution. Needless to say, such com- memory mapped objects. Each object has a designated pilation and execution by proof is rather slow, but it object type. Handles are associated with different ob- is fast enough to give vital feedback about the compi- ject types and the interface allows users to define and lation algorithm being used. Without such animation manage new object types. Moving data between the it is hard to anticipate whether the compilation algo- object and its backing store is done by user-level pro- rithm is reasonable before attempting to verify it. This cesses called object managers. Object managers inter- is particularly true when attempting to find a plausi- act with the kernel via a specified interface thus al- ble handshaking protocol that implements synchronous lowing users to build their own object managers. A communication. framework to compare different algorithms was also developed and an experimental testbed was designed to UCAM-CL-TR-241 gather and analyse data on the paging activity of vari- ous programs. Using the testbed, conventional paging algorithms were applied to different types of objects Thomas Ulrich Vogel: and the results were compared. New paging algorithms Learning in large state spaces with an were designed and implemented for objects that are ac- cessed in a highly sequential manner. application to biped robot walking

52 UCAM-CL-TR-243 Abstract: Digital network technology is now capable of supporting the bandwidth requirements of diverse ap- Alison Cawsey, Julia Galliers, Steven Reece, plications such as voice, video and data (so called multi- Karen Sparck¨ Jones: service traffic). Some media, for example voice, have specific transmission requirements regarding the max- Automating the librarian: imum packet delay and loss which they can tolerate. Problems arise when attempting to multiplex such traf- a fundamental approach using belief fic over a single channel. Traditional digital networks revision based on the Packet- (PTM) and Synchronous- (STM) Transfer Modes prove unsuitable due to their me- January 1992, 39 pages, PDF dia access contention and inflexible bandwidth alloca- tion properties respectively. The Asynchronous Trans- Abstract: This paper describes a current research fer Mode (STM) has been proposed as a compromise project investigating belief revision in intelligent sys- between the PTM and STM techniques. The current tems by modelling the librarian in interaction with a state of multimedia research suggests that a significant literature-seeking user. The work is designed to both amount of multi-service traffic will be handled by com- test a theory of agent behaviour based on belief revi- puter operating systems. Unfortunately conventional sion proposed by Galliers, and to evaluate a model of operating systems are largely unsuited to such a task. the librarian developed by Belkin, Brooks and Daniels, This dissertation is concerned with the system organi- through computational implementation. Agent com- sation necessary in order to extend the benefits of ATM munication is seen as motivated by and motivating be- networking through the endpoint operating system and lief changes, where belief revision is determined by co- up to the application level. A locally developed micro- herence, combining endorsement, connectivity and con- kernel, with ATM network protocol support, has been servatism. The librarian is viewed as a distributed ex- used as a testbed for the ideas presented. Practical re- pert system with many individual specialised functions sults over prototype ATM networks, including the 512 operating in particular belief domains. The paper de- MHz Cambridge Backbone Network, are presented. scribes our first implementation of the belief revision mechanism and of a very primative librarian, designed UCAM-CL-TR-246 to test the basic viability of our ideas and to allow us to explore different forms of the distributed system archi- Victor Poznanski:´ tecture. A relevance-based utterance UCAM-CL-TR-244 processing system

T.F. Melham: February 1992, 295 pages, PDF PhD thesis (Girton College, December 1990) A mechanized theory of the Abstract: This thesis presents a computational interpre- π-calculus in HOL tation of Sperber and Wilson’s relevance theory, based on the use of non-monotonic logic supported by a rea- January 1992, 31 pages, PDF son maintenance system, and shows how the theory, when given a specific form in this way, can provide a Abstract: The π-calculus is a process algebra developed unique and interesting account of discourse processing. at Edinburgh by Milner, Parrow and Walker for mod- Relevance theory is a radical theory of natural lan- elling concurrent systems in which the pattern of com- guage pragmatics which attempts to explain the whole munication between processes may change over time. of human cognition using a single maxim: the Principle This paper describes the results of preliminary work on of Optimal Relevance. The theory is seen by its origi- a mechanized formal theory of the π-calculus in higher nators as a computationally more adequate alternative order logic using the HOL theorem prover. to Gricean pragmatics. Much as it claims to offer the advantage of a unified approach to utterance compre- UCAM-CL-TR-245 hension, Relevance Theory is hard to evaluate because Sperber and Wilson only provide vague, high-level de- Michael J. Dixon: scriptions of vital aspects of their theory. For exam- ple, the fundamental idea behind the whole theory is System support for multi-service that, in trying to understand an utterance, we attempt traffic to maximise significant new information obtained from the utterance whilst consuming as little cognitive effort January 1992, 108 pages, PDF as possible. However, Sperber and Wilson do not make PhD thesis (Fitzwilliam College, September 1991) the nature of information and effort sufficiently clear. Relevance theory is attractive as a general theory of human language communication and as a potential

53 framework for computational language processing sys- February 1992, 23 pages, DVI tems. The thesis seeks to clarify and flesh out the prob- lem areas in order to develop a computational imple- Abstract: Theorem Provers which fully expand proofs mentation which is used to evaluate the theory. into applications of primitive inference rules can be The early chapters examine and criticise the impor- made highly secure, but have been criticized for being tant aspects of the theory, emerging with a schema orders of magnitude slower than many other theorem for an ideal relevance-based system. Crystal, a com- provers. We argue that much of this relative inefficiency putational implementation of an utterance processing is due to the way proof procedures are typically written system based on this schema is then described. Crys- and not all is inherent in the way the systems work. We tal performs certain types of utterance disambiguation support this claim by considering a proof procedure for and reference resolution, and computes implicatures ac- linear arithmetic. We show that straightforward tech- cording to relevance theory. niques can be used to significantly cut down the com- An adequate reasoning apparatus is a key compo- putation required. An order of magnitude improvement nent of a relevance based discourse processor, so a suit- in the performance is shown by an implementation of able knowledge representation and inference engine are these techniques. required. Various candidate formalisms are considered, and a knowledge representation and inference engine UCAM-CL-TR-249 based on autoepistemic logic is found to be the most suitable. It is then shown how this representation can John P. Van Tassel: be used to meet particular discourse processing require- ments, and how it provides a convenient interface to A formalisation of the VHDL a separate abduction system that supplies not demon- strative inferences according to relevence theory. Crys- simulation cycle tal’s powers are illustrated with examples, and the the- March 1992, 24 pages, PDF sis shows how the design not only implements the less precise areas of Sperber and Wilson’s theory, but over- Abstract: The VHSIC Hardware Description Language comes problems with the theory itself. (VHDL) has been gaining wide acceptance as a unify- Crystal uses rather crude heuristics to model notions ing HDL. It is, however, still a language in which the such as salience and degrees of belief. The thesis thefore only way of validating a design is by careful simulation. presents a proposal and outline for a new kind of rea- With the aim of better understanding VHDL’s particu- son maintenance system that supports non-monotonic lar simulation process and eventually reasoning about logic whose formulae re labelled with upper/lower it, we have developed a formalisation of VHDL’s sim- probability ranges intended to represent strength of ulation cycle for a subset of the language. It has also belief. This system should facilitate measurements of been possible to embed our semantics in the Cambridge change in semantic information and shed some light on Higher-Order Logic (HOL) system and derive interest- notions such as expected utility and salience. ing properties about specific VHDL programs. The thesis concludes that the design and implemen- tation of crystal provide evidence that relevance theory, as a generic theory of language processing, is a viable UCAM-CL-TR-250 alternative theory of pragmatics. It therefore merits a greater level of investigation than has been applied to it Innes A. Ferguson: to date. TouringMachines: autonomous UCAM-CL-TR-247 agents with attitudes Roy Luis Crole: April 1992, 19 pages, PostScript

Programming metalogics with a Abstract: It is becoming widely accepted that neither fixpoint type purely reactive nor purely deliberative control tech- niques are capable of producing the range of be- February 1992, 164 pages, paper copy haviours required of intelligent robotic agents in dy- PhD thesis (Churchill College, January 1992) namic, unpredictable, multi-agent worlds. We present a new architecture for controlling autonomous, mobile UCAM-CL-TR-248 agents – building on previous work addressing reac- tive and deliberative control methods. The proposed Richard J. Boulton: multi-layered control architecture allows a resource- bounded, goal-directed agent to react promptlyto un- On efficiency in theorem provers expected changes in its environment; at the same time it which fully expand proofs into allows the agent to reason predictively about potential conflicts by contrasting and projecting theories which primitive inferences hypothesise other agents’ goals and intentions.

54 The line of research adopted is very much a prag- UCAM-CL-TR-253 matic one. A single common architecture has been implemented which, being extensively parametrized Antonio Sanfilippo: allows an experimenter to study functionally- and behaviourally-diverse agent configurations. A principal The (other) Cambridge ACQUILEX aim of this research is to understand the role different functional capabilities play in constraining an agent’s papers behaviour under varying environmental conditions. To 141 pages, paper copy this end, we have constructed an experimental testbed comprising a simulated multi-agent world in which a UCAM-CL-TR-254 variety of agent configurations and bahaviours have been investigated. Some experience with the new con- trol architecture is described. Richard J. Boulton:

UCAM-CL-TR-251 A HOL semantics for a subset of ELLA Xiaofeng Jiang: April 1992, 104 pages, DVI Multipoint digital video communications Abstract: Formal verification is an important tool in the design of computer systems, especially when the sys- April 1992, 124 pages, paper copy tems are safety or security critical. However, the formal PhD thesis (Wolfson College, December 1991) techniques currently available are not well integrated into the set of tools more traditionally used by design- UCAM-CL-TR-252 ers. This work is aimed at improving the integration by providing a formal semantics for a subset of the Andrew M. Pitts: hardware description language ELLA, and by support- A co-induction principle for ing this semantics in the HOL theorem proving system, which has been used extensively for hardware verifica- recursively defined domains tion. 25 pages, PostScript A semantics for a subset of ELLA is described, and an outline of a proof of the equivalence of parallel and Abstract: This paper establishes a new property of pre- recursive implementations of an n-bit adder is given as domains recursively defined using the cartesian prod- an illustration of the semantics. The proof has been uct, disjoint union, partial function space and convex performed in an extension of the HOL system. Some powerdomain constructors. We prove that the partial proof tools written to support the verification are also order on such a recuirsive predomain D is the great- described. est fixed point of a certain monotone operator asso- ciated to D. This provides a structurally defined fam- UCAM-CL-TR-255 ily of proof principles for these recursive predomains: to show that one element of D approximates another, Rachel Mary Cardell-Oliver: it suffices to find a binary relation containing the two elements that is a post-fixed point for the associated The formal verification of hard monotone operator. The statement of the proof princi- ples is independent of any of the various methods avail- real-time systems able for explicit construction of recursive predomains. 1992, 151 pages, paper copy Following Milner and Tofte, the method of proof is PhD thesis (Queens’ College, January 1992) called co-induction. It closely resembles the way bisim- ulations are used in concurrent process calculi. Two specific instances of the co-induction principle UCAM-CL-TR-256 already occur in the work of Abramsky in the form of ‘internal full abstraction’ theorems for denotational Martin Richards: semantics of SCCS and the lazy lambda calculus. In the first case post-fixed binary relations are precisely MCPL programming manual Abramsky’s partial bisimulations, whereas in the sec- May 1992, 32 pages, PDF ond case they are his applicative bisimulations. The coinduction principle also provides an apparently use- ful tool for reasoning about the equality of elements of recursively defined datatypes in (strict or lazy) higher order functional programming languages.

55 Abstract: MCPL is a systems programming language the logics they formulate. Furthermore, the constructive having much in common with BCPL but augmented completeness proofs yield deterministic decision proce- by the pattern matching ideas of both ML and Prolog. dures for all the logics concerned. Unlike ML, MCPL is typeless, runs using a contigu- In obtaining these systems we domonstrate that the ous runtime stack and has no built in garbage collec- subformula property can be broken in a systematic tor, but it does make extensive use of ML-like pattern and analytic way while still retaining decidability. This matching. The low level aspects of the language resem- should not be surprising since it is known that modal ble those of BCPL and C. For efficiency, MCPL uses its logic is a form of second order logic and that the sub- own function calling sequence, however a convenient formula property does not hold for higher order logics. mechanism for mixing MCPL and C programs is pro- vided. UCAM-CL-TR-258 Notable features of MCPL are its pattern matching facilities and the simple way in which data structures David J. Greaves, Derek McAuley, are handled. This document gives a complete definition of the Leslie J. French: language and includes, at the end, several example pro- Two papers on ATM networks grams to demonstrate its capabilities. May 1992, 22 pages, PDF UCAM-CL-TR-257 Abstract: Private ATM networks / by David J. Greaves Rajeev Prakhakar Gore:´ and Derek McAuley. This paper advocates the use of local area networks Cut-free sequent and tableau systems which use 48 byte ATM cells. Hosts connected to the for propositional normal modal network are fitted with ATM interfaces and run a new protocol stack up to the network level, which avoids logics multiplexing and efficiently handles the out-of-band signalling used by ATM. May 1992, 160 pages, PDF The private network may be of WAN, MAN or LAN dimensions and contain several different network Abstract: We present a unified treatment of tableau, se- technologies, provided each is able to perform the ba- quent and axiomatic formulations for many proposi- sic function of carrying ATM cells from one point to tional normal modal logics, thus unifying and extend- another. The private network may be connected to the ing the work of Hanson, Segerberg, Zeman, Mints, Fit- B-ISDN at one or more points. ting, Rautenberg and Shvarts. The primary emphasis Protocol and interface for ATM LANs / by David J. is on tableau systems as the completeness proofs are Greaves, Derek McAuley and Leslie J. French. easier in this setting. Each tableau system has a natu- This paper advocates the use of local area networks ral sequent analogue defining a finitary provability re- using the Asynchronous Transfer Mode, where data is lation for each axiomatically formulated logic L. Con- carried in the payloads of 48-byte cells. We describe the sequently, any tableau proof can be converted into a design and performance of a simple ATM host interface sequent proof which can be read downwards to obtain for the DEC Turbochannel together with the MSNA an axiomatic proof. In particular, we present cut-free protocol architecture. We describe how MSNA creates sequent systems for the logics S4.3, S4.3.1 and S4.14. a homogeneous internet for ATM hosts and devices. These three logics have important temporal interpreta- We discuss the implementation of an adaption layer for tions and the sequent systems appear to be new. computer data which is able to take full advantage of All systems are sound and (weakly) complete with MSNA semantics, and which makes use of the end-to- respect to their known finite frame Kripke seman- end ATM layer header bit which has recently been ac- tics. By concentrating almost exclusively on finite tree cepted. frames we obtain finer characterisation results, partic- ularly for the logics with natural temporal interpreta- UCAM-CL-TR-259 tions. In particular, all proofs of tableau completeness are constructive and yield the finite model property and decidability for each logic. Samson Abramsky, C.-H. Luke Ong: Most of these systems are cut-free giving a Gentzen cut-elimination theorem for the logic in question. But Full abstraction in the Lazy Lambda even when the cut rule is required, all uses of it re- Calculus main analytic. Some systems do not possess the sub- formula property. But in all such cases the class of “su- 104 pages, paper copy performulae” remains bounded, giving an analytic su- performula property. Thus all systems remain totally amenable to computer implementation and immedi- ately serve as nondeterministic decision procedures for

56 UCAM-CL-TR-260 2. Infinite extent reconstructors: we consider these and their local approximations, the problem of finite Henrik Reif Anderson: image size, the resulting edge effects, and the solu- tions to these problems. Amongst the reconstructors Local computation of alternating discussed are the interpolating cubic B-spline and the interpolating Bezier cubic. We derive the filter kernels fixed-points for both of these, and prove that they are the same. June 1992, 21 pages, PDF Given this kernel we demonstrate how the interpolating cubic B-spline can be extended from a one-dimensional Abstract: In this paper we consider the problem of al- to a two-dimensional reconstructor, providing a consid- ternating fixed-points of monotone functions on finite erable speed improvement over the existing method of boolean lattices. We describe a local (demand-driven, extension. lazy) algorithm for computing a boolean expression 3. Fast Fourier transform reconstruction: it has long with two alternating fixed-points, i.e. with a minimal been known that the fast Fourier transform (FFT) can and a maximal fixed-point intertwined. Such expres- be used to generate an approximation to perfect scaling sions arise naturally in the modal µ-calculus and are the of a sample set. Donald Fraser (in 1987) took this result main source of its expressive power – and its difficult and generated a hybrid FFT reconstructor which can be model checking problem. By a translation of the model used for general transformations, not just scaling. We checking problem of the modal µ-calculus into a prob- modify Fraser’s method to tackle two major problems: lem of finding fixed-points on boolean lattices, we get its large time and storage requirements, and the edge a local model checker for two alternating fixed-points effects it causes in the reconstructed intensity surface. which runs in time O(|A|(|T|2)log(|A||T|)), where |A| is 4. A priori knowledge reconstruction: first consid- the size of the assertion and |T| the size of the model, ering what can be done if we know how the original a labelled transition system. This extends earlier results image was sampled, and then considering what can be by the author and improves on earlier published local done with one particular class of image coupled with algorithms. We also sketch how the algorithm can be one particular type of sampling. In this latter case we extended to arbitrary alternations. find that exact reconstruction of the image is possible. Due to the generality of the algorithm it can be This is a surprising result as this class of images cannot applied to other (alternating or non-alternating) fixed- be exactly reconstructed using classical sampling the- point problems. ory. The final section of the report draws all of the strands together to discuss transformations and the re- UCAM-CL-TR-261 sampling process as a whole. Of particular note here is work on how the quality of different reconstruction Neil Anthony Dodgson: and resampling methods can be assessed. Image resampling UCAM-CL-TR-262 August 1992, 264 pages, PDF PhD thesis (Wolfson College) Nick Benton, Gavin Bierman, Valeria de Paiva: Abstract: Image resampling is the process of geometri- cally transforming digital images. This report considers Term assignment for several aspects of the process. intuitionistic linear logic We begin by decomposing the resampling process into three simpler sub-processes: reconstruction of a (preliminary report) continuous intensity surface from a discrete image, transformation of that continuous surface, and sam- August 1992, 57 pages, PDF pling of the transformed surface to produce a new dis- Abstract: In this paper we consider the problem of de- crete image. We then consider the sampling process, riving a term assignment system for Girard’s Intuition- and the subsidiary problem of intensity quantisation. istic Linear Logic for both the sequent calculus and Both these are well understood, and we present a sum- natural deduction proof systems. Our system differs mary of existing work, laying a foundation for the cen- from previous calculi (e.g. that of Abramsky) and has tral body of the report where the sub-process of recon- two important properties which they lack. These are struction is studied. the substitution property (the set of valid deductions The work on reconstruction divides into four parts, is closed under substitution) and subject reduction (re- two general and two specific: duction on terms is well typed). 1. Piecewise local polynomials: the most studied We define a simple (but more general than previ- group of reconstructors. We examine these, and the cri- ous proposals) categorical model for Intuitionistic Lin- teria used in their design. One new derivation is of two ear Logic and show how this can be used to derive the piecewise local quadratic reconstructors. term assignment system.

57 We also consider term reduction arising from cut- UCAM-CL-TR-266 elimination in the sequent calculus and normalisation in natural deduction. We explore the relationship be- Carole Klein: tween these, as well as with the equations which follow from our categorical model. Automatic exploitation of OR-parallelism in Prolog UCAM-CL-TR-263 September 1992, 18 pages, PDF C.-H. Luke Ong: Abstract: A path through a search space can be defined The Lazy Lambda Calculus: by a sequence of integers called an oracle. The Delphi an investigation into the foundations machine consists of a network of individual worksta- tions co-operating to execute a Prolog program. Us- of functional programming ing oracles, these machines automatically partition the search space between them, thereby exploiting OR- August 1992, 256 pages, paper copy parallelism. This report provides a brief description of PhD thesis (Imperial College London, May 1988) the tree-searching algorithms (control strategies) imple- mented in the Delphi machine. UCAM-CL-TR-264 UCAM-CL-TR-267 Juanito Camilleri: CCS with environmental guards Christine Ernoult, Alan Mycroft: August 1992, 19 pages, PDF Untyped strictness analysis October 1992, 13 pages, PDF Abstract: This paper investigates an extension of Mil- ner’s CCS with agents guarded by propositions on the Abstract: We re-express Hudak and Young’s higher- environment. The agent g  E, pronounced E in an en- order strictness analysis for the untyped λ-calculus in vironment of which g holds, depends on the set of ac- a conceptually simpler and more semantically-based tions the environment in ready to perform. This depen- manner. We show our analysis to be a sound abstrac- dency is realised by an operational semantics in which tion of Hudak and Young’s whichis also complete in a transitions carry ready-sets (of the environment) as well sense we make precise. as the normal action symbols from CCS. A notion of strong bisimulation is defined on guarded agents via UCAM-CL-TR-268 this semantics. It is a congruence and satisfies new equa- tional laws (including a new expansion law) whicyh are shown to be complete for finite guarded agents. The Paul W. Jardetzky: laws are conservative over agents of traditional CCS. The guarding operator  provides a dynamic, local, Network file server design for and clean syntactic means of expressing the behaviour continuous media of an agent depending on circumstance; it is more ex- pressive than the unless operator presented in [Cam91] October 1992, 101 pages, PostScript and the priority choice operator presented in [Cam90] PhD thesis (Darwin College, August 1992) and [CaW91], and yields a much simpler expansion theorem. Abstract: This dissertation concentrates on issues re- lated to the provision of a network based storage fa- UCAM-CL-TR-265 cility for digital audio and video data. The goal is to demonstrate that a distributed file service in support of these media may be built without special purpose hard- Juanito Camilleri, Tom Melham: ware. The main objective is to identify those parame- Reasoning with inductively defined ters that affect file system performance and provide the criteria for making desirable design decisions. relations in the HOL theorem prover August 1992, 49 pages, paper copy

58 UCAM-CL-TR-269 that although using stale naming data (hints) at the ap- plication level is acceptable in most cases as long as it Alan Mycroft, Arthur Norman: is detectable and recoverable, stronger naming data in- tegrity should be maintained to provide a better guar- Optimising compilation antee of finding objects, especially when a high degree of availability is required. Finally, configuring the name October 1992, 23 pages, PDF service is usually done in an ad hoc manner, leading to unexpected interruptions or a great deal of human Abstract: This report consists of pre-prints of two tuto- intervention when the system is reconfigured. It is nec- rial lectures on optimising compilation to be presented essary to make a systematic study of automatic config- at the Czechoslovak ‘SOFSEM 92’ conference. The first uration and reconfiguration of name services. discusses optimising compilers based on dataflow anal- This research is based on a distributed computing ysis for classical imperative languages like ‘C’. The sec- model, in which a number of computers work coop- ond turns attention to optimisation of lazy functional eratively to provide the service. The contributions in- languages by ‘strictness analysis’. clude: (a) the construction of a Globally Unique Direc- Part 1: Classical imperative languages tory Identifier (GUDI) name space. Flexible name space This tutorial considers the design of modern restructuring is supported by allowing directories to be machine-independent optimising compilers for classical added to or removed from the GUDI name space. (b) (C-like) languages. We draw from two sources (1) the The definition of a two class name service infrastruc- literature and lectures by the authors at Cambridge and ture which exploits the semantics of naming. It makes (2) the ‘Norcroft’ compiler suite jointly constructed by the UNS replication control more robust, reliable as the authors. well as highly available. (c) The identification of two Part 2: Lazy functional languages aspects in the name service configuration: one is con- This lecture considers the optimisation of functional cerned with the replication configuration, and the other programming languages (particularly ‘lazy’ languages) is concerned with the server configuration. It is notable based on ‘strictness analysis’. Such optimisations al- that previous work only studied these two aspects indi- ter evaluation order to allow more efficient translation vidually but not in combination. A distinguishing fea- into or to increase the par- ture of the UNS is that both issues are considered at the allelism in a sequentially specified system (such as that design stage and novel methods are used to allow dy- implied by lazy-semantics). namic service configuration to be done automatically and safely. UCAM-CL-TR-270 UCAM-CL-TR-271 Chaoying Ma: Designing a universal name service Lawrence C. Paulson: Set theory as a computational logic: I. 133 pages, PDF PhD thesis (Newnham College, October 1992) from foundations to functions

Abstract: Generally speaking, naming in computing November 1992, 28 pages, PDF, DVI systems deals with the creation of object identifiers at all levels of system architecture and the mapping among Abstract: A logic for specification and verification is de- them. Two of the main purposes of having names in rived from the axioms of Zermelo-Fraenkel set theory. computer systems are (a) to identify objects; (b) to ac- The proofs are performed using the proof assistant Is- complish sharing. Without naming no computer system abelle. Isabelle is generic, supporting several different design can be done. logics. Isabelle has the flexibility to adapt to variants of The rapid development in the technology of per- set theory. Its higher-order syntax supports the defini- sonal workstations and computer communication net- tion of new binding operators. Unknowns in subgoals works has placed a great number of demands on de- can be instantiated incrementally. The paper describes signing large computer naming systems. In this disser- the derivation of rules for descriptions, relations and tation, issues of naming in large distributed computing functions, and discusses interactive proofs of Cantor’s systems are addressed. Technical aspects as well as sys- Theorem, the Composition of Homomorphisms chal- tem architecture are examined. A design of a Univer- lenge, and Ramsey’s Theorem. A generic proof assis- sal Name Service (UNS) is proposed and its prototype tant can stand up against provers dedicated to particu- implementation is described. Three major issues on de- lar logics. signing a global naming system are studied. Firstly, it is observed that none of the existing name services pro- UCAM-CL-TR-272 vides enough flexibility in restructuring name spaces, more research has to be done. Secondly it is observed Martin David Coen:

59 Interactive program derivation Abstract: It is becoming widely accepted that nei- ther purely reactive nor purely deliberative control November 1992, 100 pages, PDF, DVI techniques are capable of producing the range of PhD thesis (St John’s College, March 1992) behaviours required of intelligent computational or robotic agents in dynamic, unpredictable, multi-agent Abstract: As computer programs are increasingly used worlds. We present a new architecture for control- in safety critical applications, program correctness is ling autonomous, mobile agents – building on previous becoming more important; as the size and complex- work addressing reactive and deliberative control meth- ity of programs increases, the traditional approach of ods. The proposed multi-layered control architecture testing is becoming inadequate. Proving the correctness allows a resource-bounded, goal-directed agent to react of programs written in imperative languages is awk- promptly to unexpected changes in its environment; at ward; functional programming languages, however, of- the same time it enables the agent to reason predictively fer more hope. Their logical structure is cleaner, and it about potential conflicts by constructing and project- is practical to reason about terminating functional pro- ing causal models or theories which hypothesise other grams in an internal logic. agents’ goals and intentions. This dissertation describes the development of a log- The line of research adopted is very much a prag- ical theory called TPT for reasoning about the correct- matic one. A single, common architecture has been ness of terminating functional programs, its implemen- implemented which, being extensively parametrized, tation using the theorem prover Isabelle, and its use allows an experimenter to study functionally- and in proving formal correctness. The theory draws both behaviourally-diverse agent configurations. A principal from Martin-Lof’s¨ work in type theory and Manna and aim of this research is to understand the role different Waldinger’s work in program synthesis. It is based on functional capabilities play in constraining an agent’s classical first-order logic, and it contains terms that behaviour under varying environmental conditions. To represent classes of behaviourally equivalent programs, this end, we have constructed an experimental testbed types that denote sets of terminating programs and comprising a simulated multi-agent world in which a well-founded orderings. Well-founded induction is used variety of agent configurations and behaviours have to reason about general recursion in a natural way and been investigated. Experience with the new control ar- to separate conditions for termination from those for chitecture is described. correctness. The theory is implemented using the generic theo- UCAM-CL-TR-274 rem prover Isabelle, which allows correctness proofs to be checked by machine and partially automated us- Paul Curzon: ing tactics. In particular, tactics for type checking use the structure of programs to direct proofs. Type check- Of what use is a verified compiler ing allows both the verification and derivation of pro- specification? grams, reducing specifications of correctness to sets of correctness conditions. These conditions can be proved November 1992, 23 pages, PDF in typed first-order logic, using well-known techniques Abstract: Program verification is normally performed of reasoning by induction and rewriting, and then lifted on source code. However, it is the object code which up to TPT. Examples of program termination are as- is executed and so which ultimately must be correct. serted and proved, using simple types. Behavioural The compiler used to produce the object code must not specifications are expressed using dependent types, and introduce bugs. The majority of the compiler correct- the correctness of programs asserted and then proved. ness literature is concerned with the verification of com- As a non-trivial example, a unification algorithm is piler specifications rather than executable implementa- specified and proved correct by machine. tions. We discuss different ways that verified specifica- The work in this dissertation clearly shows how tions can be used to obtain implementations with vary- a classical theory can be used to reason about pro- ing degrees of security. In particular we describe how gram correctness, how general recursion can be rea- a specification can be executed by proof. We discuss soned about, and how programs can direct proofs of how this method can be used in conjunction with an correctness. insecure production compiler so as to retain security without slowing the development cycle of application UCAM-CL-TR-273 programs. A verified implementation of a compiler in a high-level language is not sufficient to obtain correct Innes A. Ferguson: object code. The compiler must itself be compiled into TouringMachines: a low level language before it can be executed. At first sight it appears we need an already verified compiler to an architecture for dynamic, rational, obtain a secure low-level implementation of a compiler. mobile agents We describe how a low-level implementation of a com- piler can be securely obtained from a verified compiler November 1992, 206 pages, PDF, PostScript implementation. PhD thesis (Clare Hall, October 1992)

60 UCAM-CL-TR-275 Abstract: I have implemented a game generator that generates games from a wide but still restricted class. Barney Pell: This class is general enough to include most aspects of many standard games, including Chess, Shogi, Chi- Exploratory learning in the game of nese Chess, Checkers, Draughts, and many variants of Fairy Chess. The generator, implemented in Prolog is GO transparent and publicly available, and generates games 18 pages, PostScript using probability distributions for parameters such as piece complexity, types of movement, board size, and Abstract: This paper considers the importance of explo- locality. ration to game-playing programs which learn by play- The generator is illustrated by means of a new game ing against opponents. The central question is whether it produced, which is then subjected to a simple strate- a learning program should play the move which of- gic analysis. This form of analysis suggests that pro- fers the best chance of winning the present game, or grams to play Metagame well will either learn or ap- if it should play the move which has the best chance of ply very general game-playing principles. But because providing useful information for future games. An ap- the class is still restricted, it may be possible to de- proach to addressing this question is developed using velop a naive but fast program which can outplay more probability theory, and then implemented in two differ- sophisticated opponents. Performance in a tournament ent learning methods. Initial experiments in the game between programs is the deciding criterion. of Go suggest that a program which takes exploration into account can learn better against a knowledgeable UCAM-CL-TR-278 opponent than a program which does not. Monica Nesi: UCAM-CL-TR-276 A formalization of the process Barney Pell: algebra CCS in high order logic METAGAME: a new challenge for 42 pages, PDF games and learning Abstract: This paper describes a mechanization in 15 pages, PostScript higher order logic of the theory for a subset of Mil- ner’s CCS. The aim is to build a sound and effective tool to support verification and reasoning about pro- Abstract: In most current approaches to Computer cess algebra specifications. To achieve this goal, the for- Game-Playing, including those employing some form mal theory for pure CCS (no value passing) is defined in of machine learning, the game analysis mainly is per- the interactive theorem prover HOL, and a set of proof formed by humans. Thus, we are sidestepping largely tools, based on the algebraic presentation of CCS, is the interesting (and difficult) questions. Human analy- provided. sis also makes it difficult to evaluate the generality and applicability of different approaches. To address these problems, we introduce a new chal- UCAM-CL-TR-279 lenge: Metagame. The idea is to write programs which take as input the rules of a set of new games within Victor A. Carreno:˜ a pre-specified class, generated by a program which is publicly available. The programs compete against each The transition assertions specification other in many matches on each new game, and they can method then be evaluated based on their overall performance and improvement through experience. December 1992, 18 pages, PDF This paper discusses the goals, research areas, and general concerns for the idea of Metagame. Abstract: A modelling and specification method for real-time, reactive systems is described. Modelling is UCAM-CL-TR-277 performed by constructing time dependent relations of the system parameters. A textual formal notation us- ing higher order logic and a graphical notation are pre- Barney Pell: sented. The formal notation allows the use of rigorous METAGAME in symmetric chess-like mathematical methods on the specification, one of the primary sources of design errors. A cruise control case games example is included in the paper and the HOL mecha- nised theorem prover is used to show that the specifica- 30 pages, PostScript tion comply with some top level requirements.

61 UCAM-CL-TR-280 UCAM-CL-TR-285

Lawrence C. Paulson: Andrew Donald Gordon: Introduction to Isabelle Functional programming and January 1993, 61 pages, DVI input/output

Abstract: Isabelle is a generic theorem prover, support- February 1993, 163 pages, paper copy ing formal proof in a variety of logics. Through a va- PhD thesis (King’s College, August 1992) riety of examples, this paper explains the basic theory demonstrates the most important commands. It serves UCAM-CL-TR-286 as the introduction to other Isabelle documentation. Lawrence C. Paulson: UCAM-CL-TR-281 Isabelle’s object-logics Sape J. Mullender, Ian M. Leslie, February 1993, 161 pages, DVI Derek McAuley: Pegasus project description Abstract: Several logics come with Isabelle. Many of them are sufficiently developed to serve as comfortable September 1992, 23 pages, paper copy reasoning environments. They are also good starting points for defining new logics. Each logic is distributed UCAM-CL-TR-282 with sample proofs, some of which are presented in the paper. The logics described include first-order logic, Ian M. Leslie, Derek McAuley, Zermelo-Fraenkel set theory, higher-order logic, con- structive type theory, and the classical sequent calculus Sape J. Mullender: LK. A final chapter explains the fine points of defining Pegasus – Operating system support logics in Isabelle. for distributed multimedia systems UCAM-CL-TR-287 December 1992, 14 pages, paper copy Andrew D. Gordon: UCAM-CL-TR-283 A mechanised definition of Silage in Lawrence C. Paulson: HOL The Isabelle reference manual February 1993, 28 pages, DVI

February 1993, 78 pages, DVI Abstract: If formal methods of hardware verification are to have any impact on the practices of working engi- Abstract: This manual is a comprehensive description neers, connections must be made between the languages of Isabelle, including all commands, functions and used in practice to design circuits, and those used for packages. It is intended for reference rather than for research into hardware verification. Silage is a simple reading through, and is certainly not a tutorial. The dataflow language marketed for specifying digital sig- manual assumes familiarity with the basic concepts ex- nal processing circuits. Higher Order Logic (HOL) is plained in Introduction to Isabelle. Functions are or- extensively used for research into hardware verifica- ganized by their purpose, by their operands (subgoals, tion. This paper presents a formal definition of a sub- tactics, theorems), and by their usefulness. In each sec- stantial subset of Silage, by mapping Silage declarations tion, basic functions appear first, then advanced func- into HOL predicates. The definition has been mecha- tions, and finally esoteric functions. nised in the HOL theorem prover to support the trans- formational design of Silage circuits as theorem proving UCAM-CL-TR-284 in HOL. Claire Grover, John Carroll, Ted Briscoe: The Alvey Natural Language Tools grammar (4th Release) January 1993, 260 pages, paper copy

62 UCAM-CL-TR-288 UCAM-CL-TR-291 Rajeev Gore: J.R. Galliers, K. Sparck¨ Jones: Cut-free sequent and tableau systems Evaluating natural language for propositional Diodorean modal processing systems logics February 1993, 187 pages, PostScript February 1993, 19 pages, PDF Abstract: We present sound, (weakly) complete and Abstract: This report presents a detailed analysis and cut-free tableau systems for the propositional normal review of NLP evaluation, in principle and in practice. modal logics S4.3, S4.3.1 and S4.14. When the modal- Part 1 examines evaluation concepts and establishes ity  is given a temporal interpretation, these logics a framework for NLP system evaluation. This makes respectively model time as a linear dense sequence of use of experience in the related area of information points; as a linear discrete sequence of points; and as retrieval and the analysis also refers to evaluation in a branching tree where each branch is a linear discrete speech processing. Part 2 surveys significant evaluation sequence of points. work done so far, for instance in machine translation, Although cut-free, the last two systems do not pos- and discusses the particular problems of generic system sess the subformula property. But for any given finite evaluation. The conclusion is that evaluation strategies set of formulae X the “superformulae” involved are al- and techniques for NLP need much more development, ways bounded by a finite set of formulae X*L depend- in particular to take proper account of the influence of ing only on X and the logic L. Thus each system gives system tasks and settings. Part 3 develops a general ap- a nondeterministic decision procedure for the logic in proach to NLP evaluation, aimed at methodologically- question. The completeness proofs yield deterministic sound strategies for test and evaluation motivated by decision procedures for each logic because each proof comprehensive performance factor identification. The is constructive. analysis throughout the report is supported by exten- Each tableau system has a cut-free sequent analogue sive illustrative examples. proving that Gentzen’s cut-elimination theorem holds for these logics. The techniques are due to Hintikka and UCAM-CL-TR-292 Rautenberg.

UCAM-CL-TR-289 Cormac John Sreenan: David Alan Howard Elworthy: Synchronisation services for The semantics of noun phrase digital continuous media anaphora March 1993, 123 pages, PostScript PhD thesis (Christ’s College, October 1992) February 1993, 191 pages, paper copy PhD thesis (Darwin College, February 1993) Abstract: The development of broadband ATM net- working makes it attractive to use computer commu- UCAM-CL-TR-290 nication networks for the transport of digital audio Karen Sparck¨ Jones: and motion video. Coupled with advances in worksta- tion technology, this creates the opportunity to inte- Discourse modelling for automatic grate these continuous information media within a dis- summarising tributed computing system. Continuous media have an inherent temporal dimension, resulting in a set of syn- February 1993, 30 pages, PDF chronisation requirements which have real-time con- Abstract: Automatic abstracting is a challenging task straints. This dissertation identifies the role and posi- for natural language processing. It depends not only tion of synchronisation, in terms of the support which on sentence interpretation and the local context rep- is necessary in an integrated distributed system. This resentation this requires, but also on the recognition work is supported by a set of experiments which were and use of large-scale discourse structure. This paper performed in an ATM inter-network using multi-media describes research investigating the nature of different workstations, each equipped with an Olivetti Pandora approaches to discourse representation and their value Box. for summarising. This work is focussed on compara- tive analysis, illustrated in the paper through the provi- sion of different forms of representation, and different strategies for summary formation, for a short example text.

63 UCAM-CL-TR-293 UCAM-CL-TR-295

Jean Bacon, Ken Moody: Jean Bacon, John Bates, Sai Lai Lo, Objects and transactions for Ken Moody: modelling distributed applications: OPERA concurrency control and commitment Storage and presentation support for multimedia applications April 1993, 39 pages, PDF in a distributed, ATM network Abstract: The concepts of object and transaction form environment an ideal basis for reasoning about the behaviour of dis- tributed applications. An object model allows the se- April 1993, 12 pages, PDF mantics of an application to be used to specify the re- quired concurrency behaviour of each object. A trans- Abstract: We are building a display platform for mul- action model covers multi-component computations timedia applications above a multi-service storage ar- where the components are distributed and therefore chitecture (MSSA). This style of application needs high subject to concurrent execution and partial failure. speed ATM networks and suitable protocols and oper- This tutorial establishes an object model for a dis- ating systems; an infrastructure that exists at the Uni- tributed system in which transactions are used. It fo- versity of Cambridge Computer Laboratory. cusses on the alternative methods of concurrency con- An open storage architecture gives flexibility and ex- trol that might be employed and shows how each tensibility. Conventional files, audio, video and struc- method might be appropriate for certain application tured objects are supported within a common architec- characteristics and system behaviour. The background tural framework and composite objects, such as a dis- for this discussion is eatablished in [Bacon 1993]. play representation, may have components of any of these storage types. The two-level hierarchy of servers UCAM-CL-TR-294 provides storage media and a byte-segment abstraction at the low level and a variety of abstractions at the high Ken Moody, Jean Bacon, Noha Adly, level. Quality of service guarantees, which are essential for continuous media file types, are supported by ses- Mohamad Afshar, John Bates, sions and tickets. These are arranged via the high level Huang Feng, Richard Hayton, Sai Lai Lo, servers and used directly with the low level servers. Scarlet Schwiderski, Robert Sultana, A platform for the creation and interactive display Zhixue Wu: of multimedia presentations (IMP) is being developed. A script language allows a multimedia presentation to OPERA be specified in terms of objects, the relationships be- Storage, programming and display of tween them and the (composite) events that drive it. Presentation data is stored on the structured data ser- multimedia objects vice of MSSA and component objects are stored on ap- propriate servers, and accepted and retrieved at guar- April 1993, 9 pages, PDF anteed rates. The presentation requirements of an ap- plication are managed by applying a script to the data Abstract: This project aims to support the interactive representing the presentation to create a display. display of synchronised multiple media types in work- station windows. This style of application needs high UCAM-CL-TR-296 speed ATM networks and suitable protocols and oper- ating systems; an infrastructure that exists at the Uni- versity of Cambridge Computer Laboratory. Above this Z. Wu, K. Moody, J. Bacon: infrastructure we have designed and are building stor- A persistent programming language age services (MSSA), a platform to support the creation and display of multimedia presentations (IMP) and a for multimedia databases in the persistent programming language (PC++), for reliable OPERA project and convenient programming of multimedia applica- tions. This paper gives an overview of the work of the April 1993, 9 pages, PDF OPERA project in these three areas. Abstract: The advent of high bandwidth local area ATM networks has transformed the potential of dis- tributed computing systems. At the Computer Labora- tory we are moving towards a world in which multi- media displays are managed by editing, browsing and

64 composing tools [Bates 93]. The recently completed Abstract: In this paper we argue that bidding in the Pandora project [Hopper 90] has given us some expe- game of Contract Bridge can profitably be regarded as a rience of multimedia applications, and an idea of their micro-world suitable for experimenting with pragmat- scope. ics. We sketch an analysis in which a “bidding system” We have developed a persistent programming lan- is treated as the semantics of an artificial language, and guage PC++ [Wu 93], an extension of C++, to help pro- show how this “language”, despite its apparent simplic- grammers developing multimedia applications to make ity, is capable of supporting a wide variety of common use of the MSSA. In this paper we present the design speech acts parallel to those in natural languages; we of PC++ and show how its special features meet the re- also argue that the reason for the relatively unsuccess- quiremets to effectively manage data in a distributed, ful nature of previous attempts to write strong Bridge real-time, context. playing programs has been their failure to address the need to reason explicitly about knowledge, pragmat- UCAM-CL-TR-297 ics, probabilities and plans. We give an overview of Pragma, a system currently under development, which Eike Ritter: embodies these ideas in concrete form, using a com- bination of rule-based inference, stochastic simulation, Categorical abstract machines for and “neural-net” learning. Examples are given illustrat- ing the functionality of the system in its current form. higher-order typed lambda calculi April 1993, 149 pages, paper copy UCAM-CL-TR-300 PhD thesis (Trinity College) Wai Wong: UCAM-CL-TR-298 Formal verification of VIPER’s ALU John Matthew Simon Doar: April 1993, 78 pages, paper copy

Multicast in the asynchronous UCAM-CL-TR-301 transfer mode environment April 1993, 168 pages, PostScript Zhixue Wu, Ken Moody, Jean Bacon: PhD thesis (St John’s College, January 1993) The dual-level validation concurrency

Abstract: In future multimedia communication net- control method works, the ability to multicast information will be use- June 1993, 24 pages, PDF ful for many new and existing services. This disser- tation considers the design of multicast switches for Abstract: Atomic data types permit maximum concur- Asynchronous Transfer Mode (ATM) networks and rency among transations by exploiting the semantics of proposes one design based upon a slotted ring. Anal- object operations. Concurrency control is needed to en- ysis and simulation studies of this design are presented sure both object level atomicity and transaction level and details of its implementation for an experimental atomicity. It must be possible to regard each opera- ATM network (Project Fairisle) are described, together tion on an object as elementary. Recovery methods for with the modifications to the existing multi-service pro- transactions which are based on atomic objects must tocol architecture necessary to provide multicast con- take into account that partial results of a transaction nections. Finally, a short study of the problem of mul- might be seen by other transactions. ticast routing is presented, together with some simula- This paper presents, formalises and verifies a proto- tions of the long-term effect upon the routing efficiency col called the dual-level validation method which can of modifying the number of destinations within a mul- be used to provide atomicity for atomic data types. It is ticast group. optimistic and has a number of advantages over previ- ous methods. It permits maximum concurrency at the UCAM-CL-TR-299 low level by allowing non-conflicting operations to be scheduled concurrently. It allows applications to cope Bjorn Gamback, Manny Rayner, Barney Pell: with very large objects by supporting multi-granularity shadowing. Transaction recovery is simple to imple- Pragmatic reasoning in bridge ment. The method performs well, particularly when April 1993, 23 pages, PostScript different transactions are unlikely to access the same (sub)objects concurrently. Finally, it is well suited to a distributed environment since validation and commit are not implemented atomically.

65 UCAM-CL-TR-302 UCAM-CL-TR-304

Barney Pell: Lawrence C. Paulson: Logic programming for general Co-induction and co-recursion in game-playing higher-order logic June 1993, 15 pages, PostScript July 1993, 35 pages, PDF, PostScript, DVI

Abstract: Meta-Game Playing is a new approach to Abstract: A theory of recursive and corecursive defini- games in Artificial Intelligence, where we construct pro- tions has been developed in higher-order logic (HOL) grams to play new games in a well-defined class, which and mechanised using Isabelle. Least fixedpoints ex- are output by an automatic game generator. As the spe- press inductive data types such as strict lists; greatest cific games to be played are not known in advance, a fixedpoints express co-inductive data types, such as lazy degree of human bias is eliminated, and playing pro- lists. Well-founded recursion expresses recursive func- grams are required to perform any game-specific opti- tions over inductive data types; co-recursion expresses misations without human assistance. functions that yield elements of co-inductive data types. The attempt to construct a general game-playing The theory rests on a traditional formalization of in- program is made difficult by the opposing goals of gen- finite trees. The theory is intended for use in specifi- erality and efficiency. This paper shows how applica- cation and verification. It supports reasoning about a tion of standard techniques in logic-programming (ab- wide range of computable functions, but it does not for- stract interpretation and partial evaluation) makes it malize their operational semantics and can express non- possible to achieve both of these goals. Using these computable functions also. The theory is demonstrated techniques, we can represent the semantics of a large using lists and lazy lists as examples. The emphasis is class of games in a general and declarative way, but on using co-recursion to define lazy list functions, and then have the program transform this representation on using co-induction to reason about them. into a more efficient version once it is presented with the rules of a new game. This process can be viewed UCAM-CL-TR-305 as moving some of the responsibility for game analysis (that concerned with efficiency) from the researcher to P.N. Benton: the program itself. Strong normalisation for the UCAM-CL-TR-303 linear term calculus Andrew Kennedy: July 1993, 13 pages, PDF

Drawing trees — Abstract: We provide a strong normalisation result for a case study in functional the linear term calculus which was introduced in (Ben- ton et al. 1992). Rather than prove the result from first programming principles, we give a translation of linear terms into June 1993, 9 pages, PDF terms in the second order polymorphic lambda calcu- lus (λ2) which allows the result to be proved by appeal- ing to the well known strong normalisation property of Abstract: This report describes the application of func- λ2. An interesting feature of the translation is that it tional programming techniques to a problem previously makes use of the λ2 coding of a coinductive datatype studied by imperative programmers, that of drawing as the translation of the !-types (exponentials) of the general trees automatically. We first consider the nature linear calculus. of the problem and the ideas behind its solution, in- dependent of programming language implementation. The functional language implementation is described UCAM-CL-TR-306 in a bottom up style starting with very general func- tions over trees and then narrowing in on the particular Wai Wong: tree layout algorithm. Its correctness is considered in- formally. Finally we discuss the implementation’s com- Recording HOL proofs putational complexity and possible improvements. July 1993, 57 pages, paper copy

66 UCAM-CL-TR-307 UCAM-CL-TR-310

David D. Lewis, Karen Sparck¨ Jones: Noha Adly: Natural language processing for HARP: a hierarchical asynchronous information retrieval replication protocol for massively July 1993, 22 pages, PostScript replicated systems August 1993, 34 pages, PostScript Abstract: The paper summarizes the essential properties of document retrieval and reviews both conventional Abstract: This paper presents a new asynchronous practice and research findings, the latter suggesting that replication protocol that is especially suitable for wide simple statistical techniques can be effective. It then area and mobile systems, and allows reads and writes considers the new opportunities and challenges pre- to occur at any replica. Updates reach other replicas sented by the ability to search full text directly (rather using a propagation scheme based on nodes organized than e.g. titles and abstracts), and suggests appropriate into a logical hierarchy. The hierarchical structure en- approaches to doing this, with a focus on the role of ables the scheme to scale well for thousands of replicas, natural language processing. The paper also comments while ensuring reliable delivery. A new service interface on possible connections with data and knowledge re- is proposed that provides different levels of asynchrony, trieval, and concludes by emphasizing the importance allowing strong consistency and weak consistency to of rigorous performance testing. be integrated into the same framework. Further, due to the hierarchical pattern of propagation, the scheme UCAM-CL-TR-308 provides the ability to locate replicas that are more up- to-date than others, depending on the needs of various Jacob Frost: applications. Also, it allows a selection from a num- ber of reconciliation techniques based on delivery order A case study of co-induction in mechanisms. Restructuring operations are provided to Isabelle HOL build and reconfigure the hierarchy dynamically with- out disturbing normal operations. The scheme tolerates August 1993, 27 pages, PDF, PostScript, DVI transmission failures and network partitions.

Abstract: The consistency of the dynamic and static se- UCAM-CL-TR-311 mantics for a small functional programming language was informally proved by R. Milner and M. Tofte. The Paul Curzon: notions of co-inductive definitions and the associated principle of co-induction played a pivotal role in the A verified Vista implementation proof. With emphasis on co-induction, the work pre- sented here deals with the formalisation of this result September 1993, 56 pages, paper copy in the higher-order logic of the generic theorem prover Isabelle. UCAM-CL-TR-312

UCAM-CL-TR-309 Lawrence C. Paulson: Peter Nicholas Benton: Set theory for verification: Strictness analysis of lazy functional II programs Induction and recursion September 1993, 46 pages, PDF August 1993, 154 pages, paper copy PhD thesis (Pembroke College, December 1992) Abstract: A theory of recursive definitions has been mechanized in Isabelle’s Zermelo-Fraenkel (ZF) set the- ory. The objective is to support the formalization of particular recursive definitions for use in verification, semantics proofs and other computational reasoning. Inductively defined sets are expressed as least fixed- points, applying the Knaster-Tarski Theorem over a suitable set. Recursive functions are defined by well- founded recursion and its derivatives, such as transfi- nite recursion. Recursive data structures are expressed

67 by applying the Knaster-Tarski Theorem to a set that is and a unification-based version is derived. In experi- closed under Cartesian product and disjoint sum. ments, the performance of an implementation of the Worked examples include the transitive closure of latter is shown to exceed both the chart parser and also a relation, lists, variable-branching trees and mutu- that of another efficient LR-like algorithm recently pro- ally recursive trees and forests. The Schroder-Bernstein¨ posed. Theorem and the soundness of propositional logic are Building on these methods, a system for parsing proved in Isabelle sessions. text taken from a given corpus is described which uses probabilistic techniques to identify the most plausible UCAM-CL-TR-313 syntactic analyses for an input from the often large number licensed by the grammar. New techniques im- Yves Bertot, Gilles Kahn, Laurent Thery:´ plemented include an incremental approach to semi- supervised training, a context-sensitive method of scor- Proof by pointing ing sub-analyses, the accurate manipulation of prob- abilities during parsing, and the identification of the October 1993, 27 pages, PDF highest ranked analyses without exhaustive search. The system attains a similar success rate to approaches Abstract: A number of very powerful and elegant com- based on context-free grammar, but produces analyses puter programs to assist in making formal proofs have which are more suitable for semantic processing. been developed. While these systems incorporate ever The thesis includes detailed analyses of the worst- more sophisticated tactics, proofs that can be carried case space and time complexities of all the main algo- out without any user directions are the exception. In rithms described, and discusses the practical impact of this paper we present a principle called proof by point- the theoretical complexity results. ing that allows the user to guide the proof process using the mouse in the user-interface. This idea is widely ap- UCAM-CL-TR-315 plicable and has been implemented by the authors in user-interfaces for several proof development systems. Barney Darryl Pell: UCAM-CL-TR-314 Strategy generation and evaluation for meta-game playing John Andrew Carroll: November 1993, 289 pages, PostScript Practical unification-based parsing of PhD thesis (Trinity College, August 1993) natural language Abstract: Meta-Game Playing (METAGAME) is a new 173 pages, PostScript paradigm for research in game-playing in which we de- PhD thesis (September 1993) sign programs to take in the rules of unknown games and play those games without human assistance. Strong Abstract: The thesis describes novel techniques and al- performance in this new paradigm is evidence that the gorithms for the practical parsing of realistic Natural program, instead of its human designer, has performed Language (NL) texts with a wide-coverage unification- the analysis of each specific game. based grammar of English. The thesis tackles two of the SCL-METAGAME is a concrete METAGAME re- major problems in this area: firstly, the fact that parsing search problem based around the class of symmet- realistic inputs with such grammars can be computa- ric chess-like games. The class includes the games of tionally very expensive, and secondly, the observation chess, checkers, noughts and crosses, Chinese-chess, that many analyses are often assigned to an input, only and Shogi. An implemented game generator produces one of which usually forms the basis of the correct in- new games in this class, some of which are objects of terpretation. interest in their own right. The thesis starts by presenting a new unification al- METAGAMER is a program that plays SCL- gorithm, justifies why it is well-suited to practical NL METAGAME. The program takes as input the rules of parsing, and describes a bottom-up active chart parser a specific game and analyses those rules to construct which employs this unification algorithm together with for that game an efficient representation and an evalua- several other novel processing and optimisation tech- tion function, both for use with a generic search engine. niques. Empirical results demonstrate that an imple- The strategic analysis performed by the program relates mentation of this parser has significantly better prac- a set of general knowledge sources to the details of the tical performance than a comparable, state-of-the-art particular game. Among other properties, this analysis unification-based parser. Next, techniques for comput- determines the relative value of the different pieces in ing an LR table for a large unification grammar are de- a given game. Although METAGAMER does not learn scribed, a context free non-deterministic LR parsing al- from experience, the values resulting from its analysis gorithm is presented which has better time complexity are qualitatively similar to values used by experts on than any previously reported using the same approach, known games, and are sufficient to produce competitive

68 performance the first time the program actually plays UCAM-CL-TR-318 each game it is given. This appears to be the first pro- gram to have derived useful piece values directly from Jim Grundy: analysis of the rules of different games. Experiments show that the knowledge implemented A method of program refinement in METAGAMER is useful on games unknown to its programmer in advance of the competition and make November 1993, 207 pages, PostScript it seem likely that future programs which incorporate PhD thesis (Fitzwilliam College, November 1993) learning and more sophisticated active-analysis tech- niques will have a demonstrable competitive advantage Abstract: A method of specifying the desired behaviour on this new problem. When playing the known games of a computer program, and of refining such specifica- of chess and checkers against humans and specialised tions into imperative programs is proposed. The refine- programs, METAGAMER has derived from more gen- ment method has been designed with the intention of eral principles some strategies which are familiar to being amenable to tool support, and of being applica- players of those games and which are hard-wired in ble to real-world refinement problems. many game-specific programs. Part of the refinement method proposed involves the use of a style of transformational reasoning called UCAM-CL-TR-316 ‘window inference’. Window inference is particularly powerful because it allows the information inherent in the context of a subexpression to be used in its trans- Ann Copestake: formation. If the notion of transformational reasoning The Compleat LKB is generalised to include transformations that preserve relationships weaker than equality, then program re- August 1993, 126 pages, PostScript finement can be regarded as a special case of trans- formational reasoning. A generalisation of window in- Abstract: This report is a full description of the lexical ference is described that allows non-equivalence pre- knowledge base system (LKB) and the representation serving transformations. Window inference was orig- language (LRL) developed on the Esprit ACQUILEX inally proposed independently from, and as an alter- project. The LKB system is designed to allow the rep- native to, traditional styles of reasoning. A correspon- resentation of multilingual lexical information in a way dence between the generalised version of window in- which integrates lexical semantics with syntax and for- ference and natural deduction is described. This corre- mal semantics. The LRL is a typed feature structure lan- spondence forms the basis of a window inference tool guage which makes it possible to represent the lexicon that has been built on top of the HOL theorem proving as a highly structured object and to capture relation- system. ships between individual word senses by (default) in- This dissertation adopts a uniform treatment of heritance and by lexical rules. The extension to multi- specifications and programs as predicates. A survey of lingual representation allows a concise and natural de- the existing approaches to the treatment of programs scription of translation mismatches. Most of this report as predicates is presented. A new approach is then de- consists of a detailed formal description of the LRL — veloped based on using predicates of a three-valued this is augmented with appendices containing the user logic. This new approach can distinguish more easily manual, an implementation outline and a discussion of between specifications of terminating and nonterminat- some of the algorithms used, and a bibliography of pa- ing behaviour than can the existing approaches. pers which describe the LKB and its use within AC- A method of program refinement is then described QUILEX. (Some of this material has been published by combining the unified treatment of specifications previously, but is included here to make this report a and programs as three-valued predicates with the win- convenient reference source.) dow inference style of transformational reasoning. The result is a simple method of refinement that is well UCAM-CL-TR-317 suited to the provision of tool support. The method of refinement includes a technique for developing recursive programs. The proof of such de- John Peter Van Tassel: velopments is usually complicated because little can be Femto-VHDL: assumed about the form and termination properties of a partially developed program. These difficulties are the semantics of a subset of VHDL side-stepped by using a simplified meaning for recur- and its embedding in the HOL proof sion that compels the development of terminating pro- grams. Once the development of a program is complete, assistant the simplified meaning for recursion is refined into the true meaning. November 1993, 122 pages, paper copy The dissertation concludes with a case study which PhD thesis (Gonville & Caius College, July 1993) presents the specification and development of a simple

69 line-editor. The case study demonstrates the applicabil- Abstract: Several theorem provers provide commands ity of the refinement method to real-world problems. for formalizing recursive datatypes or inductively de- The line editor is a nontrivial example that contains fined sets. This paper presents a new approach, based features characteristic of large developments, including on fixedpoint definitions. It is unusually general: it ad- complex data structures and the use of data abstrac- mits all monotone inductive definitions. It is concep- tion. Examination of the case study shows that window tually simple, which has allowed the easy implementa- inference offers a convenient way of structuring large tion of mutual recursion and other conveniences. It also developments. handles coinductive definitions: simply replace the least fixedpoint by a greatest fixedpoint. This represents the UCAM-CL-TR-319 first automated support for coinductive definitions. The method has been implemented in Isabelle’s for- Mark David Hayter: malization of ZF set theory. It should be applicable to any logic in which the Knaster-Tarski Theorem can be A workstation architecture to proved. The paper briefly describes a method of formal- izing non-well-founded data structures in standard ZF support multimedia set theory. November 1993, 99 pages, PostScript Examples include lists of n elements, the accessible part of a relation and the set of primitive recursive func- PhD thesis (St John’s College, September 1993) tions. One example of a coinductive definition is bisim- ulations for lazy lists. Recursive datatypes are examined Abstract: The advent of high speed networks in the in detail, as well as one example of a “codatatype”: lazy wide and local area enables multimedia traffic to be lists. The appendices are simple user’s manuals for this easily carried between workstation class machines. The Isabelle/ZF package. dissertation considers an architecture for a workstation to support such traffic effectively. In addition to pre- senting the information to a human user the architec- UCAM-CL-TR-321 ture allows processing to be done on continuous media streams. Andrew M. Pitts: The proposed workstation architecture, known as Relational properties of domains the Desk Area Network (DAN), extends ideas from Asynchronous Transfer Mode (ATM) networks into the December 1993, 38 pages, PostScript end-system. All processors and devices are connected to an ATM interconnect. The architecture is shown to Abstract: New tools are presented for reasoning about be capable of supporting both multimedia data streams properties of recursively defined domains. We work and more traditional CPU cache line traffic. The advo- within a general, category-theoretic framework for var- cated extension of the CPU cache which allows caching ious notions of ‘relation’ on domains and for actions of multimedia data streams is shown to provide a natu- of domain constructors on relations. Freyd’s analysis of ral programming abstraction and a mechanism for syn- recursive types in terms of a property of mixed initial- chronising the processor with the stream. ity/finality is transferred to a corresponding property A prototype DAN workstation has been built. Ex- of invariant relations. The existence of invariant rela- periments have been done to demonstrate the features tions is proved under completeness assumptions about of the architecture. In particular the use of the DAN as the notion of relation. We show how this leads to sim- a processor-to-memory interconnect is closely studied pler proofs of the computational adequacy of denota- to show the practicality of using ATM for cache line tional semantics for functional programming languages traffic in a real machine. Simple demonstrations of the with user-declared datatypes. We show how the initial- stream cache ideas are used to show its utility in future ity/finality property of invariant relations can be spe- applications. cialized to yield an induction principle for admissible subsets of recursively defined domains, generalizing the UCAM-CL-TR-320 principle of structural induction for inductively defined sets. We also show how the initiality/finality property Lawrence C. Paulson: gives rise to the co-induction principle studied by the author (in UCAM-CL-TR-252), by which equalities be- A fixedpoint approach to tween elements of recursively defined domains may be proved via an appropriate notion of ‘bisimulation’. implementing (co)inductive definitions (updated version) UCAM-CL-TR-322 July 1995, 29 pages, PDF, DVI Guangxing Li: Supporting distributed realtime computing

70 December 1993, 113 pages, paper copy UCAM-CL-TR-325 PhD thesis (King’s College, August 1993) Richard Crouch: UCAM-CL-TR-323 The temporal properties of English J. von Wright: conditionals and modals Representing higher-order logic January 1994, 248 pages, PDF proofs in HOL PhD thesis (April 1993)

January 1994, 28 pages, PDF Abstract: This thesis deals with the patterns of temporal reference exhibited by conditional and modal sentences Abstract: When using a theorem prover based on clas- in English, and specifically with the way that past and sical logic, such as HOL [2], we are generally inter- present tenses can undergo deictic shift in these con- ested in the facts that are proved (the theorems) than in texts. This shifting behaviour has consequences both the way in which they were proved (the proofs). How- for the semantics of tense and for the semantics of con- ever we may be interested in checking the correctness ditionals and modality. of the proofs. Since machine-generated proofs are gen- Asymmetries in the behaviour of the past and eraly very long we need a computer program, a proof present tenses under deictic shift are explained by checker, to do this. However, we would also want the positing a primary and secondary deictic centre for correctness of the proof checker to be verified formally. tenses. The two deictic centres, the assertion time and One way of doing this is by specifying it in a mecha- the verification time, are given independent motivation nised logic (such as that of the HOL system) and then through an information based view of tense. This holds doing a correctness proof in that logic. While this may that the tense system not only serves to describe the seem circular, it is acceptable provided we have a theory way that the world changes over time, but also the way of proofs embedded in the logic. that information about the world changes. Information This paper describes an attempt to formalise the no- change takes place in two stages. First, it is asserted tion of HOL proofs within HOL. The aim is to be able that some fact holds. And then, either at the same time to verify (inside HOL) that what is claimed to be a or later, it is verified that is assertion is correct. proof really is a proof. Typically, assertion and verification occur simulta- neously, and most sentences convey verified informa- UCAM-CL-TR-324 tion. Modals and conditionals allow delayed assertion and verification. “If A, then B” means roughly: suppose J. von Wright: you were now to assert A; if and when A is verified, you Verifying modular programs in will be in a position to assert B, and in due course this assertion will also be verified. Since A and B will both HOL be tensed clauses, the shifting of the primary and sec- ondary deictic centres leads to shifted interpretations of January 1994, 25 pages, PDF the two clauses. The thesis presents a range of temporal properties Abstract: This paper describes a methodology for veri- of indicative and subjunctive conditionals that have not fying imperative programs that are modular, i.e., built previously been discussed, and shows how they can be using separately defined functions and procedures. explained. A logic is presented for indicative condition- The verification methodology is based on a simple als, based around an extension of intuitionistic logic to programming notation with a weak precondition se- allow for both verified and unverified assertions. This mantics. This notation has been semantically embedded logic naturally gives rise to three forms of epistemic in the HOL theorem prover [3] and a number of laws modality, corresponding to “must”, “may” and “will”. have been derived from the semantics. These semantic laws are used to prove the correct- ness of functional procedures, by showing that a call to UCAM-CL-TR-326 the procedure in question is equivalent to a call to the corresponding function as it is defined in the logic. This Sai-Lai Lo: makes it possible to specify a program in an essentially functional style, but the functions are then implemented A modular and extensible network as imperative procedures (like user-defined functions in storage architecture FORTRAN or Pascal). We also show how to define non-functional proce- January 1994, 147 pages, PostScript dures and calls to such procedures. Procedures may be PhD thesis (Darwin College, November 1993) recursive. Altogether, this gives us a basis for mechani- cal verification of modular imperative programs.

71 Abstract: Most contemporary distributed file systems UCAM-CL-TR-329 are not designed to be extensible. This work asserts that the lack of extensibility is a problem because: Paul Curzon: – New data types, such as continuous-medium data and structured data, are significantly different from The formal verification of the conventional unstructured data, such as text and bi- nary, that contemporary distributed file systems are Fairisle ATM switching element built to support. March 1994, 105 pages, paper copy – Value-adding clients can provide functional en- hancements, such as convenient and reliable persistent UCAM-CL-TR-330 programming and automatic and transparent file index- ing, but cannot be integrated smoothly with contempo- rary distributed file systems. Pierre David Wellner: – New media technologies, such as the optical juke- box and RAID disk, can extend the scale and per- Interacting with paper on the formance of a storage service but contemporary dis- DigitalDesk tributed file systems do not have a clear framework to incorporate these new technologies and to provide the March 1994, 96 pages, PDF necessary user level transparency. PhD thesis (Clare Hall, October 1993) Motivated by these observations, the new network storage architecture (MSSA) presented in this disserta- Abstract: In the 1970’s Xerox PARC developed the tion, is designed to be extensible. Design modularity is “desktop metaphor,” which made computers easy to taken as the key to achieve service extensibility. This use by making them look and act like ordinary desks dissertation examines a number of issues related to the and paper. This led visionaries to predict the “paper- design of the architecture. New ideas, such as a flexi- less office” would dominate within a few years, but the ble access control mechanism based on temporary ca- trouble with this prediction is that people like paper pabilities, a low level storage substrate that uses non- too much. It is portable, tactile, universally accepted, volatile memory to provide atomic update semantics at and easier to read than a screen. Today, we continue to high performance, a concept of sessions to differenti- use paper, and computers produce more of it than they ate performance requirements of different data types, replace. are introduced. Prototype implementations of the key Instead of trying to use computers to replace paper, components are evaluated. the DigitalDesk takes the opposite approach. It keeps the paper, but uses computers to make it more power- UCAM-CL-TR-327 ful. It provides a Computer Augmented Environment for paper. Siani L. Baker: The DigitalDesk is built around an ordinary physi- cal desk and can be used as such, but it has extra ca- A new application for pabilities. A video camera is mounted above the desk, explanation-based generalisation pointing down at the work surface. This camera’s out- put is fed through a system that can detect where the within automated deduction user is pointing, and it can read documents that are placed on the desk. A computer-driven electronic pro- February 1994, 18 pages, PDF jector is also mounted above the desk, allowing the sys- tem to project electronic objects onto the work surface Abstract: Generalisation is currently a major theorem- and onto real paper documents — something that can’t proving problem. This paper proposes a new method of be done with flat display panels or rear-projection. The generalisation, involving the use of explanation-based system is called DigitalDesk because it allows pointing generalisation within a new domain, which may suc- with the fingers. ceed when other methods fail. The method has been Several applications have been prototyped on the implemented for simple arithmetical examples. DigitalDesk. The first was a calculator where a sheet of paper such as an annual report can be placed on the UCAM-CL-TR-328 desk allowing the user to point at numbers with a fin- ger or pen. The camera reads the numbers off the pa- Paul Curzon: per, recognizes them, and enters them into the display The formal verification of the for further calculations. Another is a translation sys- tem which allows users to point at unfamiliar French Fairisle ATM switching element: words to get their English definitions projected down an overview next to the paper. A third is a paper-based paint pro- gram (PaperPaint) that allows users to sketch on pa- March 1994, 46 pages, paper copy per using traditional tools, but also be able to select

72 and paste these sketches with the camera and projec- Abstract: This paper re-addresses the old problem of tor to create merged paper and electronic documents. providing a categorical model for Intuitionistic Linear A fourth application is the DoubleDigitalDesk, which Logic (ILL). In particular we compare the new standard allows remote colleagues to “share” their desks, look model proposed by Seely to the lesser known one pro- at each other’s paper documents and sketch on them posed by Benton, Bierman, Hyland and de Paiva. Sur- remotely. prisingly we find that Seely’s model is unsound in that This dissertation introduces the concept of Com- it does not preserve equality of proofs — we shall give puter Augmented Environments, describes the Digi- some examples of equal proofs which do not seem to be talDesk and applications for it, and discusses some modelled as equal morphisms in the category. We shall of the key implementation issues that need to be ad- propose how to adapt Seely’s definition so as to correct dressed to make this system work. It describes a toolkit these problems and consider how this compares with for building DigitalDesk applications, and it concludes the model due to Benton et al. with some more ideas for future work. UCAM-CL-TR-334 UCAM-CL-TR-331 Lawrence C. Paulson: Noha Adly, Akhil Kumar: A concrete final coalgebra theorem HPP: a hierarchical propagation for ZF set theory protocol for large scale replication in May 1994, 21 pages, PDF, PostScript, DVI wide area networks Abstract: A special final coalgebra theorem, in the style of Aczel (1988), is proved within standard Zermelo- March 1994, 24 pages, PDF Fraenkel set theory. Aczel’s Anti-Foundation Axiom is replaced by a variant definition of function that admits Abstract: This paper describes a fast, reliable, scal- non-well-founded constructions. Variant ordered pairs able and efficient propagation protocol for weak- and tuples, of possibly infinite length, are special cases consistency replica management. This protocol can be of variant functions. Analogues of Aczel’s Solution and used to implement a bulletin board service such as the Substitution Lemmas are proved in the style of Rutten Usenet news on the Internet. It is based on organizing and Turi (1993). the nodes in a network into a logical hierarchy, and The approach is less general than Aczel’s; non-well- maintaining a limited amount of state information at founded objects can be modelled only using the vari- each node. It ensures that messages are not lost due to ant tuples and functions. But the treatment of non-well- failures or partitions once they are repaired and min- founded objects is simple and concrete. The final coal- imizes redundancy. Further the protocol allows mes- gebra of a functor is its greatest fixedpoint. The the- sages to be diffused while nodes are down provided the ory is intended for machine implementation and a sim- parent and child nodes of a failed node are alive. More- ple case of it is already implemented using the theorem over the protocol allows nodes to be moved in the log- prover Isabelle. ical hierarchy, and the network to be restructured dy- namically in order to improve performance while still UCAM-CL-TR-335 ensuring that no messages are lost while the switch takes place and without disturbing normal operation. G.J.F. Jones, J.T. Foote, K. Sparck¨ Jones, S.J. Young: UCAM-CL-TR-332 Video mail retrieval using voice: David Martin Evers: report on keyword definition and Distributed computing with objects data collection (deliverable report on March 1994, 154 pages, paper copy VMR task No. 1) PhD thesis (Queens’ College, September 1993) April 1994, 38 pages, PDF

UCAM-CL-TR-333 Abstract: This report describes the rationale, design, collection and basic statistics of the initial training and G.M. Bierman: test database for the Cambridge Video Mail Retrieval (VMR) project. This database is intended to support What is a categorical model of both training for the wordspotting processes and test- ing for the document searching methods using these intuitionistic linear logic? that are being developed for the project’s message re- April 1994, 15 pages, PDF trieval task.

73 UCAM-CL-TR-336 reasoning. Existing programs in the HOL system re- quire little or no modification to work faster. Barnaby P. Hilken: The other major contribution of this thesis is a framework in which part of the computation involved Towards a proof theory of rewriting: in HOL proofs can be postponed. This enables users to make better use of their time. The technique exploits a the simply-typed 2-λ calculus form of lazy evaluation. The critical feature is the sepa- May 1994, 28 pages, PDF ration of the code that generates the structure of a theo- rem from the code that justifies it logically. Delaying the Abstract: This paper describes the simply typed 2-λ- justification allows some non-local optimisations to be calculus, a language with three levels, types, terms and performed in equational reasoning. None of the tech- rewrites. The types and terms are those of the simply niques sacrifice the security of the fully-expansive ap- typed λ-calculus, and the rewrites are expressions de- proach. noting sequences of β-reductions and η-expansions. An A decision procedure for a subset of the theory of equational theory is imposed on the rewrites, based on linear arithmetic is used to illustrate many of the tech- 2-categorical justifications, and the word problem for niques. Decision procedures for this theory are com- this theory is solved by finding a canonical expression monplace in theorem provers due to the importance of in each equivalence class. arithmetic reasoning. The techniques described in the The canonical form of rewrites allows us to prove thesis have been implemented and execution times are several properties of the calculus, including a strong given. The implementation of the arithmetic procedure form of confluence and a classification of the long-β- is a major contribution in itself. For the first time, users η-normal forms in terms of their rewrites. Finally we of the HOL system are able to prove many arithmetic use these properties as the basic definitions of a the- lemmas automatically in a practical amount of time ory of categorical rewriting, and find that the expected (typically a second or two). relationships between confluence, strong normalisation The applicability of the techniques to other fully- and normal forms hold. expansive theorem provers and possible extensions of the ideas are considered. UCAM-CL-TR-337 UCAM-CL-TR-338 Richard John Boulton: Zhixue Wu: Efficiency in a fully-expansive A new approach to implementing theorem prover atomic data types May 1994, 126 pages, DVI May 1994, 170 pages, paper copy PhD thesis (Churchill College, December 1993) PhD thesis (Trinity College, October 1993) Abstract: The HOL system is a fully-expansive theorem prover: Proofs generated in the system are composed UCAM-CL-TR-339 of applications of the primitive inference rules of the underlying logic. This has two main advantages. First, Brian Logan, Steven Reece, Alison Cawsey, the soundness of the system depends only on the imple- Julia Galliers, Karen Sparck¨ Jones: mentations of the primitive rules. Second, users can be given the freedom to write their own proof procedures Belief revision and dialogue without the risk of making the system unsound. A full management in information retrieval functional programming language is provided for this purpose. The disadvantage with the approach is that May 1994, 227 pages, PDF performance is compromised. This is partly due to the inherent cost of fully expanding a proof but, as demon- Abstract: This report describes research to evaluate a strated in this thesis, much of the observed inefficiency theory of belief revision proposed by Galliers in the is due to the way the derived proof procedures are writ- context of information-seeking interaction as modelled ten. by Belkin, Brooks and Daniels and illustrated by user- This thesis seeks to identify sources of non-inherent librarian dialogues. The work covered the detailed as- inefficiency in the HOL system and proposes some sessment and development, and computational imple- general-purpose and some specialised techniques for mentation and testing, of both the belief revision theory eliminating it. One area that seems to be particularly and the information retrieval model. Some features of amenable to optimisation is equational reasoning. This the belief theory presented problems, and the original is significant because equational reasoning constitutes ‘multiple expert’ retrieval model had to be drastically large portions of many proofs. A number of techniques modified to support rational dialogue management. But are proposed that transparently optimise equational the experimental results showed that the characteristics

74 of literature seeking interaction could be successfully Abstract: Distributed computing environments can captured by the belief theory, exploiting important el- now support digital continuous media (such as audio ements of the retrieval model. Thus, though the sys- and video) in addition to still media (such as text and tem’s knowledge and dialogue performance were very pictures). The work presented in this dissertation is mo- limited, it provides a useful base for further research. tivated by the desire of application developers to cre- The report presents all aspects of the research in de- ate applications which utilise these multimedia environ- tail, with particular emphasis on the implementation of ments. Many important application areas are emerg- belief and intention revision, and the integration of re- ing such as Computer-Aided Instruction (CAI) and vision with domain reasoning and dialogue interaction. Computer-Supported Cooperative Working (CSCW). Building multimedia applications is currently a dif- UCAM-CL-TR-340 ficult and time consuming process. At run-time, an ap- plication must manage connections to a range of het- Eoin Andrew Hyden: erogeneous sevices to access data. Building applications directly on top of environment specific features roots Operating system support for quality them to those features. Continuous media introduces new problems into application management such as of service control of Quality of Service (QoS) and synchronisa- June 1994, 102 pages, PDF tion of data items. An application may also be required to analyse, process or display data. Some multimedia PhD thesis (Wolfson College, February 1994) applications are event-driven, i.e. they must perform actions in response to asynchronous run-time occur- Abstract: The deployment of high speed, multiservice rences. They may also be required to control many networks within the local area has meant that it has workspaces and involve multiple users. become possible to deliver continuous media data to a The thesis of this dissertation is based on two prin- general purpose workstation. This, in conjunction with ciples. Firstly, despite the heterogeneity between and the increasing speed of modern microprocessors, means within multimedia environments, that their function- that it is now possible to write application programs ality should be provided in a uniform way to appli- which manipulate continuous media in real-time. Un- cation developers. By masking the control differences fortunately, current operating systems do not provide with generic abstractions, applications can easily be de- the resource management facilities which are required veloped and ported. Secondly, that it is possible to de- to ensure the timely execution of such applications. velop such abstractions to support a wide range of mul- This dissertation presents a flexible resource man- timedia applications. Extensible and configurable facil- agement paradigm, based on the notion of Quality of ities can be provided to access, and present multimedia Service, with which it is possible to provide the schedul- data and to support event-diven applications including ing support required by continuous media applications. cooperative ones. The mechanisms which are required within an operat- The approach taken in this work is to provide a ing system to support this paradigm are described, and presentation support platform. To application develop- the design and implementation of a prototypical kernel ers this platform offers an authoring interface based which implements them is presented. on data modelling and specification using a script lan- It is shown that, by augmenting the interface be- guage. Using these facilities, the parts of an application tween an application and the operating system, the ap- involving interactive presentation of multimedia can be plication can be informed of varying resource availabil- specified. Services have been built to support the run- ities, and can make use of this information to vary the time realisation of authored presentations on top of en- quality of its results. In particular an example decoder vironments. Experiments show that a wide range of ap- application is presented, which makes use of such in- plications can be supported. formation and exploits some of the fundamental prop- erties of continuous media data to trade video image UCAM-CL-TR-342 quality for the amount of processor time which it re- ceives. Stephen Martin Guy Freeman: UCAM-CL-TR-341 An architecture for distributed user interfaces John Bates: July 1994, 127 pages, PDF Presentation support for distributed PhD thesis (Darwin College, 1994) multimedia applications Abstract: Computing systems have changed rapidly June 1994, 140 pages, PostScript since the first graphical user interfaces were developed. Hardware has become faster and software architectures have become more flexible and more open; a mod- ern computing system consists of many communicating

75 machines rather than a central host. Understanding of the CORE system which implements a version of the human-computer interaction has also become more so- primitive recursive ω-rule. This involves providing an phisticated and places new demands on interactive soft- appropriate representation for infinite proofs, and a ware; these include, in particular, support for multi-user means of verifying properties of such objects. By means applications, continuous media, and ‘ubiquitous’ com- of the CORE system, from a finite number of instances puting. The layer which binds user requirements and a conjecture of the proof of the universally quantified computing systems together, the user interface, has not formula is automatically derived by an inductive infer- changed as quickly; few user interface architectures can ence algorithm, and checked for correctness. In addi- easily supportthe new requirements placed on them and tion, candidates for cut formulae may be generated by few take advantage of the facilities offered by advanced an explanation-based learning algorithm. This is an al- computing systems. ternative approach to reasoning about inductively de- Experiences of implementing systems with unusual fined domains from traditionas structural induction, user interfaces has shown that current window system which may sometimes be more intuitive. models are only a special case of possible user interface architectures. These window systems are too strongly UCAM-CL-TR-346 tied to assumptions about how users and computers in- teract to provide a suitable platform for further evolu- G.M. Bierman: tion. Users and application builders may reasonably ex- pect to be able to use multiple input and output devices On intuitionistic linear logic as their needs arise. Experimental applications show that flexible user interface architectures, which support August 1994, 191 pages, paper copy multiple devices and users, can be built without exces- PhD thesis (Wolfson College, December 1993) sive implementation and processing costs. This dissertation describes Gemma, a model for a Abstract: In this thesis we carry out a detailed study of new generation of interactive systems that are not con- the (propositional) intuitionistic fragment of Girard’s fined to virtual terminals but allows collections of in- linear logic (ILL). Firstly we give sequent calculus, nat- dependent devices to be bound together for the task at ural deduction and axiomatic formulations of ILL. In hand. It provides mediated shared access to basic de- particular our natural deduction is different from oth- vices and higher-level virtual devices so that people can ers and has important properties, such as closure un- share computational facilities in the real world, rather der substitution, which others lack. We also study the than in a virtual world. An example window system process of reduction in all three local formulations, in- shows how these features may be exploited to provide cluding a detailed proof of cut elimination. Finally, we a flexible, collaborative and mobile interactive environ- consider translations between Instuitionistic Logic (IL) ment. and ILL. We then consider the linear term calculus, which UCAM-CL-TR-344 arises from applying the Curry-Howard correspon- dence to the natural deduction formulation. We show Martin John Turner: how the various proof theoretic formulations suggest reductions at the level of terms. The properties of strong The contour tree image encoding normalization and confluence are proved for these re- duction rules. We also consider mappings between the technique and file format extended λ-calculus and the linear term calculus. July 1994, 154 pages, paper copy Next we consider a categorical model for ILL. We PhD thesis (St John’s College, April 1994) show how by considering the linear term calculus as an equational logic, we can derive a model: a linear category. We consider two alternative models: firstly, UCAM-CL-TR-345 one due to Seely and then one due to Lafont. Surpris- ingly, we find that Seely’s model is not sound, in that Siani L. Baker: equal terms are not modelled with equal morphisms. We show how after adapting Seely’s model (by view- A proof environment for arithmetic ing it in a more abstract setting) it becomes a particular with the Omega rule instance of a linear category. We show how Lafont’s model can also be seen as another particular instance August 1994, 17 pages, PDF of a linear category. Finally we consider various cate- gories of coalgebras, whose construction can be seen Abstract: An important technique for investigating the as a categorical equivalent of the translation of IL into derivability in formal systems of arithmetic has been to ILL. embed such systems into semi-formal systems with the ω-rule. This paper exploits this notion within the do- main of automated theorem-proving and discusses the implementation of such a proof environment, namely

76 UCAM-CL-TR-347 UCAM-CL-TR-351

Karen Sparck¨ Jones: Subir Kumar Biswas: Reflections on TREC Handling realtime traffic in mobile July 1994, 35 pages, PostScript, DVI networks

Abstract: This paper discusses the Text REtrieval Con- September 1994, 198 pages, PostScript ferences (TREC) programme as a major enterprise in PhD thesis (Darwin College, August 1994) information retrieval research. It reviews its structure as an evaluation exercise, characterises the methods of Abstract: The rapidly advancing technology of cellu- indexing and retrieval being tested within it in terms lar communication and wireless LAN makes ubiquitous of the approaches to system performance factors these computing feasible where the mobile users can have ac- represent; analyses the test results for solid, overall con- cess to the location independent information and the clusions that can be drawn from them; and, in the light computing resources. Multimedia networking is an- of the particular features of the test data, assesses TREC other emerging technological trend of the 1990s and both for generally-applicable findings that emerge from there is an increasing demand for supporting continu- it and for directions it offers for future research. ous media traffic in wireless personal communication environment. In order to guarantee the strict perfor- UCAM-CL-TR-348 mance requirements of realtime traffic, the connection- oriented approaches are proving to be more efficient compared to the conventional datagram based net- Jane Louise Hunter: working. This dissertation deals with a network ar- Integrated sound synchronisation for chitecture and its design issues for implementing the connection-oriented services in a mobile radio environ- computer animation ment. August 1994, 248 pages, paper copy The wired backbone of the proposed wireless LAN comprises of high speed ATM switching elements, con- PhD thesis (Newnham College, August 1994) nected in a modular fashion, where the new switches and the user devices can be dynamically added and re- UCAM-CL-TR-349 connected for maintaining a desired topology. A dy- namic reconfiguration protocol, which can cope with Brian Graham: these changing network topologies, is proposed for the present network architecture. The details about a pro- A HOL interpretation of Noden totype implementation of the protocol and a simulation September 1994, 78 pages, paper copy model for its performance evaluation are presented. CSMA/AED, a single frequency and carrier sensing UCAM-CL-TR-350 based protocol is proposed for the radio medium access operations. A simulation model is developed in order to investigate the feasibility of this statistical and reliable Jonathan P. Bowen, Michael G. Hinchey: access scheme for the proposed radio network archi- Ten commandments of formal tecture. The effectiveness of a per-connection window based flow control mechanism, for the proposed radio methods LAN, is also investigated. A hybrid technique is used, where the medium access and the radio data-link layers September 1994, 18 pages, PDF are modelled using the mentioned simulator; an upper layer end-to-end queueing model, involving flow de- Abstract: The formal methods community is in general pendent servers, is solved using an approximate Mean very good at undertaking research into the mathemati- Value Analysis technique which is augmented for faster cal aspects of formal methods, but not so good at pro- iterative convergence. mulgating the use of formal methods in an engineer- A distributed location server, for managing mobile ing environment and at an industrial scale. Technology users’ location information and for aiding the mobile transfer is an extremely important part of the overall connection management tasks, is proposed. In order to effort necessary in the acceptance of formal techniques. hide the effects of mobility from the non-mobile net- This paper explores some of the more informal aspects work entities, the concept of a per-mobile software en- of applying formal methods and presents some maxims tity, known as a “representative”, is introduced. A mo- with associated discussion that may help in the applica- bile connection management scheme is also proposed tion of formal methods in an industrial setting. A sig- for handling the end-to-end network layer connections nificant bibliography is included providing pointers to in the present mobile environment. The scheme uses the more technical and detailed aspects.

77 representatives and a novel connection caching tech- Abstract: Many new theorem provers implement strong nique for providing the necessary realtime traffic sup- and complicated type theories which eliminate some of port functionalities. the limitations of simple type theories such as the HOL A prototype system, comprising of the proposed lo- logic. A more accessible alternative might be to use a cation and the connection managers, has been built for combination of set theory and simple type theory as in demonstrating the feasibility of the presented architec- HOL-ST which is a version of the HOL system sup- ture for transporting continuous media traffic. A set of porting a ZF-like set theory in addition to higher order experiments have been carried out in order to inves- logic. This paper presents a case study on the use of tigate the impacts of various design decisions and to HOL-ST to build a model of the λ-calculus by formal- identify the performance-critical parts of the design. ising the inverse limit construction of domain theory. This construction is not possible in the HOL system it- UCAM-CL-TR-352 self, or in simple type theories in general.

P.N. Benton: UCAM-CL-TR-355 A mixed linear and non-linear logic: David Wheeler, Roger Needham: proofs, terms and models Two cryptographic notes October 1994, 65 pages, paper copy November 1994, 6 pages, PDF

UCAM-CL-TR-353 Abstract: A large block DES-like algorithm DES was designed to be slow in software. We give Mike Gordon: here a DES type of code which applies directly to sin- gle blocks comprising two or more words of 32 bits. Merging HOL with set theory It is thought to be at least as secure as performing DES separately on two word blocks, and has the added November 1994, 40 pages, PDF advantage of not requiring chaining etc. It is about 8m/(12+2m) times as fast as DES for an m word block Abstract: Set theory is the standard foundation for and has a greater gain for Feistel codes where the num- mathematics, but the majority of general purpose ber of rounds is greater. We use the name GDES for mechanized proof assistants support versions of type the codes we discuss. The principle can be used on any theory (higher order logic). Examples include Alf, Au- Feistel code. tomath, Coq, Ehdm, HOL, IMPS, Lambda, LEGO, TEA, a Tiny Encryption Algorithm Nuprl, PVS and Veritas. For many applications type We design a short program which will run on most theory works well and provides for specification the machines and encypher safely. It uses a large number benefits of type-checking that are well known in pro- of iterations rather than a complicated program. It is gramming. However, there are areas where types get in hoped that it can easily be translated into most lan- the way or seem unmotivated. Furthermore, most peo- guages in a compatible way. The first program is given ple with a scientific or engineering background already below. It uses little set up time and does a weak non know set theory, whereas type theory may appear in- linear iteration enough rounds to make it secure. There accessible and so be an obstacle to the uptake of proof are no preset tables or long set up times. It assumes 32 assistants based on it. This paper describes some ex- bit words. periments (using HOL) in combining set theory and type theory; the aim is to get the best of both worlds in a single system. Three approaches have been tried, UCAM-CL-TR-356 all based on an axiomatically specified type V of ZF- like sets: (i) HOL is used without any additions besides S.E. Robertson, K. Sparck¨ Jones: V; (ii) an embedding of the HOL logic into V is pro- Simple, proven approaches to vided; (iii) HOL axiomatic theories are automatically translated into set-theoretic definitional theories. These text retrieval approaches are illustrated with two examples: the con- December 1994, 8 pages, PDF struction of lists and a simple lemma in group theory. Abstract: This technical note describes straightforward UCAM-CL-TR-354 techniques for document indexing and retrieval that have been solidly established through extensive testing Sten Agerholm: and are easy to apply. They are useful for many differ- ent types of text material, are viable for very large files, Formalising a model of the λ-calculus and have the advantage that they do not require spe- in HOL-ST cial skills or training for searching, but are easy for end users. November 1994, 31 pages, PDF

78 UCAM-CL-TR-357 Abstract: Computer scientists take an interest in objects or events which can be counted, grouped, timed and Jonathan P. Bowen, Michael G. Hinchey: synchronised. The computational problems involved with the interpretation and notation of musical rhythm Seven more myths of formal methods are therefore of particular interest, as the most com- plex time-stamped structures yet devised by humankind December 1994, 12 pages, PDF are to be found in music notation. These problems are brought into focus when considering explicit polymet- Abstract: For whatever reason, formal methods remain ric notation, which is the concurrent use of different one of the more contentious techniques in industrial time signatures in music notation. While not in com- software engineering. Despite great increases in the mon use the notation can be used to specify compli- number of organizations and projects applying formal cated cross-rhythms, simple versus compound metres, methods, it is still the case that the vast majority of po- and unequal note values without the need for tuplet tential users of formal methods fail to become actual notation. From a computational point of view, explicit users. A paper by Hall in 1990 examined a number of polymetric notation is a means of specifying synchro- ‘myths’ concerning formal methods, assumed by some nisation relationships amongst multiple time-stamped to be valid. This paper considers a few more beliefs held streams. Human readers of explicit polymetic notation by many and presents some counter examples. use the time signatures together with the layout of bar- lines and musical events as clues to determine the per- UCAM-CL-TR-358 formance. However, if the aim is to lay out the notation (such as might be required by an automatic music no- Simon William Moore: tation processor), the location of barlines and musical events will be unknown, and it is necessary to calcu- Multithreaded late them given only the information conveyed by the time signatures. Similar problems arise when trying to February 1995, 125 pages, paper copy perform the notation (i.e. animate the specification) in PhD thesis (Trinity Hall, October 1994) real-time. Some problems in the interpretation of ex- This report was also published as a book of the plicit polymetric notation are identified and a solution same title (Kluwer/Springer-Verlag, 1996, ISBN is proposed. Two different interpretations are distin- 0-7923-9718-5). guished, and methods for their automatic calculation are given. The solution given may be applied to prob- UCAM-CL-TR-359 lems which involve the synchronisation or phase adjust- ment of multiple independent threads of time-stamped Jacob Frost: objects. A case study of co-induction in UCAM-CL-TR-361 Isabelle Richard John Black: February 1995, 48 pages, PDF, PostScript, DVI Explicit network scheduling Abstract: The consistency of the dynamic and static se- April 1995, 121 pages, PostScript mantics for a small functional programming language PhD thesis (Churchill College, December 1994) was informally proved by R. Milner and M. Tofte. The notions of co-inductive definitions and the associated principle of co-induction played a pivotal role in the Abstract: This dissertation considers various problems proof. With emphasis on co-induction, the work pre- associated with the scheduling and network I/O organ- sented here deals with the formalisation of this result in isation found in conventional operating systems for ef- the generic theorem prover Isabelle. fective support for multimedia applications which re- quire Quality of Service. A solution for these problems is proposed in a UCAM-CL-TR-360 micro-kernel structure. The pivotal features of the pro- posed design are that the processing of device interrupts W.F. Clocksin: is performed by user-space processes which are sched- uled by the system like any other, that events are used On the calculation of explicit for both inter- and intra-process synchronisation, and polymetres the use of a specially developed high performance I/O buffer management system. March 1995, 12 pages, PDF An evaluation of an experimental implementation is included. In addition to solving the scheduling and net- working problems addressed, the prototype is shown

79 to out-perform the Wanda system (a locally developed Abstract: Many functional programming languages rely micro-kernel) on the same platform. on the elimination of ‘impure’ features: assignment to This dissertation concludes that it is possible to con- variables, exceptions and even input/output. But some struct an operating system where the kernel provides of these are genuinely useful, and it is of real interest to only the fundamental job of fine grain sharing of the establish how they can be reintroducted in a controlled CPU between processes, and hence synchronisation be- way. This dissertation looks in detail at one example of tween those processes. This enables processes to per- this: the addition to a functional language of dynami- form task specific optimisations; as a result system per- cally generated “names”. Names are created fresh, they formance is enhanced, both with respect to throughput can be compared with each other and passed around, and the meeting of soft real-time guarantees. but that is all. As a very basic example of “state”, they capture the graduation between private and public, lo- UCAM-CL-TR-362 cal and global, by their interaction with higher-order functions. Mark Humphrys: The vehicle for this study is the “nu-calculus”, an extension of the simply-typed lambda-calculus. The nu- W-learning: calculus is equivalent to a certain fragment of Standard ML, omitting side-effects, exceptions, datatypes and re- competition among selfish Q-learners cursion. Even without all these features, the interaction April 1995, 30 pages, PostScript of name creation with higher-order functions can be complex and subtle. Various operational and denotational methods for Abstract: W-learning is a self-organising action- reasoning about the nu-calculus are developed. These selection scheme for systems with multiple paral- include a computational metalanguage in the style of lel goals, such as autonomous mobile robots. It Moggi, which distinguishes in the type system between uses ideas drawn from the subsumption architecture values and computations. This leads to categorical for mobile robots (Brooks), implementing them with models that use a strong monad, and examples are de- the Q-learning algorithm from reinforcement learning vised based on functor categories. (Watkins). Brooks explores the idea of multiple sensing- The idea of “logical relations” is used to derive and-acting agents within a single robot, more than one powerful reasoning methods that capture some of the of which is capable of controlling the robot on its own distinction between private and public names. These if allowed. I introduce a model where the agents are techniques are shown to be complete for establishing not only autonomous, but are in fact engaged in direct contextual equivalence between first-order expressions; competition with each other for control of the robot. they are also used to construct a correspondingly ab- Interesting robots are ones where no agent achieves stract categorical model. total victory, but rather the state-space is fragmented All the work with the nu-calculus extends cleanly to among different agents. Having the agents operate by Reduced ML, a larger language that introduces integer Q-learning proves to be a way to implement this, lead- references: mutable storage cells that are dynamically ing to a local, incremental algorithm (W-learning) to allocated. It turns out that the step up is quite simple, resolve competition. I present a sketch proof that this and both the computational metalanguage and the sam- algorithm converges when the world is a discrete, finite ple categorical models can be reused. Markov decision process. For each state, competition is resolved with the most likely winner of the state being UCAM-CL-TR-364 the agent that is most likely to suffer the most if it does not win. In this way, W-learning can be viewed as ‘fair’ Ole Rasmussen: resolution of competition. In the empirical section, I show how W-learning may be used to define spaces of The Church-Rosser theorem in agent-collections whose action selection is learnt rather than hand-designed. This is the kind of solution-space Isabelle: that may be searched with a genetic algorithm. a proof porting experiment April 1995, 27 pages, PostScript UCAM-CL-TR-363 Abstract: This paper describes a proof of the Church- Ian Stark: Rosser theorem for the pure lambda-calculus for- malised in the Isabelle theorem prover. The initial ver- Names and higher-order functions sion of the proof is ported from a similar proof done in the Coq proof assistant by Girard Huet, but a num- April 1995, 140 pages, PostScript, DVI ber of optimisations have been performed. The devel- PhD thesis (Queens’ College, December 1994) opment involves the introduction of several inductive and recursive definitions and thus gives a good presen- tation of the inductive package of Isabelle.

80 UCAM-CL-TR-365 Abstract: The variety of upcoming applications in terms of their performance and Quality-of-Service (QoS) re- P.N. Benton, G.M. Bierman, V.C.V. de Paiva: quirements is increasing. Besides almost well-known applications, such as teleconferencing, audio- and Computational types from a video-transmissions, even more contemporary ones, such as medical imaging, Video-on-Demand, and in- logical perspective I teractive tutoring systems, are introduced and applied May 1995, 19 pages, PDF to existing networks. On the contrary, traditionally data-oriented applications, such as file transfer and re- Abstract: Moggi’s computational lambda calculus is a mote login, are considerably different in terms of their metalanguage for denotational semantics which arose QoS requirements. Therefore, the consequences of this from the observation that many different notions of evolution effect the architectures of end-systems, e.g., computation have the categorical structure of a strong workstations that have to be capable of maintaining all monad on a cartesian closed category. In this paper different kinds of multi-media data, and intermediate- we show that the computational lambda calculus also systems as well. arises naturally as the term calculus corresponding (by Therefore, a configuration approach of communi- the Curry-Howard correspondence) to a novel intu- cation protocols has been developed to support the itionistic modal propositional logic. We give natural variety of applications. This approach offers the pos- deduction, sequent calculus and Hilbert-style presen- sibility to configure communication protocols auto- tations of this logic and prove a strong normalisation matically depending on the application requirements result. expressed in various QoS parameters. The result, an application-tailored communication protocol, matches the requested application requirements as far as possi- UCAM-CL-TR-366 ble. Additionally, network and system resources (NSR) are taken into account for a well-suited configuration. K. Sparck¨ Jones, G.J.F. Jones, J.T. Foote, The Configuration of Protocols in TIP is called Cog- S.J. Young: PiT and is part of the Transport and Internetworking Package (TIP). As an example, in the TIP environment Retrieving spoken documents: the transport protocol TEMPO is used for configura- VMR Project experiments tion purposes.

May 1995, 28 pages, paper copy UCAM-CL-TR-369

UCAM-CL-TR-367 Sten Agerholm:

Andrew M. Pitts: A comparison of HOL-ST and Categorical logic Isabelle/ZF July 1995, 23 pages, PDF May 1995, 94 pages, PostScript, DVI Abstract: The use of higher order logic (simple type Abstract: This document provides an introduction to theory) is often limited by its restrictive type system. the interaction between category theory and mathemat- Set theory allows many constructions on sets that are ical logic which is slanted towards computer scientists. not possible on types in higher order logic. This paper It will be a chapter in the forthcoming Volume VI of: presents a comparison of two theorem provers support- S. Abramsky, D. M. Gabbay, and T. S. E. Maibaum ing set theory, namely HOL-ST and Isabelle/ZF, based (eds), “Handbook of Logic in Computer Science”, Ox- on a formalization of the inverse limit construction of ford University Press. domain theory; this construction cannot be formalized in higher order logic directly. We argue that whilst the UCAM-CL-TR-368 combination of higher order logic and set theory in HOL-ST has advantages over the first order set theory Burkhard Stiller: in Isabelle/ZF, the proof infrastructure of Isabelle/ZF has better support for set theory proofs than HOL-ST. CogPiT – configuration of protocols Proofs in Isabelle/ZF are both considerably shorter and in TIP easier to write. June 1995, 73 pages, PostScript UCAM-CL-TR-370

81 Sten Agerholm: only networks as well as data services planned for the GSM system. Section 4 covers some security issues and A package for non-primitive recursive section 5 gives an insight into the realities today with function definitions in HOL details of some networks available in the UK. Finally, section 6 concludes this overview with a brief look into July 1995, 36 pages, PDF the future.

Abstract: This paper provides an approach to the prob- UCAM-CL-TR-373 lem of introducing non-primitive recursive function definitions in the HOL system. A recursive specification is translated into a domain theory version, where the re- Benjamın´ Macıas,´ Stephen G. Pulman: cursive calls are treated as potentially non-terminating. Natural-language processing and Once we have proved termination, the original speci- fication can be derived easity. Automated tools imple- requirements specifications mented in HOL88 are provided to support the defini- July 1995, 73 pages, paper copy tion of both partial recursive functions and total recur- sive functions which have well founded recursive spec- ifications. There are constructions for building well- UCAM-CL-TR-374 founded relations easily. Burkhard Stiller: UCAM-CL-TR-371 A framework for QoS updates in a Kim Ritter Wagner: networking environment LIMINF convergence in Ω-categories July 1995, PostScript

June 1995, 28 pages, PDF Abstract: The support of sufficient Quality-of-Service (QoS) for applications residing in a distributed environ- Abstract: The aim of this article is twofold. From a ment and running on top of high performance networks mathematical perspective we present a notion of con- is a demanding issue. Currently, the areas to provide vergence which is suitably general such as to include this support adequately include communication proto- the convergence of chains to their least upper bounds cols, operating systems support, and offered network in preordered sets, and the convergence of Cauchy se- services. A configurable approach of communication quences to their metric limits in metric spaces. Rather protocols offers the needed protocol flexibility to react than presenting this theory from a purely mathemati- accordingly on various different requirements. cal perspective however, we will use it to introduce a Communication protocols and operating systems simple-minded domain theory based on a generic no- have to be parametrized using internal configuration tion of approximation. Although this is the use which parameters, such as window sizes, retry counters, or motivated the development of these concepts, it is scheduling mechanisms, that rely closely on requested hoped that this is not the only one. application-oriented or network-dependent QoS, such as bandwidth or delay. Moreover, these internal pa- UCAM-CL-TR-372 rameters have to be recalculated from time to time due to network changes (such as congestion or line break- Stefan G. Hild: down) or due to application-specific alterations (such as enhanced bandwidth requirements or increased reli- A brief history of mobile telephony ability) to adjust a temporary or semi-permanent “out- January 1995, 19 pages, PDF of-tune” service behavior. Therefore, a rule-based evaluation and QoS updat- Abstract: Mobile telephony has gone through a decade ing framework for configuration parameters in a net- of tremendous change and progress. Today, mobile working environment has been developed. The result- phones are an indispensable tool to many professionals, ing “rulework” can be used within highly dynamic en- and have great potential to become vital components in vironments in a communication subsystem that offers mobile data communication applications. In this sur- the possibility to specify for every QoS parameter both vey we will attempt to present some of the milestones a bounding interval of values and an average value. from the route which mobile telephony has taken over As an example, the framework has been integrated the past decades while developing from an experimen- in the Function-based Communication Subsystem (F- tal system with limited capabilities with to a mature CSS). Especially, an enhanced application service inter- technology (section 1), followd by a more detailed in- face is offered, allowing for the specification of various troduction into the modern pan-European GSM stan- QoS-parameters that are used to configure a sufficient dard (section 2). Section 3 is devoted to the data com- application-tailored communication protocol. munication services, covering two packet-oriented data

82 UCAM-CL-TR-375 decoupling hardware interrupts from the execution of device drivers. Feng Huang: Finally, a framework for high-level inter-domain and inter-machine communication is described, which Restructuring virtual memory to goes beyond object-based RPC systems to permit both support distributed computing Quality of Service negotiation when a communication binding is established, and services to be implemented environments straddling protection domain boundaries as well as lo- cally and in remote processes. July 1995, 135 pages, paper copy PhD thesis (Clare Hall, July 1995) UCAM-CL-TR-377 UCAM-CL-TR-376 Larry Paulson, Krzysztof Grabczewski: Timothy Roscoe: Mechanising set theory: The structure of a multi-service cardinal arithmetic and the axiom of operating system choice August 1995, 113 pages, PostScript July 1995, 33 pages, PDF, PostScript PhD thesis (Queens’ College, April 1995) Abstract: Fairly deep results of Zermelo-Fraenkel (ZF) Abstract: Increases in processor speed and network set theory have been mechanised using the proof as- bandwidth have led to workstations being used to pro- sistant Isabelle. The results concern cardinal arithmetic cess multimedia data in real time. These applications and the Axiom of Choice (AC). A key result about car- have requirements not met by existing operating sys- dinal multiplication is K*K=K, where K is any infinite tems, primarily in the area of resource control: there is cardinal. Proving this result required developing theo- a need to reserve resources, in particular the processor, ries of orders, order-isomorphisms, order types, ordinal at a fine granularity. Furthermore, guarantees need to arithmetic, cardinals, etc.; this covers most of Kunen, be dynamically renegotiated to allow users to reassign Set Theory, Chapter I. Furthermore, we have proved resources when the machine is heavily loaded. There the equivalence of 7 formulations of the Well-ordering have been few attempts to provide the necessary facil- Theorem and 20 formulations of AC; this covers the ities in traditional operating systems, and the internal first two chapters of Rubin and Rubin, Equivalents of structure of such systems makes the implementation of the Axiom of Choice. The definitions used in the proofs useful resource control difficult. are largely faithful in style to the original mathematics. This dissertation presents a way of structuring an operating system to reduce crosstalk between applica- UCAM-CL-TR-378 tions sharing the machine, and enable useful resource guarantees to be made: instead of system services be- ing located in the kernel or server processes, they are Noha Adly: placed as much as possible in client protection domains Performance evaluation of HARP: and scheduled as part of the client, with communica- tion between domains only occurring when necessary a hierarchical asynchronous to enforce protection and concurrency control. This replication protocol for large scale amounts to multiplexing the service at as low a level of abstraction as possible. A mechanism for sharing system processor time between resources is also described. The August 1995, 94 pages, PostScript prototype Nemesis operating system is used to demon- strate the ideas in use in a practical system, and to illus- trate solutions to several implementation problems that Abstract: This report evaluates the performance of arise. HARP, a hierarchical replication protocol based on Firstly, structuring tools in the form of typed inter- nodes organised into a logical hierarchy. The scheme faces within a single address space are used to reduce is based on communication with nearby replicas and the complexity of the system from the programmer’s scales well for thousands of replicas. It proposes a new viewpoint and enable rich sharing of text and data be- service interface that provides different levels of asyn- tween applications. chrony, allowing strong consistency and weak consis- Secondly, a scheduler is presented which delivers tency to be integrated into the same framework. Fur- useful Quality of Service guarantees to applications in a ther, it provides the ability to offer different levels of highly efficient manner. Integrated with the scheduler is staleness, by querying from different levels of the hi- an inter-domain communication system which has min- erarchy. We present results from a detailed simulation imal impact on resource guarantees, and a method of

83 analysis evaluating the benefits and losses in perfor- UCAM-CL-TR-381 mance resulting from using synchronous versus asyn- chronous operation within HARP under different sys- Uwe Michael Nimscheck: tem configurations and load mixes. Further, the perfor- mance is evaluated on different network topologies. An Rendering for free form deformations analytical solution based on the Open Queueing Net- work Model with Multiple Job Classes is carried out October 1995, 151 pages, paper copy for the verification of the simulation model and the re- PhD thesis (Wolfson College) sults are presented. UCAM-CL-TR-382 UCAM-CL-TR-379 Oliver M. Castle: Lawrence Paulson: Synthetic image generation for a Proceedings of the First Isabelle Users multiple-view autostereo display Workshop October 1995, 184 pages, paper copy September 1995, 265 pages, paper copy PhD thesis (Wolfson College, April 1995)

UCAM-CL-TR-380 UCAM-CL-TR-383

Burkhard Stiller: Noha Adly: Quality-of-Service issues in Management of replicated data in networking environments large scale systems September 1995, 68 pages, PostScript November 1995, 182 pages, paper copy PhD thesis (Corpus Christi College, August 1995) Abstract: Quality-of-Service (QoS) issues in network- ing environments cover various separate areas and top- UCAM-CL-TR-384 ics. They include at least the specification of applica- tions requirements, the definition of network services, QoS models, resource reservation methods, negotiation Shaw-Cheng Chuang: and transformation methods for QoS, and operating Securing ATM networks system support for guaranteed services. An embracing approach for handling, dealing with, and supporting January 1995, 30 pages, PostScript QoS in different scenarios and technical set-ups is re- quired to manage sufficiently forthcoming communica- Abstract: This is an interim report on the investigations tion and networking tasks. Modern telecommunication into securing Asynchronous Transfer Mode (ATM) net- systems require an integrated architecture for appli- works. We look at the challenge in providing such a se- cations, communication subsystems, and network per- cure ATM network and identify the important issues spectives to overcome drawbacks of traditional com- in achieving such goal. In this paper, we discuss the munication architectures, such as redundant protocol issues and problems involved and outline some tech- functionality, weakly designed interfaces between the niques to solving these problems. The network environ- end-system and a network adapter, or impossibility of ment is first examined and we also consider the correct specifying and guaranteeing QoS parameter. placement of security mechanism in such an environ- This work contains the discussion of a number of ment. Following the analysis of the security require- interconnected QoS issues, e.g., QoS mapping, QoS ment, we introduce and describe a key agile crypto- negotiation, QoS-based configuration of communica- graphic device for ATM. The protection of the ATM tion protocols, or QoS aspects in Asynchronous Trans- data plane is extremely important to provide data con- fer Mode (ATM) signaling protocols, which have been fidentiality and data integrity. Techniques in providing dealt with during a one-year research fellowship. This synchronisation, dynamic key change, dynamic initiali- report is not intended to be a complete description of sation vector change and Message Authentication Code every technical detail, but tries to provide a brief over- on ATM data, are also being considered. Next, we dis- all picture of the emerging and explosively developing cuss the corresponding control functions. A few key ex- QoS issues in telecommunication systems. Additionally, change protocols are given as possible candidates for investigations of some of these issues are undertaken in the establishment of the session key. The impact of such a more closer detail. It is mainly focussed on QoS map- key exchange protocols on the design of an ATM sig- ping, negotiation, and updating in the communication nalling protocol has also been examined and security protocol area. extension to an existing signalling protocol being dis- cussed. We also talk about securing other control plane

84 functions such as NNI routing, Inter-Domain Policy UCAM-CL-TR-388 Routing, authorisation and auditing, firewall and in- trusion detection, Byzantine robustness. Management P.N. Benton: plane functions are also being looked at, with discus- sions on bootstrapping, authenticated neighbour dis- A unified approach to strictness covery, ILMI Security, PVC security, VPI security and ATM Forum management model. analysis and optimising transformations UCAM-CL-TR-385 February 1996, 21 pages, PDF Sanjay Saraswat: Abstract: We present an inference system for translating Performance evaluation of the programs in a PCF-like source language into a variant Delphi machine of Moggi’s computational lambda calculus. This trans- lation combines a simple strictness analysis with its as- December 1995, 187 pages, paper copy sociated optimising transformations into a single sys- PhD thesis (St Edmund’s College, October 1995) tem. The correctness of the translation is established us- ing a logical relation between the denotational seman- UCAM-CL-TR-386 tics of the source and target languages.

Andrew D. Gordon, Gareth D. Rees: UCAM-CL-TR-389 Bisimilarity for a first-order calculus Wai Wong: of objects with subtyping A proof checked for HOL January 1996, 78 pages, paper copy March 1996, 165 pages, paper copy UCAM-CL-TR-387 UCAM-CL-TR-390 Scarlet Schwiderski, Andrew Herbert, Ken Moody: Richard J. Boulton: Monitoring composite events in Syn: a single language for specifiying distributed systems abstract syntax tress, lexical analysis, February 1996, 20 pages, PDF parsing and pretty-printing

Abstract: One way of integrating heterogeneous, au- March 1996, 25 pages, PostScript, DVI tonomous and distributed systems is to monitor their behaviour in terms of global compostite events. In spe- Abstract: A language called Syn is described in which cific applications, for example database, it is essen- all aspects of context-free syntax can be specified with- tial that global composite events can take account of out redundancy. The language is essentially an extended general conditions such as the timing constraints on BNF grammar. Unusual features include high-level con- distributed system behaviour. In this paper the use of structs for specifying lexical aspects of a language and global composite events incorporating time events for specification of precedence by textual order. A system expressing physical time is investigated. The detection has been implemented for generating lexers, parsers, of global composite events is complicated by the in- pretty-printers and abstract syntax tree representations herent features of distributed systems: lack of global from a Syn specification. time, message delays between sites and independent failures. Global event detectors are distributed to ar- UCAM-CL-TR-391 bitrary sites. Relevant constituent events occur on re- mote sites and are signalled to corresponding global Andrew John Kennedy: event detectors, where they are evaluated. Two differ- ent algorithms for the detection of global composite Programming languages and events are introduced which are based on the evalu- ation of trees: asynchronous and synchronous evalua- dimensions tion. Asynchronous evaluation provides fast but unreli- April 1996, 149 pages, PDF able detection of global composite events, whereas syn- PhD thesis (St Catherine’s College, November 1995) chronous evaluation is characterized by reliability and unpredictable delays.

85 Abstract: Scientists and engineers must ensure that the Addressing the first concern, this dissertation argues equations and formulae which they use are dimension- that a simple network control interface offers signifi- ally consistent, but existing programming languages cant advantages over the traditional, heavyweight ap- treat all numeric values as dimensionless. This thesis proach of the telecommunications industry. A network investigates the extension of programming languages to control architecture based on a distributed systems ap- support the notion of physical dimension. proach is presented which locates both the network A type system is presented similar to that of the pro- control functions and its services outside the network. gramming language ML but extended with polymor- The network service interface uses the Remote Proce- phic dimension types. An algorithm which infers most dure Call (RPC) paradigm and enables more compli- general dimension types automatically is then described cated service offerings to be built from the basic primi- and proved correct. tives. A formal specification and verification of the user- The semantics of the language is given by a transla- network signalling protocol is presented. Implementa- tion into an explicitlytyped language in which dimen- tions of the architecture, both on Unix and the Wanda sions are passed as arguments to functions. The opera- micro-kernel, used on the Fairisle ATM switch, are de- tional semantics of this language is specified in the usual scribed. The implementations demonstrate the feasibil- way by an evaluation relation defined by a set of rules. ity of the architecture, and feature a high degree of ex- This is used to show that if a program is well-typed then perimental flexibility. This is exploited in the balance no dimension errors can occur during its evaluation. of the dissertation, which presents the results of a prac- More abstract properties of the language are inves- tical study of network performance under a range of tigated using a denotational semantics: these include a dynamic control mechanisms. notion of invariance under changes in the units of mea- Addressing the second concern, results are presented sure used, analogous to parametricity in the polymor- from a study of the cell delay variation suffered by phic lambda calculus. Finally the dissertation is sum- ATM connections when multiplexed with real ATM marised and many possible directions for future re- traffic in an uncontrolled network, and from an inves- search in dimension types and related type systems are tigation of the expansion of bursts of ATM traffic as a described. result of multiplexing. The results are compared with those of analytical models. Finally, results from a study UCAM-CL-TR-392 of the performance delivered to delay sensitive traffic by priority and rate based cell scheduling algorithms, and Uwe Nestmann, Benjamin C. Pierce: the loss experienced by different types of traffic under several buffer allocation strategies are presented. Decoding choice encodings UCAM-CL-TR-394 April 1996, 54 pages, paper copy Lawrence C. Paulson: UCAM-CL-TR-393 A simple formalization and proof for Simon Andrew Crosby: the mutilated chess board Performance management in April 1996, 11 pages, PDF, PostScript, DVI ATM networks Abstract: The impossibility of tiling the mutilated chess April 1996, 215 pages, PostScript board has been formalized and verified using Isabelle. PhD thesis (St John’s College, May 1995) The formalization is concise because it is expressed us- ing inductive definitions. The proofs are straightfor- Abstract: The Asynchronous Transfer Mode (ATM) has ward except for some lemmas concerning finite cardi- been identified as the technology of choice amongst nalities. This exercise is an object lesson in choosing high speed communication networks for its potential a good formalization. is applicable in a variety of do- to integrate services with disparate resource needs and mains. timing constraints. Before it can successfully deliver in- tegrated services, however, significant problems remain UCAM-CL-TR-395 to be solved. They centre around two major issues. First, there is a need for a simple, powerful network ser- Torben Brauner,¨ Valeria de Paiva: vice interface capable of meeting the communications needs of new applications. Second, within the network Cut-elimination for full intuitionistic there is a need to dynamically control a mix of diverse traffic types to ensure that they meet their performance linear logic criteria. May 1996, 27 pages, PDF

86 Abstract: We describe in full detail a solution to the UCAM-CL-TR-398 problem of proving the cut elimination theorem for FILL, a variant of (multiplicative and exponential-free) N.A. Dodgson, J.R. Moore: Linear Logic introduced by Hyland and de Paiva. Hy- land and de Paiva’s work used a term assignment sys- Design and implementation of an tem to describe FILL and barely sketched the proof autostereoscopic camera system of cut elimination. In this paper, as well as correcting a small mistake in their paper and extending the sys- June 1996, 20 pages, PDF tem to deal with exponentials, we introduce a different formal system describing the intuitionistic character of Abstract: An autostereoscopic display provides the FILL and we provide a full proof of the cut elimination viewer with a three-dimensional image without the theorem. The formal system is based on a notion of de- need for special glasses, and allows the user to look pendency between formulae within a given proof and around objects in the image by moving the head left- seems of independent interest. The procedure for cut right. The time-multiplexed autostereo display devel- elimination applies to (classical) multiplicative Linear oped at the University of Cambridge has been in op- Logic, and we can (with care) restrict our attention to eration since late 1991. the subsystem FILL. The proof, as usual with cut elim- An autostereoscopic camera system has been de- ination proofs, is a little involved and we have not seen signed and implemented. It is capable of taking video it published anywhere. input from up to sixteen cameras, and multiplexing these into a video output stream with a pixel rate an UCAM-CL-TR-396 order of magnitude faster than the individual input streams. Testing of the system with eight cameras and a Lawrence C. Paulson: Cambridge Autostereo Display has produced excellent live autostereoscopic video. Generic automatic proof tools This report describes the design of this camera system which has been successfully implemented and May 1996, 28 pages, PDF, PostScript demonstrated. Problems which arose during this pro- cess are discussed, and a comparison with similar sys- Abstract: This paper explores a synthesis between two tems made. distinct traditions in automated reasoning: resolution and interaction. In particular it discusses Isabelle, an UCAM-CL-TR-399 interactive theorem prover based upon a form of res- olution. It aims to demonstrate the value of proof Richard Hayton: tools that, compared with traditional resolution sys- tems, seem absurdly limited. Isabelle’s classical reasoner OASIS: searches for proofs using a tableau approach. The rea- soner is generic: it accepts rules proved in applied the- An open architecture for secure ories, involving defined connectives. New constants are interworking services not reduced to first-order logic; the reasoner June 1996, 102 pages, PDF UCAM-CL-TR-397 PhD thesis (Fitzwilliam College, March 1996)

Abstract: An emerging requirement is for applications Borut Robic:ˇ and distributed services to cooperate or inter-operate. Optimal routing in 2-jump circulant Mechanisms have been devised to hide the heterogene- ity of the host operating systems and abstract the issues networks of distribution and object location. However, in order for systems to inter-operate securely there must also be June 1996, 7 pages, PostScript mechanisms to hide differences in security policy, or at least negotiate between them. Abstract: An algorithm for routing a message along This would suggest that a uniform model of access the shortest path between a pair of processors in 2- control is required. Such a model must be extremely jump circulant (undirected double fixed step) network flexible with respect to the specification of policy, as dif- is given. The algorithm requires O(d) time for prepro- ferent applications have radically different needs. In a cessing, and l = O(d) routing steps, where l is the dis- widely distributed environment this situation is exacer- tance between the processors and d is the diameter of bated by the differing requirements of different organi- the network. sations, and in an open environment there is a need to interwork with organisations using alternative security mechanisms. Other proposals for the interworking of security mechanisms have concentrated on the enforcement of

87 access policy, and neglected the concerns of freedom events are monitored and event occurrences are de- of expression of this policy. For example it is common tected. However, in active database systems events are to associate each request with a user identity, and to monitored in terms of physical time and in distributed use this as the only parameter when performing access debugging systems events are monitored in terms of control. This work describes an architectural approach logical time. The notion of physical time is difficult in to security. By reconsidering the role of the client and distributed systems because of their special characteris- the server, we may reformulate access control issues in tics: no global time, network delays, etc. terms of client naming. This dissertation is concerned with monitoring the We think of a client as obtaining a name issued by a behaviour of distributed systems in terms of physical service; either based on credentials already held by the time, i.e. the syntax, the semantics, the detection, and client, or by delegation from another client. A gram- the implementation of events are considered. mar has been devised that allows the conditions under The syntax of primitive and composite events is de- which a client may assume a name to be specified, and rived from the work of both active database systems the conditions under which use of the name will be re- and distributed debugging systems; differences and ne- voked. This allows complex security policies to be spec- cessities are highlighted. ified that define how clients of a service may interact The semantics of primitive and composite events es- with each other (through election, delegation and revo- tablishes when and where an event occurs; the seman- cation), how clients interact with a service (by invok- tics depends largely on the notion of physical time in ing operations or receiving events) and how clients and distributed systems. Based on the model for an approx- services may inter-operate. (For example, a client of a imated global time base, the ordering of events in dis- Login service may become a client of a file service.) tributed systems is considered, and the structure and This approach allows great flexibility when integrat- handling of timestamps are illustrated. In specific ap- ing a number of services, and reduces the mismatch plications, a simplified version of the semantics can be of policies common in heterogeneous systems. A flexi- applied which is easier and therefore more efficient to ble security definition is meaningless if not backed by implement. a robust and efficient implementation. In this thesis Algorithms for the detection of composite events we present a systems architecture that can be imple- at system runtime are developed; event detectors are mented efficiently, but that allows individual services distributed to arbitrary sites and composite events are to ‘fine tune’ the trade-offs between security, efficiency evaluated concurrently. Two different evaluation poli- and freedom of policy expression. The architecture is cies are examined: asynchronous evaluation and syn- inherently distributed and scalable, and includes mech- chronous evaluation. Asynchronous evaluation is char- anisms for rapid and selective revocation of privileges acterised by the ad hoc consumption of signalled event which may cascade between services and organisations. occurrences. However, since the signalling of events in- volves variable delays, the events may not be evaluated UCAM-CL-TR-400 in the system-wide order of their occurrence. On the other hand, synchronous evaluation enforces events to Scarlet Schwiderski: be evaluated in the system-wide order of their occur- rence. But, due to site failures and network congestion, Monitoring the behaviour of the evaluation may block on a fairly long-term basis. The prototype implementation realises the algo- distributed systems rithms for the detection of composite events with both July 1996, 161 pages, PDF asynchronous and synchronous evaluation. For the pur- pose of testing, primitive event occurrences are simu- PhD thesis (Selwyn College, April 1996) lated by distributed event simulators. Several tests are performed illustrating the differences between asyn- Abstract: Monitoring the behaviour of computing sys- chronous and synchronous evaluation: the first is ‘fast tems is an important task. In active database systems, and unreliable’ whereas the latter is ‘slow and reliable’. a detected system behaviour leads to the triggering of an ECA (event-condition-action) rule. ECA rules are employed for supporting database management system UCAM-CL-TR-401 functions as well as external applications. Although dis- tributed database systems are becoming more common- Gavin Bierman: place, active database research has to date focussed on centralised systems. In distributed debugging sys- A classical linear λ-calculus tems, a detected system behaviour is compared with July 1996, 41 pages, PDF the expected system behaviour. Differences illustrate erroneous behaviour. In both application areas, sys- Abstract: This paper proposes and studies a typed λ- tem behaviours are specified in terms of events: prim- calculus for classical linear logic. I shall give an expla- itive events represent elementary occurrences and com- nation of a multiple-conclusion formulation for classi- posite events represent complex occurrence patterns. cal logic due to Parigot and compare it to more tra- At system runtime, specified primitive and composite ditional treatments by Prawitz and others. I shall use

88 Parigot’s method to devise a natural deduction fomula- This dissertation extends the provision of Qual- tion of classical linear logic. This formulation is com- ity of Service guarantees to the I/O system by pre- pared in detail to the sequent calculus formulation. In senting an architecture for device drivers which min- an appendix I shall also demonstrate a somewhat hid- imises crosstalk between applications. This is achieved den connection with the paradigm of control operators by clearly separating the data-path operations, which for functional languages which gives a new computa- require careful accounting and scheduling, and the in- tional interpretation of Parigot’s techniques. frequent control-path operations, which require protec- tion and concurrency control. The approach taken is to UCAM-CL-TR-402 abstract and multiplex the I/O data-path at the low- est level possible so as to simplify accounting, policing G.J.F. Jones, J.T. Foote, K. Sparck¨ Jones, and scheduling of I/O resources and enable application- specific use of I/O devices. S.J. Young: The architecture is applied to several representative Video mail retrieval using voice: classes of device including network interfaces, network connected peripherals, disk drives and framestores. Of report on collection of naturalistic these, disks and framestores are of particular interest requests and relevance assessments since they must be shared at a very fine granularity but have traditionally been presented to the application via September 1996, 21 pages, PDF a window system or file-system with a high-level and coarse-grained interface. Abstract: This report discusses the rationale, design, A device driver for the framestore is presented which collection and initial statistics of a message request abstracts the device at a low level and is therefore able and retrieved document relevance assessment set for the to provide each client with guaranteed bandwidth to Cambridge Video Mail Rewtrieval (VMR) Project. This the framebuffer. The design and implementation of a data set is designed to complement the VMR Database novel client-rendering window system is then presented 1 (VMR1) message set and was designed for the testing which uses this driver to enable rendering code to be of document searching methods being investigated in safely migrated into a shared library within the client. the VMR project. The combined message and request A low-level abstraction of a standard disk drive is set is referred to as VMR1b. also described which efficiently supports a wide variety of file systems and other applications requiring persis- UCAM-CL-TR-403 tent storage, whilst providing guaranteed rates of I/O to individual clients. An extent-based file system is pre- sented which can provide guaranteed rate file access Paul Ronald Barham: and enables clients to optimise for application-specific Devices in a multi-service operating access patterns. system UCAM-CL-TR-404 October 1996, 131 pages, PostScript, DVI PhD thesis (Churchill College, June 1996) Kam Hong Shum: Adaptive parallelism for computing Abstract: Increases in processor speed and network and device bandwidth have led to general purpose work- on heterogeneous clusters stations being called upon to process continuous me- dia data in real time. Conventional operating systems November 1996, 147 pages, paper copy are unable to cope with the high loads and strict tim- PhD thesis (Darwin College, August 1996) ing constraints introduced when such applications form part of a multi-tasking workload. There is a need for UCAM-CL-TR-405 the operating system to provide fine-grained reservation of processor, memory and I/O resources and the abil- Richard J. Boulton: ity to redistribute these resources dynamically. A small group of operating systems researchers have recently A tool to support formal reasoning proposed a “vertically-structured” architecture where about computer languages the operating system kernel provides minimal function- ality and the majority of operating system code exe- November 1996, 21 pages, PostScript, DVI cutes within the application itself. This structure greatly simplifies the task of accounting for processor usage by Abstract: A tool to support formal reasoning about applications. The prototype Nemesis operating system computer languages and specific language texts is de- embodies these principles and is used as the platform scribed. The intention is to provide a tool that can for this work. build a formal reasoning system in a mechanical theo- rem prover from two specifications, one for the syntax

89 of the language and one for the semantics. A parser, UCAM-CL-TR-408 pretty-printer and internal representations are gener- ated from the former. Logical representations of syntax John Robert Harrison: and semantics, and associated theorem proving tools, are generated from the combination of the two specifi- Theorem proving with the real cations. The main aim is to eliminate tedious work from numbers the task of prototyping a reasoning tool for a computer language, but the abstract specifications of the language November 1996, 147 pages, PostScript, DVI also assist the automation of proof. PhD thesis (Churchill College, June 1996)

UCAM-CL-TR-406 Abstract: This thesis discusses the use of the real num- bers in theorem proving. Typically, theorem provers Lawrence C. Paulson: only support a few ‘discrete’ datatypes such as the natu- ral numbers. However the availability of the real num- Tool support for logics of programs bers opens up many interesting and important appli- cation areas, such as the verification of floating point November 1996, 31 pages, PDF, PostScript hardware and hybrid systems. It also allows the formal- Abstract: Proof tools must be well designed if they are ization of many more branches of classical mathemat- to be more effective than pen and paper. Isabelle sup- ics, which is particularly relevant for attempts to inject ports a range of formalisms, two of which are described more rigour into computer algebra systems. (higher-order logic and set theory). Isabelle’s represen- Our work is conducted in a version of the HOL the- tation of logic is influenced by logic programming: its orem prover. We describe the rigorous definitional con- “logical variables” can be used to implement step-wise struction of the real numbers, using a new version of refinement. Its automatic proof procedures are based Cantor’s method, and the formalization of a significant on search primitives that are directly available to users. portion of real analysis. We also describe an advanced While emphasizing basic concepts, the article also dis- derived decision procedure for the ‘Tarski subset’ of cusses applications such as an approach to the analysis real algebra as well as some more modest but practi- of security protocols. cally useful tools for automating explicit calculations and routine linear arithmetic reasoning. UCAM-CL-TR-407 Finally, we consider in more detail two interesting application areas. We discuss the desirability of com- Sebastian Schoenberg: bining the rigour of theorem provers with the power and convenience of computer algebra systems, and ex- The L4 microkernel on Alpha plain a method we have used in practice to achieve this. We then move on to the verification of floating point Design and implementation hardware. After a careful discussion of possible correct- September 1996, 51 pages, PostScript ness specifications, we report on two case studies, one involving a transcendental function. Abstract: The purpose of a microkernel is to cover the We aim to show that a theory of real numbers is lowest level of the hardware and to provide a more useful in practice and interesting in theory, and that general platform to operating systems and applications the ‘LCF style’ of theorem proving is well suited to the than the hardware itself. This has made microkernel kind of work we describe. We hope also to convince the development increasingly interesting. Different types of reader that the kind of mathematics needed for appli- microkernels have been developed, ranging from ker- cations is well within the abilities of current theorem nels which merely deal with the hardware infterface proving technology. (Windows NT HAL), kernels especially for embedded systems (RTEMS), to kernels for multimedia streams UCAM-CL-TR-409 and real time support (Nemesis) and general purpose kernels (L4, Mach). Lawrence C. Paulson: The common opinion that microkernels lead to de- terioration in system performance has been disproved Proving properties of security by recent research. L4 is an example of a fast and small, protocols by induction multi address space, message-based microkernel, devel- oped originally for Intel systems only. Based on the L4 December 1996, 24 pages, PDF, PostScript, DVI interface, which should be as similar as possible on dif- ferent platforms, the L4 Alpha version has been devel- Abstract: Security protocols are formally specified in oped. terms of traces, which may involve many interleaved This work describes design decisions, implementa- protocol runs. Traces are defined inductively. Protocol tion and interfaces of the L4 version for 64-bit Alpha descriptions model accidental key losses as well as at- processors. tacks. The model spy can send spoof messages made up of components decrypted from previous traffic.

90 Correctness properties are verified using the proof Abstract: This paper considers some theoretical and tool Isabelle/HOL. Several symmetric-key protocols practical issues concerning the use of linear logic as have been studied, including Needham-Schroeder, Ya- a logical foundation of functional programming lan- halom and Otway-Rees. A new attack has been dis- guages such as Haskell and SML. First I give an op- covered in a variant of Otway-Rees (already broken by erational theory for a linear PCF: the (typed) linear λ- Mao and Boyd). Assertions concerning secrecy and au- calculus extended with booleans, conditional and non- thenticity have been proved. termination. An operational semantics is given which The approach rests on a common theory of mes- corresponds in a precise way to the process of β- sages, with three operators. The operator “parts” de- reduction which originates from proof theory. Using notes the components of a set of messages. The opera- this operational semantics I define notions of observa- tor “analz” denotes those parts that can be decrypted tional equivalence (sometimes called contextual equiva- with known keys. The operator “synth” denotes those lence). Surprisingly, the linearity of the language forces messages that can be expressed in terms of given com- a reworking of the traditional notion of a context (the ponents. The three operators enjoy many algebraic laws details are given in an appendix). A co-inductively de- that are invaluable in proofs. fined notion, applicative bi-simularity, is developed and compared with observational equivalence using a vari- UCAM-CL-TR-410 ant of Howe’s method. Interestingly the equivalence of these two notions is greatly complicated by the linearity John Harrison: of the language. These equivalences are used to study a call-by-name translation of PCF into linear PCF. It is Proof style shown that this translation is adequate but not fully abstract. Finally I show how Landin’s SECD machine January 1997, 22 pages, PostScript, DVI can be adpacted to execute linear PCF programs.

Abstract: We are concerned with how to communicate UCAM-CL-TR-413 a mathematical proof to a computer theorem prover. This can be done in many ways, while allowing the ma- Lawrence C. Paulson: chine to generate a completely formal proof object. The most obvious choice is the amount of guidance required Mechanized proofs of security from the user, or from the machine perspective, the de- gree of automation provided. But another important protocols: consideration, which we consider particularly signifi- Needham-Schroeder with public keys cant, is the bias towards a ‘procedural’ or ‘declarative’ proof style. We will explore this choice in depth, and January 1997, 20 pages, PDF, PostScript, DVI discuss the strengths and weaknesses of declarative and procedural styles for proofs in pure mathematics and Abstract: The inductive approach to verifying secu- for verification applications. We conclude with a brief rity protocols, previously applied to shared-key encryp- summary of our own experiments in trying to combine tion, is here applied to the public key version of the both approaches. Needham-Schroeder protocol. As before, mechanized proofs are performed using Isabelle/HOL. Both the UCAM-CL-TR-411 original, flawed version and Lowe’s improved version are studied; the properties proved highlight the distinc- Monica Nesi: tions between the two versions. The results are com- pared with previous analyses of the same protocol. The Formalising process calculi in analysis reported below required only 30 hours of the author’s time. The proof scripts execute in under three Higher Order Logic minutes. January 1997, 182 pages, paper copy PhD thesis (Girton College, April 1996) UCAM-CL-TR-414

UCAM-CL-TR-412 Martın´ Abadi, Andrew D. Gordon: A calculus for cryptographic G.M. Bierman: protocols Observations on a linear PCF The SPI calculus (preliminary report) January 1997, 105 pages, PostScript January 1997, 30 pages, PDF

91 Abstract: We introduce the spi calculus, an extension of Abstract: Terrain surfaces are often approximated by the pi calculus designed for the description and analysis geometric meshes to permit efficient rendering. This pa- of cryptographic protocols. We show how to use the spi per describes how the complexity of an approximating calculus, particularly for studying authentication pro- irregular mesh can be varied across its domain in order tocols. The pi calculus (without extension) suffices for to minimise the number of displayed facets while en- some abstract protocols; the spi calculus enables us to suring that the rendered surface meets pre-determined consider cryptographic issues in more detail. We repre- resolution requirements. We first present a generalised sent protocols as processes in the spi calculus and state scheme to represent a mesh over a continuous range of their security properties in terms of coarse-grained no- resolutions using the output from conventional single- tions of protocol equivalence. resolution approximation methods. We then describe an algorithm which extracts a surface from this repre- UCAM-CL-TR-415 sentation such that the resolution of the surface is en- hanced only in specific areas of interest. We prove that Steven Leslie Pope: the extracted surface is complete, minimal, satisfies the given resolution constraints and meets the Delaunay tri- Application support for mobile angulation criterion if possible. In addition, we present a method of performing smooth visual transitions be- computing tween selectively-refined meshes to permit efficient ani- February 1997, 145 pages, paper copy mation of a terrain scene. A HTML version of that report is at PhD thesis (Jesus College, October 1996) https://www.cl.cam.ac.uk/research/rainbow/publications/pjcb/tr417/

UCAM-CL-TR-416 UCAM-CL-TR-418

Donald Syme: Lawrence C. Paulson: DECLARE: a prototype declarative Mechanized proofs for a recursive proof system for higher order logic authentication protocol February 1997, 25 pages, PDF March 1997, 30 pages, PDF, PostScript

Abstract: This report describes DECLARE, a prototype Abstract: A novel protocol has been formally analyzed implementation of a declarative proof system for sim- using the prover Isabelle/HOL, following the inductive ple higher order logic. The purpose of DECLARE is approach described in earlier work. There is no limit to explore mechanisms of specification and proof that on the length of a run, the nesting of messages or the may be incorporated into other theorem provers. It number of agents involved. A single run of the protocol has been developed to aid with reasoning about oper- delivers session keys for all the agents, allowing neigh- ational descriptions of systems and languages. Proofs bours to perform mutual authentication. The basic se- in DECLARE are expressed as proof outlines, in a curity theorem states that session keys are correctly de- language that approximates written mathematics. The livered to adjacent pairs of honest agents, regardless of proof language includes specialised constructs for (co- whether other agents in the chain are compromised. )inductive types and relations. The system includes an The protocol’s complexity caused some difficulties in abstract/article mechanism that provides a way of iso- the specification and proofs, but its symmetry reduced lating the process of formalisation from what results, the number of theorems to prove. and simultaneously allow the efficient separate process- ing of work units. After describing the system we dis- UCAM-CL-TR-419 cuss our approach on two subsidiary issues: automa- tion and the interactive environment provided to the James Quentin Stafford-Fraser: user. Video-augmented environments UCAM-CL-TR-417 April 1997, 91 pages, PDF PhD thesis (Gonville & Caius College, February 1996) Peter J.C. Brown: Selective mesh refinement for Abstract: In the future, the computer will be thought of more as an assistant than as a tool, and users will in- interactive terrain rendering creasingly expect machines to make decisions on their behalf. As with a human assistant, a machine’s ability to February 1997, 18 pages, PDF make informed choices will often depend on the extent of its knowledge of activities in the world around it. Equipping personal computers with a large number of

92 sensors for monitoring their environment is, however, describe how to construct scalable systems which can expensive and inconvenient, and a preferable solution be used to visualise models of any size without requir- would involve a small number of input devices with a ing dedicated hardware. This is achieved by controlling broad scope of application. Video cameras are ideally the quality of the results, and hence the costs incurred. suited to many realworld monitoring applications for In addition, the use of quality controls can become a this reason. In addition, recent reductions in the manu- tool to help users handle the large volume of informa- facturing costs of simple cameras will soon make their tion arising from complex models. widespread deployment in the home and office econom- The underlying approach is to separate the model ically viable. The use of video as an input device also from the graphics application which uses it, so that the allows the creation of new types of user-interface, more model exists independently. By doing this, an applica- suitable in some circumstances than those afforded by tion is free to access only the data which is required at the conventional keyboard and mouse. any given time. For the application to function in this This thesis examines some examples of these ‘Video- manner, the data must be in an appropriate form. To Augmented Environments’ and related work, and then achieve this, approximation hierarchies are defined as describes two applications in detail. The first, a ‘soft- a suitable new model structure. These utilise multiple ware cameraman’, uses the analysis of one video stream representations of both objects and groups of objects at to control the display of another. The second, ‘Bright- all levels in the model. Board’, allows a user to control a computer by making In order to support such a structure, a novel method marks on a conventional whiteboard, thus ‘augment- is proposed for rapidly constructing simplified repre- ing’ the board with many of the facilities common to sentations of groups of complex objects. By calculating electronic documents, including the ability to fax, save, a few geometrical attributes, it is possible to generate print and email the image of the board. The techniques replacement objects that preserve important aspects of which were found to be useful in the construction of the originals. Such objects, once placed into an approx- these applications are common to many systems which imation hierarchy, allow rapid loading and rendering of monitor real-world video, and so they were combined large portions of a model. Extensions to rendering algo- in a toolkit called ‘Vicar’. This provides an architecture rithms are described that take advantage of this struc- for ‘video plumbing’, which allows standard videopro- ture. cessing components to be connected together under the The use of multiple representations encompasses control of a scripting language. It is a single application not only different quality levels, but also different stor- which can be programmed to create a variety of sim- age formats and types of objects. It provides a frame- ple Video-Augmented Environments, such as those de- work within which such aspects are hidden from the scribed above, without the need for any recompilation, user, facilitating the sharing and re-use of objects. A and so should simplify the construction of such appli- model manager is proposed as a means of encapsulating cations in the future. Finally, opportunities for further these mechanisms. This software gives, as far as possi- exploration on this theme are discussed. ble, the illusion of direct access to the whole complex model, while at the same time making the best use of UCAM-CL-TR-420 the limited resources available.

Jonathan Mark Sewell: UCAM-CL-TR-421

Managing complex models for Michael Norrish: computer graphics An abstract dynamic semantics for April 1997, 206 pages, PDF C PhD thesis (Queens’ College, March 1996) May 1997, 31 pages, PDF, PostScript, DVI Abstract: Three-dimensional computer graphics is be- coming more common as increasing computational Abstract: This report is a presentation of a formal se- power becomes more readily available. Although the mantics for the C programming language. The seman- images that can be produced are becoming more com- tics has been defined operationally in a structured se- plex, users’ expectations continue to grow. This disser- mantics style and covers the bulk of the core of the lan- tation examines the changes in computer graphics soft- guage. The semantics has been developed in a theorem ware that will be needed to support continuing growth prover (HOL), where some expected consequences of in complexity, and proposes techniques for tackling the the language definition problems that emerge. Increasingly complex models will involve longer UCAM-CL-TR-422 rendering times, higher memory requirements, longer data transfer periods and larger storage capacities. Fur- Antony Rowstron: thermore, even greater demands will be placed on the constructors of such models. This dissertation aims to

93 Using the BONITA primitives: slower than Davis-Putnam, SAT based procedures or a case study other techniques based on resolution. To meet this challenge, this paper proposes a the- May 1997, 19 pages, PDF oretical innovation: the rule of simplification, which plays the same role for tableaux as subsumption does Abstract: The co-ordination language Linda has been for resolution, and unit for Davis-Putman. used for parallel processing for many years. Linda uses This technique gives a unifying view of a number of a shared tuple space and a number of primitives to pro- tableaux-like calculi such as DPLL, KE, HARP, hyper- vide access to the tuple space and thereby enabling com- tableaux etc. For instance the stand-alone nature of munication between processes executing concurrently. the first-order Davis-Putnam-Longeman-Loveland pro- Linda provides asynchronous communication between cedure can be explained away as a case of Smullyan processes, but synchronous access between the pro- tableau with propositional simplification. cesses and the tuple spaces. The Bonita primitives are Besides its computational effectiveness, the simplic- a different set of primitives that provide asynchronous ity and generality of simplification make its extension access to the tuple spaces. The Bonita priomitives can possible in a uniform way. We define it for proposi- emulate the primary Linda primitives and therefore tional and first order logic and a wide range of modal provides both asynchronous access and synchronous logics. For a full-fledged first order simplification we access to tuple spaces. It has been previously claimed combine it with another technique, renaming, which that asynchronous tuple space access primitives are re- subsumes the use of free universal variables in sequent quired to provide new co-ordination constructs and and tableau calculi. to improve performance for geographically distributed New experimental results are given for random SAT processes which are required to co-ordinate distributed and the IFIP benchmarks for hardware verification. processes (or agents). In this paper a talk program is used as an exam- UCAM-CL-TR-425 ple to demonstrate that the concept of tuple spaces are well suited for process co-ordination for distributed Leslie Lamport, Lawrence C. Paulson: processes (or agents), and to provide a comparison be- Should your specification language be tween the use of Linda primitives and the Bonita prim- itives. It is shown that asynchronous tuple space access typed? is essential for such process co-ordination. May 1997, 30 pages, PDF

UCAM-CL-TR-423 Abstract: Most specification languages have a type sys- tem. Type systems are hard to get right, and getting Karl F. MacDorman: them wrong can lead to inconsistencies. Set theory can serve as the basis for a specification language with- Symbol grounding: out types. This possibility, which has been widely over- looked, offers many advantages. Untyped set theory Learning categorical and is simple and is more flexible than any simple typed sensorimotor predictions for formalism. Polymorphism, overloading, and subtyping can make a type system more powerful, but at the cost coordination in autonomous robots of increased complexity, and such refinements can never May 1997, 170 pages, paper copy attain the flexibility of having no types at all. Typed formalisms have advantages too, stemming from the PhD thesis (Wolfson College, March 1997) power of mechanical type checking. While types serve little purpose in hand proofs, they do help with mecha- UCAM-CL-TR-424 nized proofs. In the absence of verification, type check- ing can catch errors in specifications. It may be possible Fabio Massacci: to have the best of both worlds by adding typing anno- tations to an untyped specification language. Simplification with renaming: We consider only specification languages, not pro- a general proof technique for tableau gramming languages. and sequent-based provers UCAM-CL-TR-426 May 1997, 26 pages, DVI Mark Humphrys: Abstract: Tableau and sequent calculi are the basis for Action selection methods using most popular interactive theorem provers for hardware reinforcement learning and software verification. Yet, when it comes to decision procedures or auto- June 1997, 195 pages, PostScript matic proof search, tableaux are orders of magnitude PhD thesis (Trinity Hall)

94 Abstract: The Action Selection problem is the prob- arithmetic. We confirm (indeed strengthen) the main re- lem of run-time choice between conflicting and het- sult of a previously published error analysis, though we erogenous goals, a central problem in the simulation uncover a minor error in the hand proof and are forced of whole creatures (as opposed to the solution of iso- to confront several subtle issues that might easily be lated uninterrupted tasks). This thesis argues that Re- overlooked informally. inforcement Learning has been overlooked in the so- Our main theorem connects the floating point ex- lution of the Action Selection problem. Considering a ponential to its abstract mathematical counterpart. The decentralised model of mind, with internal tension and specification we prove is that the function has the cor- competition between selfish behaviors, this thesis intro- rect overflow behaviour and, in the absence of overflow, duces an algorithm called “W-learning”, whereby dif- the error in the result is less than 0.54 units in the last ferent parts of the mind modify their behavior based on place (0.77 if the answer is denormalized) compared whether or not they are succeeding in getting the body against the exact mathematical exponential function. to execute their actions. This thesis sets W-learning in The algorithm is expressed in a simple formalized pro- context among the different ways of exploiting Rein- gramming language, intended to be a subset of real pro- forcement Learning numbers for the purposes of Ac- gramming and hardware description languages. It uses tion Selection. It is a ‘Minimize the Worst Unhappi- underlying floating point operations (addition, multi- ness’ strategy. The different methods are tested and plication etc.) that are assumed to conform to the IEEE- their strengths and weaknesses analysed in an artificial 754 standard for binary floating point arithmetic. world. The development described here includes, apart from the proof itself, a formalization of IEEE arith- UCAM-CL-TR-427 metic, a mathematical semantics for the programming language in which the algorithm is expressed, and the Don Syme: body of pure mathematics needed. All this is devel- oped logically from first principles using the HOL Light Proving Java type soundness prover, which guarantees strict adherence to simple rules of inference while allowing the user to perform June 1997, 35 pages, PDF proofs using higher-level derived rules. We first present the main ideas and conclusions, and then collect some Abstract: This technical report describes a machine technical details about the prover and the underlying checked proof of the type soundness of a subset of mathematical theories in appendices. the Java language called Java s. A formal semantics for this subset has been developed by Drossopoulou and UCAM-CL-TR-429 Eisenbach, and they have sketched an outline of the type soundness proof. The formulation developed here Andrew D. Gordon, Paul D. Hankin, complements their written semantics and proof by cor- recting and clarifying significant details; and it demon- Søren B. Lassen: strates the utility of formal, machine checking when ex- Compilation and equivalence of ploring a large and detailed proof based on operational semantics. The development also serves as a case study imperative objects in the application of ‘declarative’ proof techniques to a major property of an operational system. June 1997, 64 pages, PostScript, DVI

Abstract: We adopt the untyped imperative object cal- UCAM-CL-TR-428 culus of Abadi and Cardelli as a minimal setting in which to study problems of compilation and program John Harrison: equivalence that arise when compiling object-oriented languages. We present both a big-step and a small-step Floating point verification in substitution-based operational semantics for the calcu- HOL Light: the exponential function lus. Our first two results are theorems asserting the equivalence of our substitution-based semantics with a June 1997, 112 pages, PostScript, DVI closure-based semantics like that given by Abadi and Cardelli. Our third result is a direct proof of the correct- Abstract: In that they often embody compact but ness of compilation to a stack-based mathematically sophisticated algorithms, operations via a small-step decompilation algorithm. Our fourth for computing the common transcendental functions in result is that contextual equivalence of objects coincides floating point arithmetic seem good targets for formal with a form of Mason and Talcott’s CIU equivalence; verification using a mechanical theorem prover. We dis- the latter provides a tractable means of establishing op- cuss some of the general issues that arise in verifications erational equivalences. Finally, we prove correct an al- of this class, and then present a machine-checked ver- gorithm, used in our prototype compiler, for statically ification of an algorithm for computing the exponen- resolving method offsets. This is the first study of cor- tial function in IEEE-754 standard binary floating point rectness of an object-oriented abstract machine, and of

95 operational equivalence for the imperative object calcu- UCAM-CL-TR-434 lus. Martin Richards: UCAM-CL-TR-430 Demonstration programs for CTL G.J.F. Jones, J.T. Foote, K. Sparck Jones, and µ-calculus symbolic model S.J. Young: checking Video mail retrieval using voice August 1997, 41 pages, PDF Report on topic spotting Abstract: This paper presents very simple implementa- July 1997, 73 pages, paper copy tions of Symbolic Model Checkers for both Computa- tional Tree Logic (CTL) and µ-calculus. They are in- UCAM-CL-TR-431 tended to be educational rather than practical. The first program discovers, for a given non-deterministic finite Martin Richards: state machine (NFSM), the states for which a given CTL formula holds. The second program does the same The MCPL programming manual and job for µ-calculus formulae. For simplicity the number of states in the NFSM user guide has been limited to 32 and a bit pattern representation July 1997, 70 pages, paper copy is used to represent the boolean functions involved. It would be easy to extend both programs to use ordered binary decision diagrams more normally used in sym- UCAM-CL-TR-432 bolic model checking. The programs include lexical and syntax analysers Lawrence C. Paulson: for the formulae, the model checking algorithms and drivers to exercise them with respect to various simple On two formal analyses of the machines. The programs are implemented in MCPL. A Yahalom protocol brief summary of MCPL is given at the end.

July 1997, 16 pages, PDF, PostScript, DVI UCAM-CL-TR-435

Abstract: The Yahalom protocol is one of those an- Peter Sewell: alyzed by Burrows et al. in the BAN paper. Based upon their analysis, they have proposed modifications Global/local subtyping for a to make the protocol easier to understand and analyze. Both versions of Yahalom have now been proved, us- distributed π-calculus ing Isabelle/HOL, to satisfy strong security goals. The August 1997, 57 pages, PostScript mathematical reasoning behind these machine proofs is presented informally. Abstract: In the design of mobile agent programming The new proofs do not rely on a belief logic; they languages there is a tension between the implementa- use an entirely different formal model, the inductive tion cost and the expressiveness of the communication method. They confirm the BAN analysis and the ad- mechanisms provided. This paper gives a static type vantages of the proposed modifications. The new proof system for a distributed π-calculus in which the input methods detect more flaws than BAN and analyze pro- and output of channels may be either global or local. tocols in finer detail, while remaining broadly consis- This allows compile-time optimization where possible tent with the BAN principles. In particular, the proofs but retains the expressiveness of channel communica- confirm the explicitness principle of Abadi and Need- tion. Subtyping allows all communications to be in- ham. voked uniformly. Recursive types and products are in- cluded. The distributed π-calculus used integrates loca- UCAM-CL-TR-433 tion and migration primitives from the Distributed Join Calculus with asynchronous π communication, taking Martin Richards: a simple reduction semantics. Some alternative calculi are discussed. Backtracking algorithms in MCPL using bit patterns and recursion July 1997, 80 pages, paper copy

96 UCAM-CL-TR-436 result of knowledge but a substitute for it. The utility of these concepts is in their ability to quantify the risks W.F. Clocksin: associated with a specific participant, whether these are explicitly accepted by them, or not. A new method for estimating optical We finally propose a distinction between ‘trust’ and flow ‘trustworthy’ and demonstrate that most current uses of the term ‘trust’ are more appropriately viewed as November 1997, 20 pages, PDF statements of ‘trustworthiness’. Ultimately, therefore, we suggest that the traditional “Orange Book” concept Abstract: Accurate and high density estimation of opti- of trust resulting from knowledge can violate the secu- cal flow vectors in an image sequence is accomplished rity policy of a system. by a method that estimates the velocity distribution function for small overlapping regions of the image. Be- UCAM-CL-TR-438 cause the distribution is multimodal, the method can accurately estimate the change in velocity near motion Feng Shi: contrast borders. Large spatiotemporal support with- out sacrificing spatial resolution is a feature of the An architecture for scalable and method, so it is not necessary to smooth the resulting flow vectors in a subsequent operation, and there is a deterministic video servers certain degree of resistance to aperture and aliasing ef- November 1997, 148 pages, PDF fects. Spatial support also provides for the accurate es- PhD thesis (Wolfson College, June 1997) timation of long-range displacements, and subpixel ac- curacy is achieved by a simple weighted mean near the Abstract: A video server is a storage system that can mode of the velocity distribution function. provide a repository for continuous media (CM) data The method is demonstrated using image sequences and sustain CM stream delivery (playback or record- obtained from the analysis of ceramic and metal mate- ing) through networks. The voluminous nature of CM rials under stress. The performance of the system un- data demands a video server to be scalable in order to der degenerate conditions is also analysed to provide serve a large number of concurrent client requests. In insight into the behaviour of optical flow methods in addition, deterministic services can be provided by a general. video server for playback because the characteristics of variable bit rate (VBR) video can be analysed in ad- UCAM-CL-TR-437 vance and used in run-time admission control (AC) and data retrieval. William S. Harbison: Recent research has made gigabit switches a reality, and the cost/performance ratio of microprocessors and Trusting in computer systems standard PCs is dropping steadily. It would be more December 1997, 95 pages, PDF cost effective and flexible to use off-the-shelf compo- PhD thesis (Wolfson College, May 1997) nents inside a video server with a scalable switched net- work as the primary interconnect than to make a spe- Abstract: We need to be able to reason about large sys- cial purpose or massively parallel multiprocessor based tems, and not just about their components. For this we video server. This work advocates and assumes such a need new conceptual tools, and this dissertation there- scalable video server structure in which data is striped fore indicates the need for a new methodology which to multiple peripherals attached directly to a switched will allow us to better identify areas of possible conflict network. or lack of knowledge in a system. However, most contemporary distributed file sys- In particular, it examines at the concept of trust, tems do not support data distribution across multiple and how this can help us to understand the basic se- networked nodes, let alone providing quality of service curity aspects of a system. The main proposal of this (QoS) to CM applications at the same time. It is the present work is that systems are viewed in a manner observation of this dissertation that the software sys- which analyses the conditions under which they have tem framework for network striped video servers is as been designed to perform, and the circumstances under important as the scalable hardware architecture itself. which they have been implemented, and then compares This leads to the development of a new system archi- the two. This problem is then examined from the point tecture, which is scalable, flexible and QoS aware, for of what is being trusted in a system, or what it is being scalable and deterministic video servers. The resulting trusted for. srchitecture is called Cadmus from sCAlable and De- Starting from an approach developed in a military terministic MUlitmedia Servers. context, we demonstrate how this can lead to unantic- Cadmus also provides integrated solutions to AC ipated risks when applied inappropriately. We further and actual QoS enforcement in storage nodes. This is suggest that ‘trust’ be considered a relative concept, in achieved by considering resources such as CPU buffer, contast to the more usual usage, and that it is not the

97 disk, and network, simultaneously but not indepen- Abstract: A generic tableau prover has been imple- dently and by including both real-time (RT) and non- mented and integrated with Isabelle. It is based on real-time (NRT) activities, In addition, the potential leantap but is much more complicated, with numerous to smooth the variability of VBR videos using read- modifications to allow it to reason with any supplied set ahead under client buffer constraints is identified. A of tableau rules. It has a higher-order syntax in order to new smoothing algorithm is presented, analysed, and support the binding operators of set theory; unification incorporated into the Cadmus architecture. is first-order (extended for bound variables in obvious A prototype implementation of Cadmus has been ways) instead of higher-order, for simplicity. constructed based on distributed object computing When a proof is found, it is returned to Isabelle and hardware modules directly connected to an Asyn- as a list of tactics. Because Isabelle verifies the proof, chronous Transfer Mode (ATM) network. Experiments the prover can cut corners for efficiency’s sake with- were performed to evaluate the implementation and out compromising soundness. For example, it knows demonstrate the utility and feasibility of the architec- almost nothing about types. ture and its AC criteria. UCAM-CL-TR-442 UCAM-CL-TR-439 Jacques Fleuriot, Lawrence C. Paulson: David A. Halls: A combination of nonstandard Applying mobile code to distributed analysis and geometry theorem systems proving, with application to December 1997, 158 pages, paper copy Newton’s Principia PhD thesis (June 1997) January 1998, 13 pages, PostScript, DVI UCAM-CL-TR-440 Abstract: The theorem prover Isabelle is used to for- Lawrence C. Paulson: malise and reproduce some of the styles of reasoning used by Newton in his Principia. The Principia’s reason- Inductive analysis of the internet ing is resolutely geometric in nature but contains “in- finitesimal” elements and the presence of motion that protocol TLS take it beyond the traditional boundaries of Euclidean December 1997, 19 pages, PDF, PostScript Geometry. These present difficulties that prevent New- ton’s proofs from being mechanised using only the ex- isting geometry theorem proving (GTP) techniques. Abstract: Internet browsers use security protocols to Using concepts from Robinson’s Nonstandard Anal- protect confidential messages. An inductive analysis of ysis (NSA) and a powerful geometric theory, we intro- TLS (a descendant of SSL 3.0) has been performed us- duce the concept of an infinitesimal geometry in which ing the theorem prover Isabelle. Proofs are based on quantities can be infinitely small or infinitesimal. We higher-order logic and make no assumptions concern- reveal and prove new properties of this geometry that ing beliefs or finiteness. All the obvious security goals only hold because infinitesimal elements are allowed can be proved; session resumption appears to be secure and use them to prove lemmas and theorems from the even if old session keys have been compromised. The Principia. analysis suggests modest changes to simplify the proto- col. TLS, even at an abstract level, is much more com- UCAM-CL-TR-443 plicated than most protocols that researchers have veri- fied. Session keys are negotiated rather than distributed, Lawrence C. Paulson: and the protocol has many optional parts. Neverthe- less, the resources needed to verify TLS are modest. The The inductive approach to verifying inductive approach scales up. cryptographic protocols

UCAM-CL-TR-441 February 1998, 46 pages, PDF, PostScript

Lawrence C. Paulson: Abstract: Informal arguments that cryptographic pro- tocols are secure can be made rigorous using induc- A generic tableau prover and tive definitions. The approach is based on ordinary predicate calculus and copes with infinite-state systems. its integration with Isabelle Proofs are generated using Isabelle/HOL. The human January 1998, 16 pages, PDF, PostScript, DVI effort required to analyze a protocol can be as little as

98 a week or two, yielding a proof script that takes a few both parties can generate strong random numbers and minutes to run. forget secrets, and present three protocols for secure Protocols are inductively defined as sets of traces. strong secret sharing, based on RSA, Diffie-Hellman A trace is a list of communication events, perhaps and El-Gamal. As well as being simpler and quicker comprising many interleaved protocol runs. Protocol than their predecessors, our protocols also have slightly descriptions incorporate attacks and accidental losses. stronger security properties: in particular, they make no The model spy knows some private keys and can forge cryptographic use of s and so impose no subtle restric- messages using components decrypted from previous tions upon the use which is made of s by other proto- traffic. Three protocols are analyzed below: Otway- cols. Rees (which uses shared-key encryption), Needham- Schroeder (which uses public-key encryption), and a re- UCAM-CL-TR-446 cursive protocol (which is of variable length). One can prove that event ev always precedes event K. Sparck¨ Jones, S. Walker, S.E. Robertson: ev0 or that property P holds provided X remains secret. Properties can be proved from the viewpoint of the var- A probabilistic model of information ious principals: say, if A receives a final message from B then the session key it conveys is good. and retrieval: development and status UCAM-CL-TR-444 August 1998, 74 pages, PostScript, DVI Peter Sewell: Abstract: The paper combines a comprehensive account From rewrite rules to bisimulation of the probabilistic model of retrieval with new sys- tematic experiments on TREC Programme material. It congruences presents the model from its foundations through its log- May 1998, 72 pages, PostScript ical development to cover more aspects of retrieval data and a wider range of system functions. Each step in the argument is matched by comparative retrieval tests, to Abstract: The dynamics of many calculi can be most provide a single coherent account of a major line of re- clearly defined by reduction semantics. To work with search. The experiments demonstrate, for a large test a calculus, however, an understanding of operational collection, that the probabilistic model is effective and congruences is fundamental; these can often be given robust, and that it responds appropriately, with major tractable definitions or characterisations using a la- improvements in performance, to key features of re- belled transition semantics. This paper considers cal- trieval situations. culi with arbitary reduction semantics of three simple classes, firstly ground term rewriting, then left-linear term rewriting, and then a class which is esentially the UCAM-CL-TR-447 action calculi lacking substantive name binding. Gen- eral definitions of labelled transitions are given in each Giampaolo Bella, Lawrence C. Paulson: case, uniformly in the set of rewrite rules, and without requiring the prescription of additional notions of ob- Are timestamps worth the effort? servation. They give rise to bisimulation congruences. A formal treatment As a test of the theory it is shown that bisimulation for a fragment of CCS is recovered. The transitions gener- September 1998, 12 pages, PDF ated for a fragment of the Ambient Calculus of Cardelli and Gordon, and for SKI combinators, are also dis- Abstract: Theorem proving provides formal and de- cussed briefly. tailed support to the claim that timestamps can give better freshness guarantees than nonces do, and can UCAM-CL-TR-445 simplify the design of crypto-protocols. However, since they rely on synchronised clocks, their benefits are still Michael Roe, Bruce Christianson, debatable. The debate should gain from our formal analysis, which is achieved through the comparison David Wheeler: of a nonce-based crypto-protocol, Needham-Schroeder, Secure sessions from weak secrets with its natural modification by timestamps, Kerberos. July 1998, 12 pages, PDF

Abstract: Sometimes two parties who share a weak se- cret k (such as a password) wish to share a strong secret s (such as a session key) without revealing information about k to a (possibly active) attacker. We assume that

99 UCAM-CL-TR-448 UCAM-CL-TR-452

G.M. Bierman: Florian Kamm ¨uller, Lawrence C. Paulson: A computational interpretation of the A formal proof of Sylow’s theorem λµ calculus An experiment in abstract algebra September 1998, 10 pages, PDF with Isabelle Hol

Abstract: This paper proposes a simple computational November 1998, 30 pages, PDF interpretation of Parigot’s λµ-calculus. The λµ-calculus is an extension of the typed λ-calculus which corre- Abstract: The theorem of Sylow is proved in Isabelle sponds via the Curry-Howard correspondence to classi- HOL. We follow the proof by Wielandt that is more cal logic. Whereas other work has given computational general than the original and uses a non-trivial combi- interpretations by translating the λµ-calculus into other natorial identity. The mathematical proof is explained calculi, I wish to propose here that the λµ-calculus it- in some detail leading on to the mechanization of group self has a simple computational interpretation: it is a theory and the necessary combinatorics in Isabelle. We typed λ-calculus which is able to save and restore the present the mechanization of the proof in detail giving runtime environment. This interpretation is best given reference to theorems contained in an appendix. Some as a single-step semantics which, in particular, leads to weak points of the experiment with respect to a natural a relatively simple, but powerful, operational theory. treatment of abstract algebraic reasoning give rise to a discussion of the use of module systems to represent ab- UCAM-CL-TR-449 stract algebra in theorem provers. Drawing from that, we present tentative ideas for further research into a Florian Kamm ¨uller, Markus Wenzel: section concept for Isabelle. Locales UCAM-CL-TR-453 A sectioning concept for Isabelle Michael Norrish: October 1998, 16 pages, PDF C formalised in HOL Abstract: Locales are a means to define local scopes for the interactive proving process of the theorem prover December 1998, 156 pages, PDF Isabelle. They delimit a range in which fixed assump- PhD thesis (August 1998) tions are made, and theorems are proved which depend on these assumptions. A locale may also contain con- Abstract: We present a formal semantics of the C pro- stants and associated with pretty printing syntax. gramming language, covering both the type system and Locales can be seen as a simple form of modules. the dynamic behaviour of programs. The semantics is They are similar to sections as in Automath or Coq. wide-ranging, covering most of the language, with its Locales are used to enhance abstract reasoning. It also most significant omission being the C library. Using a discusses some implementation issues. structural operational semantics we specify transition relations for C’s expressions, statements and declara- UCAM-CL-TR-450 tions in higher order logic. The consistency of our definition is assured by its Jacobus Erasmus van der Merwe: specification in the HOL theorem prover. With the the- orem prover, we have used the semantics as the basis for Open service support for ATM a set of proofs of interesting theorems about C. We in- vestigate properties of expressions and statements sep- November 1998, 164 pages, paper copy arately. PhD thesis (St John’s College, September 1997) In our chapter of results about expressions, we be- gin with two results about the interaction between the UCAM-CL-TR-451 type system and the dynamic semantics. We have both type preservation, that the values produced by expres- Sean Rooney: sions conform to the type predicted for them; and type safety, that typed expressions will not block, but will ei- The structure of open ATM control ther evaluate to a value, or cause undefined behaviour. architectures We then also show that two broad classes of expres- sion are deterministic. This last result is of considerable November 1998, 183 pages, paper copy practical value as it makes later verification proofs sig- PhD thesis (Wolfson College, February 1998) nificantly easier.

100 In our chapter of results about statements, we prove paper considers the question proof-theoretically, giving a series of derived rules that provide C with Floyd- sequent calculus, natural deduction and axiomatic for- Hoare style “axiomatic” rules for verifying properties mulations. of programs. These rules are consequences of the orig- inal semantics, not independently stated axioms, so we UCAM-CL-TR-456 can be sure of their soundness. This chapter also proves the correctness of an automatic tool for constructing Joshua Robert Xavier Ross: post-conditions for loops with break and return state- ments. An evaluation based approach to Finally, we perform some simple verification case studies, going some way towards demonstrating practi- process calculi cal utility for the semantics and accompanying tools. January 1999, 206 pages, paper copy This technical report is substantially the same as the PhD thesis (Clare College, July 1998) PhD thesis I submitted in August 1998. The minor dif- ferences between that document and this are principally improvements suggested by my examiners Andy Gor- UCAM-CL-TR-457 don and Tom Melham, whom I thank for their help and careful reading. Andrew D. Gordon, Paul D. Hankin:

UCAM-CL-TR-454 A concurrent object calculus: reduction and typing Andrew M. Pitts: February 1999, 63 pages, PDF Parametric polymorphism and operational equivalence Abstract: We obtain a new formalism for concur- rent object-oriented languages by extending Abadi abd December 1998, 39 pages, PDF Cardelli’s imperative object calculus with operators for concurrency from the µ-calculus and with operators Abstract: Studies of the mathematical properties of for synchronisation based on mutexes. Our syntax of impredicative polymorphic types have for the most terms is extremely expressive; in a precise sense it uni- part focused on the polymorphic lambda calculus of fies notions of expression, process, store, thread and Girard-Reynolds, which is a calculus of total polymor- configuration. We present a chemical-style reduction se- phic functions. This paper considers polymorphic types mantics, and prove it equivalent to a structural opera- from a functional programming perspective, where the tional semantics. We identify a deterministic fragment partialness arising from the presence of fixpoint re- that is closed under reduction and show that it includes cursion complicates the nature of potentially infinite the imperative object calculus. A collection of type sys- (‘lazy’) datatypes. An approach to Reynolds’ notion tems for object oriented constructs is at the heart of of relational parametricity is developed that works di- Abadi and Cardelli’s work. We recast one of Abadi rectly on the syntax of a programming language, using and Cardelli’s first-order type systems with object types a novel closure operator to relate operational behaviour and subtyping in the setting of our calculus and prove to parametricity properties of types. Working with an subject reduction. Since our syntax of terms includes extension of Plotkin’s PCF with ∀-types, lazy lists and both stores and running expressions, we avoid the need existential types, we show by example how the result- to separate store typing from typing of expressions. ing logical relation can be used to prove properties of We translate communication channels and choice-free polymorphic types up to operational equivalence. asynchronous µ-calculus into our calculus to illustrate its expressiveness; the types of read-only and write-only UCAM-CL-TR-455 channels are supertypes of read-write channels.

G.M. Bierman: UCAM-CL-TR-458

Multiple modalities Lawrence C. Paulson: December 1998, 26 pages, PDF Final coalgebras as greatest fixed Abstract: Linear logic removes the structural rules of points in ZF set theory weakening and contraction and adds an S4-like modal- ity (written !). Only formulae of the form !φ can be March 1999, 25 pages, PDF weakened or contracted. An interesting question is whether these two capabilities can be separated using two different modalities. This question was studied se- mantically in a comprehensive paper by Jacobs. This

101 Abstract: A special final coalgebra theorem, in the style The language enables the construction of parallel ap- of Aczel (1988), is proved within standard Zermelo- plications by the hierarchical composition of platform- Fraenkel set theory. Aczel’s Anti-Foundation Axiom is independent parallel forms, each of which implements replaced by a variant definition of function that admits a form of task or . These forms may be non-well-founded constructions. Variant ordered pairs used to determine both query and non-query actions. and tuples, of possibly infinite length, are special cases Queries are expressed in a declarative language of variant functions. Analogues of Aczel’s solution and based on “monoid comprehensions”. The approach substitution lemmas are proved in the style of Rut- of using monoids to model data types and monoid ten and Turi (1993). The approach is less general than homomorphisms to iterate over collection types en- Aczel’s, but the treatment of non-well-founded objects ables mathematically provable compile-time optimisa- is simple and concrete. The final coalgebra of a functor tions whilst also facilitating multiple collection types is its greatest fixedpoint. Compared with previous work and data type extensibility. Monoid comprehension (Paulson, 1995a), iterated substitutions and solutions programs are automatically transformed into paral- are considered, as well as final coalgebras defined with lel programs composed of applications of the paral- respect to parameters. The disjoint sum construction is lel forms, one of which is the “monoid homomor- replaced by a smoother treatment of urelements that phism”. This process involves identifying the parts of simplifies many of the derivations. The theory facili- a query where task and data parallelism are available tates machine implementation of recursive definitions and mapping that parallelism onto the most suitable by letting both inductive and coinductive definitions be form. Data parallelism in queries is mapped onto a represented as fixedpoints. It has already been applied form that implements combining tree parallelism for to the theorem prover Isabelle (Paulson, 1994). query evaluation and dividing tree parallelism to re- alise data partitioning. is mapped onto UCAM-CL-TR-459 two separate forms that implement pipeline and in- dependent parallelism. This translation process is ap- Mohamad Afshar: plied to all comprehension queries including those in complex applications. The result is a skeleton program An open parallel architecture for in which both the query and non-query parts are ex- pressed within a single language. Expressions in this data-intensive applications language are amenable to the application of optimising July 1999, 225 pages, PostScript, DVI skeleton rewrite rules. A complete prototype of the decision-support ar- PhD thesis (King’s College, December 1998) chitecture has been constructed on a 128-cell MIMD parallel computer. A demonstration of the utility of Abstract: Data-intensive applications consist of both the query framework is performed by modelling some declarative data-processing parts and imperative com- of OQL and a substantial subset of SQL. The sys- putational parts. For applications such as climate tem is evaluated for query speedup with a number of modelling, scale hits both the computational aspects hardware configurations using a large music catalogue which are typically handled in a procedural pro- database. The results obtained show that the implemen- gramming language, and the data-processing aspects tation delivers the performance gains expected while which are handled in a database query language. Al- offering a convenient definition of the parallel environ- though parallelism has been successfully exploited in ment. the data-processing parts by parallel evaluation of database queries associated with the application, cur- rent database query languages are poor at expressing UCAM-CL-TR-460 the computational aspects, which are also subject to scale. Giampaolo Bella: This thesis proposes an open architecture that de- livers parallelism shared between the database, system Message reception in the inductive and application, thus enabling the integration of the approach conventionally separated query and non-query compo- nents of a data-intensive application. The architecture March 1999, 16 pages, PDF is data-model independent and can be used in a va- riety of different application areas including decision- Abstract: Cryptographic protocols can be formally support applications, which are query based, and com- analysed in great detail by means of Paulson’s Induc- plex applications, which comprise procedural language tive Approach, which is mechanised by the theorem statements with embedded queries. The architecture en- prover Isabelle. The approach only relied on message compasses a unified model of parallelism and the reali- sending (and noting) in order to keep the models sim- sation of this model in the form of a language within ple. We introduce a new event, message reception, and which it is possible to describe both the query and show that the price paid in terms of runtime is negli- non-query components of data-intensive applications. gible because old proofs can be reused. On the other

102 hand, the new event enhances the global expressive- UCAM-CL-TR-463 ness, and makes it possible to define an accurate no- tion of agents’ knowledge, which extends and replaces Peter Sewell, Jan Vitek: Paulson’s notion of spy’s knowledge. We have designed new guarantees to assure each agent that the peer does Secure composition of insecure not know the crucial message items of the session. This work thus extends the scope of the Inductive approach. components Finally, we provide general guidance on updating the April 1999, 44 pages, PostScript protocols analysed so far, and give examples for some cases. Abstract: Software systems are becoming heteroge- neous: instead of a small number of large programs UCAM-CL-TR-461 from well-established sources, a user’s desktop may Joe Hurd: now consist of many smaller components that inter- act in intricate ways. Some components will be down- Integrating Gandalf and HOL loaded from the network from sources that are only partially trusted. A user would like to know that a num- March 1999, 11 pages, PDF ber of security properties hold, e.g. that personal data Abstract: Gandalf is a first-order resolution theorem- is not leaked to the net, but it is typically infaesible prover, optimized for speed and specializing in manip- to verify that such components are well-behaved. In- ulations of large clauses. In this paper I describe GAN- stead they must be executed in a secure environment, DALF TAC, a HOL tactic that proves goals by calling or wrapper, that provides fine-grain control of the al- Gandalf and mirroring the resulting proofs in HOL. lowable interactions between them, and between com- This call can occur over a network, and a Gandalf ponents and other system resources. server may be set up servicing multiple HOL clients. In this paper we study such wrappers, focussing on In addition, the translation of the Gandalf proof into how they can be expressed in a way that enables their HOL fits in with the LCF model and guarantees logical security properties to be stated and proved rigorously. consistency. We introduce a model programming language, the box- π calculus, that supports composition of software com- UCAM-CL-TR-462 ponents and the enforcement of security policies. Sev- eral example wrappers are expressed using the calculus; Peter Sewell, Paweł T. Wojciechowski, we explore the delicate security properties they guaran- Benjamin C. Pierce: tee. Location-independent UCAM-CL-TR-464 communication for mobile agents: a two-level architecture Boaz Lerner, William Clocksin, ´ April 1999, 31 pages, PostScript Seema Dhanjal, Maj Hulten, Christipher Bishop: Abstract: We study communication primitives for inter- action between mobile agents. They can be classified Feature representation for the into two groups. At a low level there are location de- automatic analysis of fluorescence pendent primitives that require a programmer to know the current site of a mobile agent in order to commu- in-situ hybridization images nicate with it. At a high level there are location inde- pendent primitives that allow communication with a May 1999, 36 pages, PDF mobile agent irrespective of its current site and of any migrations. Implementation of these requires delicate Abstract: Fast and accurate analysis of flourescence in- distributed infrastructure. We propose a simple calcu- situ hybridization (FISH) images will depend mainly lus of agents that allows implementation of such dis- upon two components: a classifier to discriminate be- tributed infrastructure algorithms to be expressed as tween artifacts and valid signal data, and well discrim- encodings, or compilations, of the whole calculus into inating features to represent the signals. Our previous the fragment with only location dependent communi- work has focused on the first component. To investigate cation. These encodings give executable descriptions of the second component, we evaluate candidate feature the algorithms, providing a clean implementation strat- sets by illustrating the probability density functions and egy for prototype languages. The calculus is equipped scatter plots for the features. This analysis provides in- with a precise semantics, providing a solid basis for un- sight into dependencies between features, indicates the derstanding the algorithms and reasoning about their relative importancce of members of a feature set, and correctness and robustness. Two sample infrastructure helps in identifying sources of potential classification algorithms are presented as encodings. errors. The analysis recommends several intensity and hue-based features for representing FISH signals. The

103 recommendation is confirmed by the probability of mis- with the number of probes. The approach described classification using a two-layer neural network (NN), here dispenses with automatic focusing, and instead re- and also by a feature selection technique making use lies on a larger statistical sample of the specimen at a of a class separability criterion. Represented by these fixed focal plane. Images across the specimen can be intensity and hue-based features, 90% of valid signals obtained in significantly less time if a fixed focal plane and artifacts are corrently classified using the NN. is used. A trainable classifier based on a neural network is used to discriminate between valid and artifact sig- UCAM-CL-TR-465 nals represented by a set of features. This improves on previous classification schemes that are based on non- Boaz Lerner, Seema Dhanjal, Maj Hulten:´ adaptable decision boundaries and are trained using only examples of valid signals. Trained by examples Gelfish – graphical environment for of valid and artifact signals, three NN classifiers, two labelling FISH images of them hierarchical, each achieve between 83% and 87% classification accuracy on unseen data. When data May 1999, 20 pages, PDF is pre-discriminated in this way, errors in dot counting can be significantly reduced. Abstract: Dot counting in flourescence in-situ hy- bridization (FISH) images that relies on an automatic UCAM-CL-TR-467 focusing method for obtaining clearly defined images is prone to errors. Our recently developed system has Lawrence C. Paulson: dispensed with automatic focusing, and insteaqd relies on a larger statistical sample of the specimen at a fixed Mechanizing UNITY in Isabelle focal plane. The system is based on well-discriminating features to represent the signals and a neural network June 1999, 22 pages, PDF classifier to discriminate between artifacts and valid sig- nal data. Results showed that nearly 90% of valid sig- Abstract: UNITY is an abstract formalism for prov- nals and artifacts of two flourophores within 400 FISH ing properties of concurrent systems, which typically images were correctly classified. To train the classifier, are expressed using guarded assignments [Chandy and accurate labelling of the image is required. GELFISH Misra 1988]. UNITY has been mechanized in higher- is a Graphical Environment for Labelling FISH im- order logic using Isabelle, a proof assistant. Safety and ages that enables the labelling of FISH signals and the progress primitives, their weak forms (for the substi- rejection of unanalysable nuclei simply and rapidly. tution axiom) and the program composition operator Feedback provided by the environment allows the user (union) have been formalized. To give a feel for the to correct the results of labelling effortlessly by click- concrete syntax, the paper presents a few extracts from ing GELFISH buttons using the mouse. Furthermore, the Isabelle definitions and proofs. It discusses a small GELFISH is flexible and can be modified easily for ad- example, two-process mutual exclusion. A mechanical ditional FISH applications. Implemented using popu- theory of unions of programs supports a degree of com- lar software, the environment can be employed on any positional reasoning. Original work on extending pro- computer by any user. gram states is presented and then illustrated through a simple example involving an array of processes. UCAM-CL-TR-466 UCAM-CL-TR-468 Boaz Lerner, William Clocksin, Seema Dhanjal, Maj Hulten,´ Stephen Paul Wilcox: Christipher Bishop: Synthesis of asynchronous circuits Automatic signal classification in July 1999, 250 pages, PDF fluorescence in-situ hybridization PhD thesis (Queens’ College, December 1998) images Abstract: The majority of integrated circuits today are May 1999, 24 pages, PDF synchronous: every part of the chip times its operation with reference to a single global clock. As circuits be- Abstract: Previous systems for dot counting in fluores- come larger and faster, it becomes progressively more cence in-situ hybridization (FISH) images have relied on difficult to coordinate all actions of the chip to the an automatic focusing method for obtaining a clearly clock. Asynchronous circuits do not suffer from this defined image. Because signals are distributed in three problem, because they do not require global synchro- dimensions within the nucleus and artifacts such as de- nization; they also offer other benefits, such as modu- bris and background fluorescence can attract the focus- larity, lower power and automatic adaptation to physi- ing method , valid signals can be left unfocused or un- cal conditions. seen. This leads to dot counting errors, which increase

104 The main disadvantage of asynchronous circuits is UCAM-CL-TR-471 that there are few tools to help with design. This thesis describes a new synthesis tool for asynchronous mod- Robert M. Brady, Ross J. Anderson, ules, which combines a number of novel ideas with ex- Robin C. Ball: isting methods for finite state machine synthesis. Con- nections between modules are assumed to have un- Murphy’s law, the fitness of bounded finite delays on all wires, but fundamental mode is used inside modules, rather than the pessimistic evolving species, and the limits of speed-independent or quasi-delay-insensitive models. software reliability Accurate technology-specific verification is performed to check that circuits work correctly. September 1999, 14 pages, PDF Circuits are described using a language based upon the Signal Transition Graph, which is a well-known Abstract: We tackle two problems of interest to the soft- method for specifying asynchronous circuits. Concur- ware assurance community. Firstly, existing models of rency reduction techniques are used to produce a large software development (such as the waterfall and spiral number of circuits that conform to a given specifica- models) are oriented towards one-off software develop- tion. Circuits are verified using a simulation algorithm ment projects, while the growth of mass market com- derived from the work of Brzozowski and Seger, and puting has led to a world in which most software con- then performance estimations are obtained by a gate- sists of packages which follow an evolutionary devel- level simulator utilising a new estimation of waveform opment model. This leads us to ask whether anything slopes. Circuits can be ranked in terms of high speed, interesting and useful may be said about evolutionary low power dissipation or small size, and then the best development. We answer in the affirmative. Secondly, circuit for a particular task chosen. existing reliability growth models emphasise the Pois- Results are presented that show significant improve- son distribution of individual software bugs, while the ments over most circuits produced by other synthe- empirically observed reliability growth for large sys- sis tools. Some circuits are twice as fast and dissipate tems is asymptotically slower than this. We provide a half the power of equivalent speed-independent cir- rigorous explanation of this phenomenon. Our relia- cuits. Specification examples are provided which show bility growth model is inspired by statistical thermo- that the front-end specification is easier to use than cur- dynamics, but also applies to biological evolution. It is rent specification approaches. The price that must be in close agreement with experimental measurements of paid for the improved performance is decreased relia- the fitness of an evolving species and the reliability of bility and technology dependence of the circuits pro- commercial software products. However, it shows that duced; the proposed tool can also can a very long time there are significant differences between the evolution to produce a result. of software and the evolution of species. In particular, we establish maximisation properties corresponding to UCAM-CL-TR-469 Murphy’s law which work to the advantage of a biolog- ical species, but to the detriment of software reliability. Jacques Desir´ e´ Fleuriot: UCAM-CL-TR-472 A combination of geometry theorem proving and nonstandard analysis, Ben Y. Reis: with application to Newton’s Simulating music learning with Principia autonomous listening agents: August 1999, 135 pages, paper copy entropy, ambiguity and context PhD thesis (Clare College, March 1999) September 1999, 200 pages, paper copy PhD thesis (Queens’ College, July 1999) UCAM-CL-TR-470 UCAM-CL-TR-473 Florian Kamm ¨uller: Modular reasoning in Isabelle Clemens Ballarin: August 1999, 128 pages, paper copy Computer algebra and theorem PhD thesis (Clare College, April 1999) proving October 1999, 122 pages, paper copy PhD thesis (Darwin College)

105 UCAM-CL-TR-474 are classified by the techniques into colour and as real or artifact with accuracies of around 98% and 88%, Boaz Lerner: respectively. The results of the comparison also show a trade-off between simplicity represented by the naive A Bayesian methodology and Bayesian classifier and high classification performance probability density estimation for represented by the other techniques. fluorescence in-situ hybridization UCAM-CL-TR-476 signal classification Mark Staples: October 1999, 31 pages, PDF Linking ACL2 and HOL Abstract: Previous research has indicated the signifi- November 1999, 23 pages, PDF cance of accurate classification of flourescence in-situ hybridization (FISH) signals when images are captured Abstract: This report describes ACL2PII, a system in a fixed focal plane without relying on an auto- which dynamically links the theorem provers ACL2 focusing mechanism. Based on well-discriminating fea- and Hol, using the PROSPER project’s Plug-In interface tures and a trainable neural network (NN) classifier, to Hol. The focus of the system is on making ACL2 a previous system enabled highly-accurate classifica- theorems available from within Hol. In a motivating tion of valid signals and artifacts of two fluorophores. example we show how to transfer results from ACL2’s However, since training and optimisation of an NN ‘small machine’ theory. This theory highlights two of require extensive resources and experimentation, we ACL2’s strengths: symbolic simulation and the fast ex- investigate in this work a simpler alternative for the ecution of operationally defined functions. This allows NN classifier – the naive Bayesian classifier (NBC). ACL2 specifications to be readily validated against real The Bayesian methodology together with an indepen- world requirements. The ACL2PII system allows Hol dence assumption allow the NBC to predict the a users to capitalise on results about such ACL2 specifica- posteriori probability of class membership using esti- tions. ACL2 and Hol are both general purpose theorem mated class-conditional densities. Densities measured provers, but Hol is slightly more expressive, and has by three methods: single Gaussian estimation (SGE; growing infrastructure for interoperability with other parametric method), Gaussian mixture model (GMM; systems. This report assumes a passing knowledge of semi-parametic method) and kernel density estimation both ACL2 and Hol. (KDE; non-parametric method) are evaluated for this purpose. The accuracy of the NBC employing data UCAM-CL-TR-477 modelled by SGE is found to be similar to that based on GMM, slightly inferior to that based on KDE but Gian Luca Cattani, Glynn Winskel: widely inferior to that of the NN. Therefore, when sup- porting the two classifiers, the system enables a trade- Presheaf models for CCS-like off between the NN performance and the NBC simplic- languages ity. Finally, the evaluation of the NBC accuracy pro- vides a mechanism for both model and feature selec- November 1999, 46 pages, PDF tion. Abstract: The aim of this paper is to harness the mathe- UCAM-CL-TR-475 matical machinery around presheaves for the purposes of process calculi. Joyal, Nielsen and Winskel proposed Boaz Lerner, Neil D. Lawrence: a general definition of bisimulation from open maps. Here we show that open-map bisimulations within a A comparison of state-of-the-art range of presheaf models are congruences for a gen- eral process language, in which CCS and related lan- classification techniques with guages are easily encoded. The results are then trans- application to cytogenetics ferred to traditional models for processes. By first es- tablishing the congruence results for presheaf models, October 1999, 34 pages, PDF abstract, general proofs of congruence properties can be provided and the awkwardness caused through tra- Abstract: Several state of the art techniques: a neu- ditional models not always possessing the cartesian lift- ral network, Bayesian neural network, support vector ings, used in the break-down of process operations, are machine and naive Bayesian classifier are experimen- side-stepped. The abstract results are applied to show tally evaluated in discriminating flourescence in-situ hy- that hereditary history-preserving bisimulation is a con- bridization (FISH) signals. Highly-accurate classifica- gruence for CCS-like languages to which is added a re- tion of signals from real data and artifacts of two cy- finement operator on event structures as proposed by togenetic probes (colours) is required for detecting ab- van Glabbeek and Goltz. normalities in the data. More than 3100 FISH signals

106 UCAM-CL-TR-478 We then study the use of primary-backup mecha- nisms within server design, as previous work on server Peter Sewell, Jan Vitek: replication in security centres on the use of the state ma- chine approach for replication, which provides a higher Secure composition of untrusted degree of assurance in system design, but adds com- plexity. code: wrappers and causality types We then provide a design for a server to reliably November 1999, 36 pages, PostScript and securely store objects across a loosely coupled, dis- tributed environment. The main goal behind this design Abstract: We consider the problem of assembling con- was to realise the ability for a client to exert control current software systems from untrusted or partially over the fault tolerance inherent in the service. trusted off-the-shelf components, using wrapper pro- The main conclusions we draw from our research grams to encapsulate components and enforce secu- are that fault tolerance has a wider application within rity policies. In previous work we introduced the box- security than current practices, which are primarily π process calculus with constrained interaction to ex- based on replicating servers, and clients can exert con- press wrappers and discussed the rigorous formula- trol over the protocols and mechanisms to achieve re- tion of their security properties. This paper addresses silience against differing classes of attack. We promote the verification of wrapper information flow proper- some new ideas on how, by challenging the prevail- ties. We present a novel causal type system that stat- ing model for client-server architectures in a secure en- ically captures the allowed flows between wrapped vironment, legitimate clients can have greater control possibly-badly-typed components; we use it to prove over the services they use. We believe this to be a useful that a unidirectional-flow wrapper enforces a causal goal, given that the client stands to lose if the security flow property. of the server is undermined.

UCAM-CL-TR-479 UCAM-CL-TR-480

Geraint Price: Mike Gordon: The interaction between fault Programming combinations of tolerance and security deduction and BDD-based symbolic calculation December 1999, 144 pages, PDF PhD thesis (Wolfson College, June 1999) December 1999, 24 pages, PDF

Abstract: This dissertation studies the effects on system Abstract: Theorem provers descended from LCF allow design when including fault tolerance design principles their users to write complex proof tools that provide within security services. high assurance that false theorems will not be proved. We start by looking at the changes made to the trust This paper describes some experiments in extending the model within protocol design, and how moving away ‘LCF approach’ to enable BDD-based symbolic algo- from trusted server design principles affects the struc- rithms to be programmed with a similar assurance. The ture of the protocol. Taking the primary results from deduction is supplied by the HOL system and the BDD this work, we move on to study how control in proto- algorithms by the BuDDy package. col execution can be used to increase assurances in the actions of legitimate participants. We study some exam- UCAM-CL-TR-481 ples, defining two new classes of attack, and note that by increasing client control in areas of protocol execu- tion, it is possible to overcome certain vulnerabilities. Mike Gordon, Ken Friis Larsen: We then look at different models in fault tolerance, Combining the Hol98 proof assistant and how their adoption into a secure environment can change the design principles and assumptions made with the BuDDy BDD package when applying the models. We next look at the application of timing checks December 1999, 71 pages, paper copy in protocols. There are some classes of timing attack that are difficult to thwart using existing techniques, UCAM-CL-TR-482 because of the inherent unreliability of networked com- munication. We develop a method of converting the John Daugman: Quality of Service mechanisms built into ATM net- works in order to achieve another layer of protection Biometric decision landscapes against timing attacks. January 2000, 15 pages, PDF

107 Abstract: This report investigates the “decision land- benefit in identifying important material in a semantic scapes” that characterize several forms of biometric de- representation rather than a surface one, but that, de- cision making. The issues discussed include: (i) Esti- spite the robustness of the source representation, inac- mating the degrees-of-freedom associated with different curacies in CLASP’s linguistic analysis can dramatically biometrics, as a way of measuring the randomness and affect the readability of its summaries. I discuss ways in complexity (and therefore the uniqueness) of their tem- which this and other problems might be overcome. plates. (ii) The consequences of combining more than one biometric test to arrive at a decision. (iii) The re- UCAM-CL-TR-485 quirements for performing identification by large-scale exhaustive database search, as opposed to mere veri- Daryl Stewart, Myra VanInwegen: fication by comparison against a single template. (iv) Scenarios for Biometric Key Cryptography (the use of Three notes on the interpretation of biometrics for encryption of messages). These issues are considered here in abstract form, but where appropri- Verilog ate, the particular example of iris recognition is used January 2000, 47 pages, paper copy as an illustration. A unifying theme of all four sets of issues is the role of combinatorial complexity, and its measurement, in determining the potential decisiveness UCAM-CL-TR-486 of biometric decision making. James Richard Thomas: UCAM-CL-TR-483 Stretching a point: aspect and Hendrik Jaap Bos: temporal discourse Elastic network control February 2000, 251 pages, paper copy PhD thesis (Wolfson College, January 1999) January 2000, 184 pages, paper copy PhD thesis (Wolfson College, August 1999) UCAM-CL-TR-487 UCAM-CL-TR-484 Tanja Vos, Doaitse Swierstra: Richard Tucker: Sequential program composition in Automatic summarising and the UNITY CLASP system March 2000, 20 pages, PDF January 2000, 190 pages, PDF PhD thesis (1999) Abstract: Large distributed applications are composed of basic blocks by using composition operators. In an Abstract: This dissertation discusses summarisers and ideal situation, one should be able to develop and verify summarising in general, and presents CLASP, a new each of these basic components by itself using composi- summarising system that uses a shallow semantic rep- tionality theorems of the respective composition opera- resentation of the source text called a “predication co- tors stating that properties of a composite program can hesion graph”. be proved by proving properties of its components. Nodes in the graph are “simple predications” corre- Generally two forms of distributed program com- sponding to events, states and entities mentioned in the position can be distinguished: parallel composition and text; edges indicate related or similar nodes. Summary sequential composition. Parallel composition is stan- content is chosen by selecting some of these predica- dard in UNITY and is used when two distributed tions according to criteria of “importance”, “represen- component-programs need to cooperate in one way or tativeness” and “cohesiveness”. These criteria are ex- another. Sequential composition of UNITY programs pressed as functions on the nodes of a weighted graph. is not part of core UNITY. It can however be very use- Summary text is produced either by extracting whole ful when we want a program to work with the results sentences from the source text, or by generating short, of another program. In this technical report we shall indicative “summary phrases” from the selected predi- formally define and model sequential program compo- cations. sition within the HOL-UNITY embedding. CLASP uses linguistic processing but no domain knowledge, and therefore does not restrict the subject matter of the source text. It is intended to deal robustly with complex texts that it cannot analyse completely accurately or in full. Experiments in summarising sto- ries from the Wall Street Journal suggest there may be a

108 UCAM-CL-TR-488 we design a framework that can support these prop- erties. To analyse the framework, we define a security Giampaolo Bella, Fabio Massacci, policy for web publishing that focuses on the guaran- Lawrence Paulson, Piero Tramontano: teed integrity and authenticity of web publications, and then describe some technical primitives that enable us Formal verification of card-holder to achieve our requirements. Finally, the Jikzi publish- ing system—an implementation of our framework—is registration in SET presented with descriptions of its architecture and pos- March 2000, 15 pages, PDF sible applications.

Abstract: The first phase of the SET protocol, namely UCAM-CL-TR-490 card-holder registration, has been modelled inductively. This phase is presented in outline and its formal model Peter John Cameron Brown: is described. A simple theorem has been proved using Isabelle/HOL, stating that a certification authority will Selective mesh refinement for certify a given key at most once. Many ambiguities, rendering contradictions and omissions were noted when formal- izing the protocol. April 2000, 179 pages, paper copy PhD thesis (Emmanuel College, February 1998) UCAM-CL-TR-489 Abstract: A key task in computer graphics is the render- Jong-Hyeon Lee: ing of complex models. As a result, there exist a large number of schemes for improving the speed of the ren- Designing a reliable publishing dering process, many of which involve displaying only a simplified version of a model. When such a simplifica- framework tion is generated selectively, i.e. detail is only removed April 2000, 129 pages, PDF in specific regions of a model, we term this selective mesh refinement. PhD thesis (Wolfson College, January 2000) Selective mesh refinement can potentially produce a model approximation which can be displayed at greatly Abstract: Due to the growth of the Internet and the reduced cost while remaining perceptually equivalent to widespread adoption of easy-to use web browsers, the a rendering of the original. For this reason, the field of web provides a new environment for conventional as selective mesh refinement has been the subject of dra- well as new businesses. Publishing on the web is a fun- matically increased interest recently. The resulting selec- damental and important means of supporting various tive refinement methods, though, are restricted in both activities on the Internet such as commercial transac- the types of model which they can handle and the form tions, personal home page publishing, medical informa- of output meshes which they can generate. tion distribution, public key certification and academic Our primary thesis is that a selectively refined mesh scholarly publishing. Along with the dramatic growth can be produced by combining fragments of approx- of the web, the number of reported frauds is increasing imations to a model without regard to the underly- sharply. Since the Internet was not originally designed ing approximation method. Thus we can utilise exist- for web publishing, it has some weaknesses that under- ing approximation techniques to produce selectively re- mine its reliability. fined meshes in n-dimensions. This means that the ca- How can we rely on web publishing? In order to re- pabilities and characteristics of standard approxima- solve this question, we need to examine what makes tion methods can be retained in our selectively refined people confident when reading conventional publica- models. tions printed on paper, to investigate what attacks can We also show that a selectively refined approxima- erode confidence in web publishing, and to understand tion produced in this manner can be smoothly geomet- the nature of publishing in general. rically morphed into another selective refinement in or- In this dissertation, we examine security properties der to satisfy modified refinement criteria. This geomet- and policy models, and their applicability to publish- ric morphing is necessary to ensure that detail can be ing. We then investigate the nature of publishing so that added and removed from models which are selectively we can extract its technical requirements. To help us refined with respect to their impact on the current view understand the practical mechanisms which might sat- frustum. For example, if a model is selectively refined isfy these requirements, some applications of electronic in this manner and the viewer approaches the model publishing are discussed and some example mecha- then more detail may have to be introduced to the dis- nisms are presented. played mesh in order to ensure that it satisfies the new We conclude that guaranteed integrity, verifiable au- refinement criteria. By geometrically morphing this in- thenticity and persistent availability of publications are troduction of detail we can ensure that the viewer is not required to make web publishing more reliable. Hence distracted by “popping” artifacts.

109 We have developed a novel framework within which to be expressed clearly, as translations from a high- these proposals have been verified. This framework level language to a lower level. The levels are based on consists of a generalised resolution-based model repre- rigorously-defined process calculi, which provide sharp sentation, a means of specifying refinement criteria and levels of abstraction. In this dissertation we describe the algorithms which can perform the selective refinement language and use it to develop a distributed infrastruc- and geometric morphing tasks. The framework has al- ture for an example application. The language and ex- lowed us to demonstrate that these twin tasks can be amples have been implemented; we conclude with a de- performed both on the output of existing approxima- scription of the compiler and runtime system. tion techniques and with respect to a variety of refine- ment criteria. UCAM-CL-TR-493 A HTML version of this thesis is at https://www.cl.cam.ac.uk/research/rainbow/publications/pjcb/thesis/Giampaolo Bella: UCAM-CL-TR-491 Inductive verification of cryptographic protocols Anna Korhonen, Genevive Gorrell, Diana McCarthy: July 2000, 189 pages, PDF PhD thesis (Clare College, March 2000) Is hypothesis testing useful for subcategorization acquisition? Abstract: The dissertation aims at tailoring Paulson’s Inductive Approach for the analysis of classical cryp- May 2000, 9 pages, PDF tographic protocols towards real-world protocols. The aim is pursued by extending the approach with new Abstract: Statistical filtering is often used to remove elements (e.g. timestamps and smart cards), new net- noise from automatically acquired subcategorization work events (e.g. message reception) and more expres- frames. In this paper, we compare three different ap- sive functions (e.g. agents’ knowledge). Hence, the aim proaches to filtering out spurious hypotheses. Two hy- is achieved by analysing large protocols (Kerberos IV pothesis tests perfrom poorly, compared to filtering and Shoup-Rubin), and by studying how to specify and frames on the basis of relative frequency. We discuss verify their goals. reasons for this and consider directions for future re- More precisely, the modelling of timestamps and of search. a discrete time are first developed on BAN Kerberos, while comparing the outcomes with those of the BAN UCAM-CL-TR-492 logic. The machinery is then applied to Kerberos IV, whose complicated use of session keys requires a ded- icated treatment. Three new guarantees limiting the Paweł Tomasz Wojciechowski: spy’s abilities in case of compromise of a specific session Nomadic Pict: language and key are established. Also, it is discovered that Kerberos IV is subject to an attack due to the weak guarantees of infrastructure design for mobile confidentiality for the protocol responder. computation We develop general strategies to investigate the goals of authenticity, key distribution and non-injective June 2000, 184 pages, PDF, PostScript agreement, which is a strong form of authentication. PhD thesis (Wolfson College, March 2000) These strategies require formalising the agents’ knowl- edge of messages. Two approaches are implemented. If Abstract: Mobile agents – units of executing compu- an agent creates a message, then he knows all com- tation that can migrate between machines – are likely ponents of the message, including the cryptographic to become an important enabling technology for fu- key that encrypts it. Alternatively, a broad definition of ture distributed systems. We study the distributed in- agents’ knowledge can be developed if a new network frastructures required for location-independent com- event, message reception, is formalised. munication between migrating agents. These infrastruc- The concept of smart card as a secure device that tures are problematic: the choice or design of an in- can store long-term secrets and perform easy compu- frastructure must be somewhat application-specific – tations is introduced. The model cards can be stolen any given algorithm will only have satisfactory per- and/or cloned by the spy. The kernel of their built-in al- formance for some range of migration and communi- gorithm works correctly, so they spy cannot acquire un- cation behaviour; the algorithms must be matched to limited knowledge from their use. However, their func- the expected properties (and robustness demands) of tional interface is unreliable, so they send correct out- applications and the failure characteristic of the com- puts in an unspecified order. The provably secure pro- munication medium. To study this problem we in- tocol based on smart cards designed by Shoup & Ru- troduce an agent programming language – Nomadic bin is mechanised. Some design weaknesses (unknown Pict. It is designed to allow infrastructure algorithms

110 to the authors’ treatment by Bellare & Rogaway’s ap- skeleton is decomposed into a number of links in ortho- proach) are unveiled, while feasible corrections are sug- graphic order, it is then transferred into a sequence of gested and verified. discrete symbols using vector quantisation. the training We realise that the evidence that a protocol achieves of each character-model is performed using either: state its goals must be available to the peers. In consequence, assignment in the lexicon-driven configuration or the we develop a new a principle of prudent protocol de- Baum-Welch method in the lexicon-free configuration. sign, goal availability, which holds of a protocol when The observation sequence of the input word is given suitable guarantees confirming its goals exist on as- to the hidden Markov model and the Viterbi algorithm sumptions that both peers can verify. Failure to observe is applied to provide an ordered list of the candidate our principle raises the risk of attacks, as is the case, for recognitions. example, of the attack on Kerberos IV. UCAM-CL-TR-496 UCAM-CL-TR-494 Gian Luca Cattani, James J. Leifer, Mark David Spiteri: Robin Milner: An architecture for the notification, Contexts and embeddings for storage and retrieval of events closed shallow action graphs July 2000, 165 pages, paper copy July 2000, 56 pages, PostScript PhD thesis (Darwin College, January 2000) Abstract: Action calculi, which have a graphical pre- UCAM-CL-TR-495 sentation, were introduced to develop a theory shared among different calculi for interactive systems. The π- Mohammad S.M. Khorsheed: calculus, the λ-calculus, Petri nets, the Ambient calcu- lus and others may all be represented as action calculi. Automatic recognition of words in This paper develops a part of the shared theory. A recent paper by two of the authors was concerned Arabic manuscripts with the notion of reactive system, essentially a cate- July 2000, 242 pages, PDF gory of process contexts whose behaviour is presented PhD thesis (Churchill College, June 2000) as a reduction relation. It was shown that one can, for any reactive system, uniformly derive a labelled transi- Abstract: The need to transliterate large numbers of tion system whose associated behavioural equivalence historic Arabic documents into machine-readable form relations (e.g. trace equivalence or bisimilarity) will be has motivated new work on offline recognition of Ara- congruential, under the condition that certain relative bic script. Arabic script presents two challenges: or- pushouts exist in the reactive system. In the present pa- thography is cursive and letter shape is context sensi- per we treat closed, shallow action calculi (those with tive. no free names and no nested actions) as a generic appli- This dissertation presents two techniques to achieve cation of these results. We define a category of action high word recognition rates: the segmentation-free graphs and embeddings, closely linked to a category of technique and the segmentation-based technique. The contexts which forms a reactive system. This connec- segmentation-free technique treats the word as a whole. tion is of independent interest; it also serves our present The word image is first transformed into a normalised purpose, as it enables us to demonstrate that appropri- polar image. The two-dimensional Fourier transform ate relative pushouts exist. is then applied to the polar image. This results in a Complemented by work to be reported elsewhere, Fourier spectrum that is invariant to dilation, trans- this demonstration yields labelled transition systems lation, and rotation. The Fourier spectrum is used to with behavioural congruences for a substantial class of form the word template, or train the word model in the action calculi. We regard this work as a step towards template-based and the multiple hidden Markov model comparable results for the full class. (HMM) recognition systems, respectively. The recog- nition of an input word image is based on the mini- UCAM-CL-TR-497 mum distance measure from the word templates and the maximum likelihood probability for the word mod- G.M. Bierman, A. Trigoni: els. The segmentation-based technique uses a single hid- Towards a formal type system for den Markov model, which is composed of multiple ODMG OQL character-models. The technique implements the an- alytic approach in which words are segmented into September 2000, 20 pages, PDF smaller units, not necessarily characters. The word

111 Abstract: In this paper we consider in detail the type shape within a lump of jelly and then causing distor- system of the object-oriented database query language, tions by flexing the jelly. The user controls spatial defor- OQL, as defined by the ODMG. Our main technical mations by manipulating points, curves or a volumet- contribution is a formal definition of the typing relation ric hyperpatch. Directly Manipulated Free-Form Defor- for OQL—surprisingly we could not find a complete mation (DMFFD), in particular, merges the hyperpatch- definition in the literature. We have also uncovered a and point-based approaches and allows the user to pick number of inaccuracies in the ODMG proposal, and and drag object points directly. other work. This thesis embodies four enhancements to the ver- satility and validity of spatial deformation: UCAM-CL-TR-498 1. We enable users to specify deformations by ma- nipulating the normal vector and tangent plane at a Peter Sewell: point. A first derivative frame can be tilted, twisted and scaled to cause a corresponding distortion in both the Applied π – a brief tutorial ambient space and inset object. This enhanced control is accomplished by extending previous work on bivari- July 2000, 65 pages, PDF, PostScript ate surfaces to trivariate hyperpatches. 2. We extend DMFFD to enable curve manipulation Abstract: This note provides a brief introduction to by exploiting functional composition and degree reduc- π-calculi and their application to concurrent and dis- tion. Although the resulting curve-composed DMFFD tributed programming. Chapter 1 introduces a simple introduces some modest and bounded approximation, π-calculus and discusses the choice of primitives, op- it is superior to previous curve-based schemes in other erational semantics (in terms of reductions and of in- respects. Our technique combines all three forms of dexed early labelled transitions), operational equiva- spatial deformation (hyperpatch, point and curve), can lences, Pict-style programming and typing. Chapter 2 maintain any desired degree of derivative continuity, is goes on to discuss the application of these ideas to amenable to the automatic detection and prevention of distributed systems, looking informally at the design self-intersection, and achieves interactive update rates of distributed π-calculi with grouping and interaction over the entire deformation cycle. primitives. Chapter 3 returns to typing, giving pre- 3. The approximation quality of a polygon-mesh cise definitions for a simple type system and sound- object frequently degrades under spatial deformation ness results for the labelled transition semantics. Fi- to become either oversaturated or undersaturated with nally, Chapters 4 and 5 provide a model development polygons. We have devised an efficient adaptive mesh of the metatheory, giving first an outline and then de- refinement and decimation scheme. Our novel contri- tailed proofs of the results stated earlier. The note can butions include: incorporating fully symmetrical deci- be read in the partial order 1.(2+3+4.5). mation, reducing the computation cost of the refine- ment/decimation trigger, catering for boundary and UCAM-CL-TR-499 crease edges, and dealing with sampling problems. 4. The potential self-intersection of an object is a James Edward Gain: serious weakness in spatial deformation. We have de- veloped a variant of DMFFD which guards against self- Enhancing spatial deformation for intersection by subdividing manipulations into injective (one-to-one) mappings. This depends on three novel virtual sculpting contributions: analytic conditions for identifying self- intersection, and two injectivity tests (one exact but August 2000, 161 pages, PDF computationally costly and the other approximate but PhD thesis (St John’s College, June 2000) efficient). Abstract: The task of computer-based free-form shape design is fraught with practical and conceptual difficul- UCAM-CL-TR-500 ties. Incorporating elements of traditional clay sculpt- ing has long been recognised as a means of shielding Jianxin Yan, Alan Blackwell, Ross Anderson, a user from the complexities inherent in this form of Alasdair Grant: modelling. The premise is to deform a mathematically- defined solid in a fashion that loosely simulates the The memorability and security of physical moulding of an inelastic substance, such as passwords – some empirical results modelling clay or silicone putty. Virtual sculpting com- bines this emulation of clay sculpting with interactive September 2000, 13 pages, PDF feedback. Spatial deformations are a class of powerful mod- Abstract: There are many things that are ‘well known’ elling techniques well suited to virtual sculpting. They about passwords, such as that uers can’t remember indirectly reshape an object by warping the surround- strong passwords and that the passwords they can re- ing space. This is analogous to embedding a flexible member are easy to guess. However, there seems to be a

112 distinct lack of research on the subject that would pass the software part. The architecture consists of a num- muster by the standards of applied psychology. ber of interconnected heterogeneous processors. Our Here we report a controlled trial in which, of four method allows a large design space to be explored by sample groups of about 100 first-year students, three systematically transforming a single SAFL specification were recruited to a formal experiment and of these to investigate different points on the area-time spec- two were given specific advice about password selec- trum. tion. The incidence of weak passwords was determined by cracking the password file, and the number of pass- UCAM-CL-TR-504 word resets was measured from system logs. We ob- served a number of phenomena which run counter to Oi Yee Kwong: the established wisdom. For example, passwords based on mnemonic phrases are just as hard to crack as ran- Word sense selection in texts: dom passwords yet just as easy to remember as naive user selections. an integrated model September 2000, 177 pages, PostScript UCAM-CL-TR-501 PhD thesis (Downing College, May 2000)

David Ingram: Abstract: Early systems for word sense disambigua- tion (WSD) often depended on individual tailor-made Integrated quality of service lexical resources, hand-coded with as much lexical in- management formation as needed, but of severely limited vocab- ulary size. Recent studies tend to extract lexical in- September 2000, 90 pages, paper copy formation from a variety of existing resources (e.g. PhD thesis (Jesus College, August 2000) machine-readable dictionaries, corpora) for broad cov- erage. However, this raises the issue of how to combine UCAM-CL-TR-502 the information from different resources. Thus while different types of resource could make Thomas Marthedal Rasmussen: different contribution to WSD, studies to date have not shown what contribution they make, how they should Formalizing basic number theory be combined, and whether they are equally relevant to all words to be disambiguated. This thesis proposes an September 2000, 20 pages, PDF Integrated Model as a framework to study the inter- relatedness of three major parameters in WSD: Lexical Abstract: This document describes a formalization of Resource, Contextual Information, and Nature of Tar- basic number theory including two theorems of Fermat get Words. We argue that it is their interaction which and Wilson. shapes the effectiveness of any WSD system. Most of this has (in some context) been formalized A generalised, structurally-based sense-mapping al- before but we present a new generalized approach for gorithm was designed to combine various types of handling some central parts, based on concepts which lexical resource. This enables information from these seem closer to the original mathematical intuition and resources to be used simultaneously and compatibly, likely to be useful in other (similar) developments. while respecting their distinctive structures. In study- Our formulation has been mechanized in the Is- ing the effect of context on WSD, different semantic abelle/HOL system. relations available from the combined resources were used, and a recursive filtering algorithm was designed UCAM-CL-TR-503 to overcome combinatorial explosion. We then investi- gated, from two directions, how the target words them- Alan Mycroft, Richard Sharp: selves could affect the usefulness of different types of knowledge. In particular, we modelled WSD with the Hardware/software co-design using cloze test format, i.e. as texts with blanks and all senses for one specific word as alternative choices for filling functional languages the blank. A full-scale combination of WordNet and Roget’s September 2000, 8 pages, PDF Thesaurus was done, linking more than 30,000 senses. Using these two resources in combination, a range of Abstract: In previous work we have developed and disambiguation tests was done on more than 60,000 prototyped a silicon compiler which translates a func- noun instances from corpus texts of different types, and tional language (SAFL) into hardware. Here we present 60 blanks from real cloze texts. Results show that com- a SAFL-level program transformation which: (i) parti- bining resources is useful for enriching lexical informa- tions a specification into hardware and software parts tion, and hence making WSD more effective though not and (ii) generates a specialised architecture to execute completely. Also, different target words make different

113 demand on contextual information, and this interaction UCAM-CL-TR-507 is closely related to text types. Future work is suggested for expanding the analysis on target nature and making Lawrence Paulson: the combination of disambiguation evidence sensitive to the requirements of the word being disambiguated. Mechanizing a theory of program composition for UNITY UCAM-CL-TR-505 November 2000, 28 pages, PDF Gian Luca Cattani, Peter Sewell: Abstract: Compositional reasoning must be better un- Models for name-passing processes: derstood if non-trivial concurrent programs are to be interleaving and causal verified. Chandy and Sanders [2000] have proposed a new approach to reasoning about composition, which September 2000, 42 pages, PDF, PostScript, DVI Charpentier and Chandy [1999] have illustrated by de- veloping a large example in the UNITY formalism. Abstract: We study syntax-free models for name- The present paper describes extensive experiments on passing processes. For interleaving semantics, we iden- mechanizing the compositionality theory and the ex- tify the indexing structure required of an early labelled ample, using the proof tool Isabelle. Broader issues are transition system to support the usual π-calculus op- discussed, in particular, the formalization of program erations, defining Indexed Labelled Transition Systems. states. The usual representation based upon maps from For noninterleaving causal semantics we define Indexed variables to values is contrasted with the alternatives, Labelled Asynchronous Transition Systems, smoothly such as a signature of typed variables. Properties need generalizing both our interleaving model and the stan- to be transferred from one program component’s sig- dard Asynchronous Transition Systems model for CCS- nature to the common signature of the system. Safety like calculi. In each case we relate a denotational se- properties can be so transferred, but progress proper- mantics to an operational view, for bisimulation and ties cannot be. Using polymorphism, this problem can causal bisimulation respectively. We establish complete- be circumvented by making signatures sufficiently flex- ness properties of, and adjunctions between, categories ible. Finally the proof of the example itself is outlined. of the two models. Alternative indexing structures and possible applications are also discussed. These are first UCAM-CL-TR-508 steps towards a uniform understanding of the semantics and operations of name-passing calculi. James Leifer, Robin Milner:

UCAM-CL-TR-506 Shallow linear action graphs and their embeddings Peter Sewell: October 2000, 16 pages, PostScript Modules, abstract types, and distributed versioning Abstract: In previous work, action calculus has been presented in terms of action graphs. Many calculi, or at September 2000, 46 pages, PDF, PostScript, DVI least their salient features, can be expressed as specific action calculi; examples are Petri nets, λ-calculus, π- Abstract: In a wide-area distributed system it is often calculus, fusion calculus, ambient calculus and spi cal- impractical to synchronise software updates, so one culus. must deal with many coexisting versions. We study We here offer linear action graphs as a primitive static typing support for modular wide-area program- basis for action calculi. Linear action graphs have a ming, modelling separate compilation/linking and exe- simpler theory than the non-linear variety. This paper cution of programs that interact along typed channels. presents the category of embeddings of shallow linear Interaction may involve communication of values of action graphs (those without nesting), using a novel abstract types; we provide the developer with fine-grain form of graphical reasoning which simplifies some oth- versioning control of these types to support interoper- erwise complex manipulations in regular algebra. The ation of old and new code. The system makes use of work is done for undirected graphs, and adapted in a a second-class module system with singleton kinds; we few lines to directed graphs. give a novel operational semantics for separate compi- The graphical reasoning used here will be applied lation/linking and execution and prove soundness. in future work to develop behavioural congruences for action calculi.

114 UCAM-CL-TR-509 MDS, in order to establish the overall shape of the con- figuration. The remaining elements are positioned in- Wojciech Basalaj: dependently of one another with respect to this skele- ton configuration. For very large collections the skele- Proximity visualisation of abstract ton configuration can itself be built up incrementally. The incremental method is analysed for the compro- data mise between solution quality and the proportion of January 2001, 117 pages, PDF proximities used, and compared to Principal Compo- PhD thesis (October 2000) nents Analysis on a number of large database tables. In some applications it is convenient to represent in- Abstract: Data visualisation is an established technique dividual objects by compact icons of fixed size, for ex- for exploration, analysis and presentation of data. A ample the use of thumbnails when visualising a set of graphical presentation is generated from the data con- images. Because the MDS analysis only takes the posi- tent, and viewed by an observer, engaging vision – the tion of icons into account, and not their size, its direct human sense with the greatest bandwidth, and the abil- use for visualisation may lead to partial or complete ity to recognise patterns subconciously. For instance, a overlap of icons. Proximity grid – an analogue of MDS correlation present between two variables can be elu- in a discrete domain – is proposed to overcome this de- cidated with a scatter plot. An effective visualisation ficiency. Each element of an abstract data collection is can be difficult to achieve for an abstract collection of represented within a single cell of the grid, and thus objects, e.g. a database table with many attributes, or considerable detail can be shown without overlap. The a set of multimedia documents, since there is no im- proximity relationships are preserved by clustering sim- mediately obvious way of arranging the objects based ilar elements in the grid, and keeping dissimilar ones on their content. Thankfully, similarity between pairs apart. Algorithms for generating such an arrangement of elements of such a collection can be measured, and are presented and compared in terms of output quality a good overview picture should respect this proximity to one another as well as standard MDS. information, by positioning similar elements close to one another, and far from dissimilar objects. The re- UCAM-CL-TR-510 sulting proximity visualisation is a topology preserving Richard Mortier, Rebecca Isaacs, Keir Fraser: map of the underlying data collection, and this work in- vestigates various methods for generating such maps. A Switchlets and resource-assured number of algorithms are devised, evaluated quantita- tively by means of statistical inference, and qualitatively MPLS networks in a case study for each type of data collection. Other May 2000, 16 pages, PDF, PostScript graphical representations for abstract data are surveyed and compared to proximity visualisation. Abstract: MPLS (Multi-Protocol Label Switching) is a A standard method for modelling prximity relations technology with the potential to support multiple con- is multidimensional scaling (MDS) analysis. The result trol systems, each with guaranteed QoS (Quality of Ser- is usually a two- or three-dimensional configuration of vice), on connectionless best-effort networks. However, points – each representing a single element from a col- it does not provide all the capabilities required of a lection., with inter-point distances approximating the multi-service network. In particular, although resource- corresponding proximities. The quality of this approx- assured VPNs (Virtual Private Networks) can be cre- imation can be expressed as a loss function, and the ated, there is no provision for inter-VPN resource man- optimal arrangement can be found by minimising it nu- agement. Control flexibility is limited because resources merically – a procedure known as least-squares metric must be pinned down to be guaranteed, and best-effort MDS. This work presents a number of algorithmic in- flows in different VPNs compete for the same resources, stances of this problem, using established function op- leading to QoS crosstalk. timisation heuristics: Newton-Raphson, Tabu Search, The contribution of this paper is an implementation Genetic Algorithm, Iterative Majorization, and Stimu- on MPLS of a network control framework that sup- lated annealing. Their effectiveness at minimising the ports inter-VPN resource management. Using resource loss function is measured for a representative sample of partitions known as switchlets, it allows the creation data collections, and the relative ranking established. of multiple VPNs with guaranteed resource allocations, The popular classical scaling method serves as a bench- and maintains isolation between these VPNs. Devolved mark for this study. control techniques permit each VPN a customised con- The computational cost of conventional MDS trol system. makes it unsuitable for visualising a large data collec- We motivate our work by discussing related efforts tion. Incremental multidimensional scaling solves this and example scenarios of effective deployment of our problem by considering only a carefully chosen subset system. The implementation is described and evaluated, of all pairwise proximities. Elements that make up clus- and we address interoperability with external IP control ter diameters at a certain level of the single link clus- systems, in addition to interoperability of data across ter hierarchy are identified, and are subject to standard different layer 2 technologies.

115 UCAM-CL-TR-511 An algebraic framework for modelling and verifying Calum Grant: microprocessors using HOL Software visualization in Prolog March 2001, 24 pages, PDF December 1999, 193 pages, PDF PhD thesis (Queens’ College, 1999) Abstract: This report describes an algebraic approach to the specification and verification of microprocessor Abstract: Software visualization (SV) uses computer designs. Key results are expressed and verified using graphics to communicate the structure and behaviour the HOL proof tool. Particular attention is paid to the of complex software and algorithms. One of the impor- models of time and temporal abstraction, culminating tant issues in this field is how to specify SV, because in a number of one-step theorems. This work is then existing systems are very cumbersome to specify and explained with a small but complete case study, which implement, which limits their effectiveness and hinders verifies the correctness of a with micropro- SV from being integrated into professional software de- gram control. velopment tools. In this dissertation the visualization process is de- UCAM-CL-TR-513 composed into a series of formal mappings, which pro- vides a formal foundation, and allows separate aspects Tetsuya Sakai, Karen Sparck¨ Jones: of visualization to be specified independently. The first mapping specifies the information content of each view. Generic summaries for indexing The second mapping specifies a graphical representa- tion of the information, and a third mapping specifies in information retrieval – the graphical components that make up the graphical Detailed test results representation. By combining different mappings, com- pletely different views can be generated. May 2001, 29 pages, PostScript The approach has been implemented in Prolog to provide a very high level specification language for in- Abstract: This paper examines the use of generic sum- formation visualization, and a knowledge engineering maries for indexing in information retrieval. Our main environment that allows data queries to tailor the infor- observations are that: mation in a view. The output is generated by a graphical – With or without pseudo-relevance feedback, a constraint solver that assembles the graphical compo- summary index may be as effective as the correspond- nents into a scene. ing fulltext index for precision-oriented search of highly This system provides a framework for SV called relevant documents. But a reasonably sophisticated Vmax. Source code and run-time data are analyzed by summarizer, using a compression ratio of 10–30%, is Prolog to provide access to information about the pro- desirable for this purpose. gram structure and run-time data for a wide range of – In pseudo-relevance feedback, using a summary highly interconnected browsable views. Different views index at initial search and a fulltext index at final search and means of visualization can be selected from menus. is possibly effective for precision-oriented search, re- An automatic legend describes each view, and can be gardless of relevance levels. This strategy is significantly interactively modified to customize how data is pre- more effective than the one using the summary index sented. A text window for editing source code is syn- only and probably more effective than using summaries chronized with the graphical view. Vmax is a complete as mere term selection filters. For this strategy, the sum- Java development environment and end user SV system. mary quality is probably not a critical factor, and a Vmax compares favourably to existing SV systems compression ratio of 5–10% appears best. in many taxonometric criteria, including automation, scope, information content, graphical output form, UCAM-CL-TR-514 specification, tailorability, navigation, granularity and elision control. The performance and scalability of the Asis Unyapoth: new approach is very reasonable. We conclude that Prolog provides a formal and high Nomadic π-calculi: expressing level specification language that is suitable for specify- ing all aspects of a SV system. and verifying communication infrastructure for mobile computation UCAM-CL-TR-512 June 2001, 316 pages, PDF, PostScript Anthony Fox: PhD thesis (Pembroke College, March 2001)

116 Abstract: This thesis addresses the problem of verify- A few of these issues have been addressed in the pro- ing distributed infrastructure for mobile computation. cess calculus and distributed algorithm communities, In particular, we study language primitives for com- but there remains a wide gulf between what has been munication between mobile agents. They can be clas- captured in semantic models and what is required for sified into two groups. At a low level there are “lo- a precise understanding of the behaviour of practical cation dependent” primitives that require a program- distributed programs that use these protocols. mer to know the current site of a mobile agent in or- In this paper we demonstrate (in a preliminary way) der to communicate with it. At a high level there are that the gulf can be bridged. We give an operational “location independent” primitives that allow commu- model for socket programming with a substantial frac- nication with a mobile agent irrespective of any migra- tion of UDP and ICMP, including loss and failure. The tions. Implementation of the high level requires delicate model has been validated by experiment against actual distributed infrastructure algorithms. In earlier work of systems. It is not tied to a particular programming lan- Sewell, Wojciechowski and Pierce, the two levels were guage, but can be used with any language equipped made precise as process calculi, allowing such algo- with an operational semantics for system calls – here rithms to be expressed as encodings of the high level we give such a language binding for an OCaml frag- into the low level; a distributed programming language ment. We illustrate the model with a few small network “Nomadic Pict” has been built for experimenting with programs. such encodings. This thesis turns to semantics, giving a definition of UCAM-CL-TR-516 the core language (with a type system) and proving cor- rectness of an example infrastructure. This involves ex- Rebecca Isaacs: tending the standard semantics and proof techniques of process calculi to deal with the new notions of sites Dynamic provisioning of and agents. The techniques adopted include labelled transition semantics, operational equivalences and pre- resource-assured and programmable orders (e.g., expansion and coupled simulation), “up virtual private networks to” equivalences, and uniform receptiveness. We also develop two novel proof techniques for capturing the September 2001, 145 pages, PostScript design intuitions regarding mobile agents: we consider PhD thesis (Darwin College, December 2000) “translocating” versions of operational equivalences that take migration into account, allowing composi- Abstract: Virtual Private Networks (VPNs) provide tional reasoning; and “temporary immobility”, which dedicated connectivity to a closed group of users on captures the intuition that while an agent is waiting for a shared network. VPNs have traditionally been de- a lock somewhere in the system, it will not migrate. ployed for reasons of economy of scale, but have either The correctness proof of an example infrastructure been statically defined, requiring manual configuration, is non-trivial. It involves analysing the possible reach- or else unable to offer any quality of service (QoS) guar- able states of the encoding applied to an arbitrary high- antees. level source program. We introduce an intermediate This dissertation describes VServ, a service offer- language for factoring out as many ‘house-keeping’ re- ing dynamic and resource-assured VPNs that can be duction steps as possible, and focusing on the partially- acquired and modified on demand. In VServ, a VPN committed steps. is both a subset of physical resources, such as band- width and label space, together with the means to per- UCAM-CL-TR-515 form fine-grained management of those resources. This network programmability, combined with QoS guaran- Andrei Serjantov, Peter Sewell, tees, enables the multiservice network – a single univer- sal network that can support all types of service and Keith Wansbrough: thus be efficient, cost-effective and flexible. The UDP calculus: VServ is deployed over a network control frame- work known as Tempest. The Tempest explicitly dis- rigorous semantics for real tinguishes between inter- and intra-VPN resource man- networking agement mechanisms. This makes the dynamic resource reallocation capabilities of VServ viable, whilst han- July 2001, 70 pages, PostScript dling highly dynamic VPNs or a large number of VPNs. Extensions to the original implementation of the Tem- Abstract: Network programming is notoriously hard to pest to support dynamically reconfigurable QoS are de- understand: one has to deal with a variety of protocols tailed. (IP, ICMP, UDP, TCP, etc.), concurrency, packet loss, A key part of a dynamic and responsive VPN ser- host failure, timeouts, the complex sockets interface to vice is fully automated VPN provisioning. A notation the protocols, and subtle protability issues. Moreover, for VPN specification is described, together with mech- the behavioural properties of operating systems and the anisms for incorporating policies of the service provider network are not well documented. and the current resource availability in the network into

117 the design process. The search for a suitable VPN topol- P3 manages to make some invalid ciphertexts distin- ogy can be expressed as a optimisation problem that guishable without violating their assumption, and it can is not computationally tractable except for very small also frame innocent user coalitions to fool the tracer. networks. This dissertation describes how the search is Neither the single-key nor arbitrary pirate tracing algo- made practical by tailoring it according to the charac- rithm presented in [1] can identify all keys used by P3 teristics of the desired VPN. as claimed. Instead, it is possible for both algorithms to Availability of VServ is addressed with a proposal catch none of the traitors. We believe that the construc- for distributed VPN creation. A resource revocation tion of our novel pirate also demonstrates a simple way protocol exploits the dynamic resource management to defeat some other black-box traitor tracing schemes capabilities of VServ to allow adaptation in the con- in general. trol plane on a per-VPN basis. Managed resource revo- cation supports highly flexible resource allocation and UCAM-CL-TR-519 reallocation policies, allowing VServ to efficiently pro- vision for short-lived or highly dynamic VPNs. Martin Choquette: UCAM-CL-TR-517 Local evidence in document retrieval

Karen Sparck¨ Jones, P. Jourlin, S.E. Johnson, August 2001, 177 pages, paper copy PhD thesis (Fitzwilliam College, November 2002) P.C. Woodland: The Cambridge Multimedia UCAM-CL-TR-520 Document Retrieval Project: Mohamed Hassan, Neil A. Dodgson: summary of experiments Ternary and three-point univariate July 2001, 30 pages, PostScript, DVI subdivision schemes Abstract: This report summarises the experimental September 2001, 8 pages, PDF work done under the Multimedia Document Retrieval (MDR) project at Cambridge from 1997-2000, with se- Abstract: The generating function formalism is used to lected illustrations. The focus is primarily on retrieval analyze the continuity properties of univariate ternary studies, and on speech tests directly related to retrieval, subdivision schemes. These are compared with their bi- not on speech recognition itself. The report draws on nary counterparts. the many and varied tests done during the project, but also presents a new series of results designed to com- pare strategies across as many different data sets as pos- UCAM-CL-TR-521 sible by using consistent system parameter settings. The project tests demonstrate that retrieval from James Leifer: files of audio news material transcribed using a state of the art speech recognition system can match the refer- Operational congruences for ence level defined by human transcriptions; and that ex- reactive systems pansion techniques, especially when applied to queries, can be very effective means for improving basic search September 2001, 144 pages, PostScript performance. PhD thesis (Trinity College, March 2001)

UCAM-CL-TR-518 Abstract: The dynamics of process calculi, eg. CCS, have often been defined using a labelled transaction Jeff Jianxin Yan, Yongdong Wu: system (LTS). More recently it has become common when defining dynamics to use reaction rules –ie. unla- An attack on a traitor tracing scheme belled transition rules– together with a structural con- gruence. This form, which I call a reactive system, is July 2001, 14 pages, PDF highly expressive but is limited in an important way: LTSs lead more naturally to operational equivalences Abstract: In Crypto’99, Boneh and Franklin proposed and preorders. a public key traitor tracing scheme, which was believed So one would like to derive from reaction rules a to be able to catch all traitors while not accusing any suitable LTS. This dissertation shows how to derive an innocent users (i.e., full-tracing and error-free). Assum- LTS for a wide range of reactive systems. A label for ing that Decision Diffie-Hellman problem is unsolvable an agent (process), a, is defined to be any context, F, in Gq, Boneh and Franklin proved that a decoder can- which intuitively is just large enough so that the agent not distinguish valid ciphertexts from invalid ones that Fa (“a in context F”) is able to perform a reaction. The are used for tracing. However, our novel pirate decoder key contribution of my work is the precise definition

118 of “just large enough”, in terms of the categorical no- behaviour. The first is a method for designing generic tation of relative pushout (RPO), which ensures that behaviour patterns from simple pieces of motion. The several operational equivalences and preorders (strong second is a behaviour pattern for navigating a cluttered bisimulation, weak bisimulation, the traces preorder, environment. The simulation of vision and attention and the failures preorder) are congruences when suf- gives advantages over existing work on both problems. ficient RPOs exist. The approaches to the simulation of perception will be I present a substantial example of a family of re- evaluated in the context of these examples. active systems based on closed, shallow action calculi (those with no free names and no nesting). I prove that UCAM-CL-TR-523 RPOs exist for a category of such contexts. The proof is carried out indirectly in terms of a category of action Robin Milner: graphs and embeddings and gives precise (necessary and sufficient) conditions for the existance of RPOs. Bigraphical reactive systems: I conclude by arguing that these conditions are satis- fied for a wide class of reaction rules. The thrust of this basic theory dissertation is, therefore, towards easing the burden of September 2001, 87 pages, PDF exploring new models of computation by providing a general method for achieving useful operational con- Abstract: A notion of bigraph is proposed as the basis gruences. for a model of mobile interaction. A bigraph consists of two independent structures: a topograph represent- UCAM-CL-TR-522 ing locality and a monograph representing connectiv- ity. Bigraphs are equipped with reaction rules to form Mark F.P. Gillies: bigraphical reactive systems (BRSs), which include ver- Practical behavioural animation sions of the π-calculus and the ambient calculus. Bi- graphs are shown to be a special case of a more ab- based on vision and attention stract notion, wide reactive systems (WRSs), not as- suming any particular graphical or other structure but September 2001, 187 pages, PDF, PostScript equipped with a notion of width, which expresses that Abstract: The animation of human like characters is a agents, contexts and reactions may all be widely dis- vital aspect of computer animation. Most animations tributed entities. rely heavily on characters of some sort or other. This A behavioural theory is established for WRSs us- means that one important aspect of computer anima- ing the categorical notion of relative pushout; it allows tion research is to improve the animation of these char- labelled transition systems to be derived uniformly, in acters both by making it easier to produce animations such a way that familiar behavioural preorders and and by improving the quality of animation produced. equivalences, in particular bisimilarity, are congruential One approach to animating characters is to produce a under certain conditions. Then the theory of bigraphs simulation of the behaviour of the characters which will is developed, and they are shown to meet these con- automatically animate the character. ditions. It is shown that, using certain functors, other The dissertation investigates the simulation of be- WRSs which meet the conditions may also be derived; haviour in practical applications. In particular it fo- these may, for example, be forms of BRS with addi- cuses on models of visual perception for use in simu- tional structure. lating human behaviour. A simulation of perception is Simple examples of bigraphical systems are dis- vital for any character that interacts with its surround- cussed; the theory is developed in a number of ways ings. Two main aspects of the simulation of perception in preparation for deeper application studies. are investigated: – The use of psychology for designing visual algo- UCAM-CL-TR-524 rithms. – The simulation of attention in order to produce Giampaolo Bella, Fabio Massacci, both behaviour and gaze patterns. Lawrence C. Paulson: Psychological theories are a useful starting point for designing algorithms for simulating visual percep- Verifying the SET purchase protocols tion. The dissertation investigates their use and presents some algorithms based on psychological theories. November 2001, 14 pages, PDF Attention is the focusing of a person’s perception on a particular object. The dissertation presents a simula- Abstract: The Secure Electronic Transaction (SET) pro- tion of what a character is attending to (looking at). tocol has been proposed by a consortium of credit card This is used to simulate behaviour and for animating companies and software corporations to guarantee the eye movements. authenticity of e-commerce transactions and the con- The algorithms for the simulation of vision and at- fidentiality of data. When the customer makes a pur- tention are applied to two tasks in the simulation of chase, the SET dual signature keeps his account details

119 secret from the merchant and his choice of goods se- data can be expensive. Thus, work on efficient image cret from the bank. This paper reports verification re- storage (image compression) has the potential to reduce sults for the purchase step of SET, using the inductive storage costs and enable new applications. method. The credit card details do remain confidential. Many image compression schemes are lossy; that is The customer, merchant and bank can confirm most de- they sacrifice image informationto achieve very com- tails of a transaction even when some of those details pact storage. Although this is acceptable for many ap- are kept from them. The usage of dual signatures re- plications, some environments require that compres- quires repetition in protocol messages, making proofs sion not alter the image data. This lossless image com- more difficult but still feasible. The formal analysis has pression has uses in medical, scientific and professional revealed a significant defect. The dual signature lacks video processing applications. explicitness, giving rise to potential vulnerabilities. Most of the work on lossless image compression has focused on monochrome images and has made UCAM-CL-TR-525 use of the spatial smoothness of image data. Only re- cently have researchers begun to look specifically at Timothy L. Harris: the lossless compression of colour images and video. By extending compression schemes for colour images Extensible virtual machines and video, the storage requirements for these important classes of image data can be further reduced. December 2001, 209 pages, PDF Much of the previous research into lossless colour PhD thesis image and video compression has been exploratory. This dissertation studies the problem in a structured Abstract: Virtual machines (VMs) have enjoyed a resur- way. Spatial, spectral and temporal correlations are gence as a way of allowing the same application pro- all considered to facilitate improved compression. This gram to be used across a range of computer systems. has lead to a greater data reduction than many exist- This flexibility comes from the abstraction that the pro- ing schemes for lossless colour image and colour video vides over the native interface of a particular computer. compression. However, this also means that the application is pre- Furthermore, this work has considered the applica- vented from taking the features of particular physical tion of extended lossless image coding to more recent machines into account in its implementation. image types, such as multiview imagery. Thus, systems This dissertation addresses the question of why, that use multiple views of the same scene to provide 3D where and how it is useful, possible and practicable viewing, have beenprovided with a completely novel so- to provide an application with access to lower-level in- lution for the compression of multiview colour video. terfaces. It argues that many aspects of implementa- tion can be devolved safely to untrusted applications UCAM-CL-TR-527 and demonstrates this through a prototype which al- lows control over run-time compilation, object place- Umar Saif: ment within the heap and thread scheduling. The pro- posed architecture separates these application-specific Architectures for ubiquitous systems policy implementations from the application itself. This allows one application to be used with different policies January 2002, 271 pages, PDF on different systems and also allows naıve¨ or premature PhD thesis optimizations to be removed. Abstract: Advances in over the UCAM-CL-TR-526 last decade have made computers faster, cheaper and smaller. This coupled with the revolution in communi- Andrew J. Penrose: cation technology has led to the development of sophis- ticated networked appliances and handheld devices. Extending lossless image compression “Computers” are no longer boxes sitting on a desk, they are all around us, embedded in every nook and December 2001, 137 pages, PDF corner of our environment. This increasing complex- PhD thesis (Gonville & Caius College, January 2001) ity in our environment leads to the desire to design a system that could allow this pervasive functionality to Abstract: “It is my thesis that worthwhile improve- disappear in the infrastructure, automatically carrying ments can be made to lossless image compression out everyday tasks of the users. schemes, by considering the correlations between the Such a system would enable devices embedded in the spectral, temporal and interview aspects of image data, environment to cooperate with one another to make a in extension to the spatial correlations that are tradi- wide range of new and useful applications possible, not tionally exploited.” originally conceived by the manufacturer, to achieve Images are an important part of today’s digital greater functionality, flexibility and utility. world. However, due to the large quantity of data The compelling question then becomes “what soft- needed to represent modern imagery the storage of such ware needs to be embedded in these devices to enable

120 them to participate in such a ubiquitous system”? This Measurement-based management of is the question addressed by the dissertation. network resources Based on the experience with home automation sys- tems, as part of the AutoHAN project, the dissertation April 2002, 273 pages, PDF presents two compatible but different architectures; one PhD thesis to enable dumb devices to be controlled by the system and the other to enable intelligent devices to control, Abstract: Measurement-Based Estimators are able to extend and program the system. characterise data flows, enabling improvements to ex- Control commands for dumb devices are managed isting management techniques and access to previously using an HTTP-based publish/subscribe/notify archi- impossible management techniques. It is the thesis of tecture; devices publish their control commands to the this dissertation that in addition to making practical system as XML-typed discrete messages, applications adaptive management schemes, measurement-based es- discover and subscribe interest in these events to send timators can be practical within current limitations of and receive control commands from these devices, as resource. typed messages, to control their behavior. The archi- Examples of network management include the char- tecture handles mobility and failure of devices by us- acterisation of current utilisation for explicit admission ing soft-state, redundent subscriptions and “care-of” control and the configuration of a scheduler to divide nodes. The system is programmed with event scripts link-capacity among competing traffic classes. Without that encode automation rules as condition-action bind- measurements, these management techniques have re- ings. Finally, the use of XML and HTTP allows devices lied upon the accurate characterisation of traffic – with- to be controlled by a simple Internet browser. out accurate traffic characterisation, network resources While the publish/subscribe/notify defines a simple may be under or over utilised. architecture to enable interoperability of limited capa- Embracing Measurement-Based Estimation in ad- bility devices, intelligent devices can afford more com- mission control, Measurement-Based Admission Con- plexity that can be utilized to support user applications trol (MBAC) algorithms have allowed characterisation and services to control, manage and program the sys- of new traffic flows while adapting to changing flow tem. However, the operating system embedded in these requirements. However, there have been many MBAC devices needs to address the heterogeneity, longevity, algorithms proposed, often with no clear differentiation mobility and dynamism of the system. between them. This has motivated the need for a realis- The dissertation presents the architecture of an em- tic, implementation-based comparison in order to iden- bedded distributed operating system that lends itself tify an ideal MBAC algorithm. to safe context-driven adaptation. The operating sys- This dissertation reports on an implementation- tem is instrumented with four artifacts to address the based comparison of MBAC algorithms conducted challenges posed by a ubiquitous system. 1) An XML- using a purpose built test environment. The use of based directory service captures and notifies the appli- an implementation-based comparison has allowed the cations and services about changes in the device con- MBAC algorithms to be tested under realistic condi- text, as resources move, fail, leave or join the system, to tions of traffic load and realistic limitations on memory, allow context-driven adaptation. 2) A Java-based mo- computational resources and measurements. Alongside bile agent system allows new software to be injected in this comparison is a decomposition of a group of the system and moved and replicated with the changing MBAC algorithms, illustrating the relationship among characteristics of the system to define a self-organizing MBAC algorithm components, as well as highlighting system. 3) A subscribe/notify interface allows context- common elements among different MBAC algorithms. specific extensions to be dynamically added to the oper- The MBAC algorithm comparison reveals that, ating system to enable it to efficiently interoperate in its while no single algorithm is ideal, the specific resource current context according to application requirements. demands, such as computation overheads, can dramat- 4) Finally, a Dispatcher module serves as the context- ically impact on the MBAC algorithm’s performance. aware system call interface for the operating system; Further, due to the multiple timescales present in both when requested to invoke a service, the Dispatcher in- traffic and management, the estimator of a robust vokes the resource that best satisfies the requirements MBAC algorithm must base its estimate on measure- given the characteristics of the system. ments made over a wide range of timescales. Finally, a Definition alone is not sufficient to prove the va- reliable estimator must account for the error resulting lidity of an architecture. The dissertation therefore de- from random properties of measurements. scribes a prototype implementation of the operating Further identifying that the estimator components system and presents both a quantitative comparison of used in MBAC algorithms need not be tied to the ad- its performance with related systems and its qualitative mission control problem, one of the estimators (orig- merit by describing new applications made possible by inally constructed as part of an MBAC algorithm) its novel architecture. is used to continuously characterise resource require- ments for a number of classes of traffic. Continuous UCAM-CL-TR-528 characterisation of traffic, whether requiring similar or orthogonal resources, leads to the construction and Andrew William Moore:

121 demonstration of a network switch that is able to pro- subcategorisation frames SCFs of a given predicate. vide differentiated service while being adaptive to the Acquisition of subcategorization lexicons from textual demands of each traffic class. The dynamic allocation corpora has recently become increasingly popular. Al- of resources is an approach unique to a measurement- though this work has met with some success, result- based technique that would not be possible if resources ing lexicons indicate a need for greater accuracy. One were based upon static declarations of requirement. significant source of error lies in the statistical filtering used for hypothesis selection, i.e. for removing noise UCAM-CL-TR-529 from automatically acquired SCFs. This thesis builds on earlier work in verbal sub- Neil Johnson: categorization acquisition, taking as a starting point the problem with statistical filtering. Our investigation The triVM intermediate language shows that statistical filters tend to work poorly be- cause not only is the underlying distribution zipfian, reference manual but there is also very little correlation between condi- February 2002, 83 pages, PDF tional distribution of SCFs specific to a verb and uncon- This research was sponsored by a grant from ARM ditional distribution regardless of the verb. More accu- Limited. rate back-off estimates are needed for SCF acquisition than those provided by unconditional distribution. Abstract: The triVM intermediate language has been We explore whether more accurate estimates could developed as part of a research programme concen- be obtained by basing them on linguistic verb classes. trating on code space optimization. The primary aim Experiments are reported which show that in terms in developing triVM is to provide a language that re- of SCF distributions, individual verbs correlate more moves the complexity of high-level languages, such as closely with syntactically similar verbs and even more C or ML, while maintaining sufficient detail, at as sim- closely with semantically similar verbs, than with all ple a level as possible, to support reseach and experi- verbs in general. On the basis of this result, we suggest mentation into code size optimization. The basic struc- classifying verbs according to their semantic classes and ture of triVM is a notional Static Single Assignment- obtaining back-off estimates specific to these classes. based three-address machine. A secondary aim is to We propose a method for obtaining such semanti- develop an intermediate language that supports graph- cally based back-off estimates, and a novel approach based translation, using graph rewrite rules, in a tex- to hypothesis selection which makes use of these es- tual, human-readable format. Experience has shown timates. This approach involves automatically identi- that text-format intermediate files are much easier to fying the semantic class of a predicate, using subcate- use for experimentation, while the penalty in translat- gorization acquisition machinery to hypothesise condi- ing this human-readable form to the internal data struc- tional SCF distribution for the predicate, smoothing the tures used by the software is negligible. Another aim is conditional distribution with the back-off estimates of to provide a flexible language in which features and in- the respective semantic verb class, and employing a sim- novations can be evaluated; for example, this is one of ple method for filtering, which uses a threshold on the the first intermediate languages directly based on the estimates from smoothing. Adopting Briscoe and Car- Static Single Assignment technique, and which explic- roll’s (1997) system as a framework, we demonstrate itly exposes the condition codes as a result of arithmetic that this semantically-driven approach to hypothesis se- operations. While this paper is concerned solely with lection can significantly improve the accuracy of large- the description of triVM, we present a brief summary scale subcategorization acquisition. of other research-orientated intermediate languages. UCAM-CL-TR-531 UCAM-CL-TR-530 Giampaolo Bella, Fabio Massacci, Anna Korhonen: Lawrence C. Paulson: Subcategorization acquisition Verifying the SET registration February 2002, 189 pages, PDF protocols PhD thesis (Trinity Hall, September 2001) March 2002, 24 pages, PDF Abstract: Manual development of large subcategorised lexicons has proved difficult because predicates change Abstract: SET (Secure Electronic Transaction) is an im- behaviour between sublanguages, domains and over mense e-commerce protocol designed to improve the se- time. Yet access to a comprehensive subcategorization curity of credit card purchases. In this paper we focus lexicon is vital for successful parsing capable of re- on the initial bootstrapping phases of SET, whose ob- covering predicate-argument relations, and probabilis- jective is the registration of customers and merchants tic parsers would greatly benefit from accurate infor- with a SET certification authority. The aim of registra- mation concerning the relative likelihood of different tion is twofold: getting the approval of the cardholder’s

122 or merchant’s bank, and replacing traditional credit thirdly, that these improvements can correspond to in- card numbers with electronic credentials that customers creased network performance as viewed by the user; can present to the merchant, so that their privacy is pro- and finally, that not only the resulting deployment but tected. These registration sub-protocols present a num- also the deployment process itself are feasible. ber of challenges to current formal verification meth- ods. First, they do not assume that each agent knows UCAM-CL-TR-533 the public keys of the other agents. Key distribution is one of the protocols’ tasks. Second, SET uses com- Aline Villavicencio: plex encryption primitives (digital envelopes) which in- troduce dependency chains: the loss of one secret key The acquisition of a unification-based can lead to potentially unlimited losses. Building upon our previous work, we have been able to model and generalised categorial grammar formally verify SET’s registration with the inductive April 2002, 223 pages, PDF method in Isabelle/HOL solving its challenges with very PhD thesis (Hughes Hall, September 2001) general techniques. Abstract: The purpose of this work is to investigate UCAM-CL-TR-532 the process of grammatical acquisition from data. In order to do that, a computational learning system is Richard Mortier: used, composed of a Universal Grammar with associ- ated parameters, and a learning algorithm, following Internet traffic engineering the Principles and Parameters Theory. The Universal April 2002, 129 pages, PDF Grammar is implemented as a Unification-Based Gen- PhD thesis (Churchill College, October 2001) eralised Categorial Grammar, embedded in a default inheritance network of lexical types. The learning al- Abstract: Due to the dramatically increasing popularity gorithm receives input from a corpus of spontaneous of the services provided over the public Internet, prob- child-directed transcribed speech annotated with logi- lems with current mechanisms for control and manage- cal forms and sets the parameters based on this input. ment of the Internet are becoming apparent. In particu- This framework is used as a basis to investigate sev- lar, it is increasingly clear that the Internet and other eral aspects of language acquisition. In this thesis I con- networks built on the Internet protocol suite do not centrate on the acquisition of subcategorisation frames provide sufficient support for the efficient control and and word order information, from data. The data to management of traffic, i.e. for Traffic Engineering. which the learner is exposed can be noisy and ambigu- This dissertation addresses the problem of traf- ous, and I investigate how these factors affect the learn- fic engineering in the Internet. It argues that traffic ing process. The results obtained show a robust learner management techniques should be applied at multiple converging towards the target grammar given the in- timescales, and not just at data timescales as is currently put data available. They also show how the amount the case. It presents and evaluates mechanisms for traf- of noise present in the input data affects the speed of fic engineering in the Internet at two further timescales: convergence of the learner towards the target grammar. flow admission control and control of per-flow packet Future work is suggested for investigating the develop- marking, enabling control timescale traffic engineering; mental stages of language acquisition as predicted by and support for load based inter-domain routeing in the learning model, with a thorough comparison with the Internet, enabling management timescale traffic en- the developmental stages of a child. This is primarily gineering. a cognitive computational model of language learning This dissertation also discusses suitable policies for that can be used to investigate and gain a better under- the application of the proposed mechanisms. It argues standing of human language acquisition, and can po- that the proposed mechanisms are able to support a tentially be relevant to the development of more adap- wide range of policies useful to both users and oper- tive NLP technology. ators. Finally, in a network of the size of the Internet consideration must also be given to the deployment of UCAM-CL-TR-534 proposed solutions. Consequently, arguments for and against the deployment of these mechanisms are pre- Austin Donnelly: sented and the conclusion drawn that there are a num- ber of feasible paths toward deployment. Resource control in network elements The work presented argues the following: firstly, it is April 2002, 183 pages, PDF possible to implement mechanisms within the Internet PhD thesis (Pembroke College, January 2002) framework that enable traffic engineering to be carried out by operators; secondly, that applying these mecha- nisms with suitable policies can ease the management problems faced by operators and at the same time im- prove the efficiency with which the network can be run;

123 Abstract: Increasingly, substantial data path processing The objects of Ludics which correspond to proofs is happening on devices within the network. At or near are designs. A design can be described as the skeleton the edges of the network, data rates are low enough of a sequent calculus derivation, where we do not ma- that commodity workstations may be used to process nipulate formulas, but their location (the address where packet flows. However, the operating systems such ma- the formula is stored). To study the traces of the in- chines use are not suited to the needs of data-driven teractions between designs as primitive leads to an al- processing. This dissertation shows why this is a prob- ternative presentation, which is to describe a design as lem, how current work fails to address it, and proposes the set of its possible interactions, called disputes. This a new approach. presentation has the advantage to make precise the cor- The principal problem is that crosstalk occurs in the respondence between the basic notions of Ludics (de- processing of different data flows when they contend signs, disputes and chronicles) and the basic notions of for a shared resource and their accesses to this resource Games semantics (strategies, plays and views). are not scheduled appropriately; typically the shared re- source is located in a server process. Previous work on UCAM-CL-TR-536 vertically structured operating systems reduces the need for such shared servers by making applications respon- Sergei Skorobogatov: sible for performing as much of their own processing as possible, protecting and multiplexing devices at the Low temperature data remanence in lowest level consistent with allowing untrusted user ac- cess. static RAM However, shared servers remain on the data path June 2002, 9 pages, PDF in two circumstances: firstly, dumb network adaptors need non-trivial processing to allow safe access by un- Abstract: Security processors typically store secret key trusted user applications. Secondly, shared servers are material in static RAM, from which power is removed needed wherever trusted code must be executed for se- if the device is tampered with. It is commonly believed curity reasons. that, at temperatures below −20 ◦C, the contents of This dissertation presents the design and implemen- SRAM can be ‘frozen’; therefore, many devices treat tation of Expert, an operating system which avoids temperatures below this threshold as tampering events. crosstalk by removing the need for such servers. We have done some experiments to establish the tem- This dissertation describes how Expert handles perature dependency of data retention time in modern dumb network adaptors to enable applications to ac- SRAM devices. Our experiments show that the conven- cess them via a low-level interface which is cheap to im- tional wisdom no longer holds. plement in the kernel, and retains application responsi- bility for the work involved in running a network stack. Expert further reduces the need for application- UCAM-CL-TR-537 level shared servers by introducing paths which can trap into protected modules of code to perform actions Mantsika Matooane: which would otherwise have to be implemented within a server. Parallel systems in symbolic and Expert allows traditional compute-bound tasks to algebraic computation be freely mixed with these I/O-driven paths in a single system, and schedules them in a unified manner. This June 2002, 139 pages, PDF allows the processing performed in a network element PhD thesis (Trinity College, August 2001) to be resource controlled, both for background process- ing tasks such as statistics gathering, and for data path Abstract: This report describes techniques to exploit processing such as encryption. distributed memory massively parallel supercomputers to satisfy the peak memory demands of some very large UCAM-CL-TR-535 computer algebra problems (over 10 GB). The mem- ory balancing is based on a randomized hashing algo- Claudia Faggian, Martin Hyland: rithm for dynamic data distribution. Fine grained par- titioning is used to provide flexibility in the memory Designs, disputes and strategies allocation, at the cost of higher communication cost. The main problem areas are multivariate polynomial May 2002, 21 pages, PDF algebra, and linear algebra with polynomial matrices. The system was implemented and tested on a Hitachi Abstract: Important progresses in logic are leading to SR2201 supercomputer. interactive and dynamical models. Geometry of Inter- action and Games Semantics are two major examples. Ludics, initiated by Girard, is a further step in this di- rection.

124 UCAM-CL-TR-538 UCAM-CL-TR-541 Mark Ashdown, Peter Robinson: L. Barthe, N.A. Dodgson, M.A. Sabin, The Escritoire: A personal projected B. Wyvill, V. Gaildrat: display for interacting with Different applications of documents two-dimensional potential fields for June 2002, 12 pages, PDF volume modeling Abstract: The Escritoire is a horizontal desk interface that uses two projectors to create a foveal display. Items August 2002, 26 pages, PDF such as images, documents, and the interactive displays of other conventional computers, can be manipulated Abstract: Current methods for building models using on the desk using pens in both hands. The periphery implicit volume techniques present problems defining covers the desk, providing ample space for laying out accurate and controllable blend shapes between im- the objects relevant to a task, allowing them to be iden- plicit primitives. We present new methods to extend the tified at a glance and exploiting human spatial memory freedom and controllability of implicit volume model- for rapid retrieval. The fovea is a high resolution focal ing. The main idea is to use a free-form curve to define area that can be used to view any item in detail. The the profile of the blend region between implicit primi- projected images are continuously warped with com- tives. modity graphics hardware before display, to reverse the The use of a free-form implicit curve, controlled effects of misaligned projectors and ensure registration point-by-point in the Euclidean user space, allows us to between fovea and periphery. The software is divided group boolean composition operators with sharp tran- into a hardware-specific client driving the display, and sitions or smooth free-form transitions in a single mod- a platform-independent server imposing control. eling metaphor. This idea is generalized for the creation, sculpting and manipulation of volume objects, while UCAM-CL-TR-539 providing the user with simplicity, controllability and freedom in volume modeling. N.A. Dodgson, M.A. Sabin, L. Barthe, Bounded volume objects, known as “Soft objects” M.F. Hassan: or “Metaballs”, have specific properties. We also present binary Boolean composition operators that Towards a ternary interpolating gives more control on the form of the transition when subdivision scheme for the triangular these objects are blended. To finish, we show how our free-form implicit mesh curves can be used to build implicit sweep objects. July 2002, 12 pages, PDF UCAM-CL-TR-542 Abstract: We derive a ternary interpolating subdivision scheme which works on the regular triangular mesh. It has quadratic precision and fulfils the standard neces- I.P. Ivrissimtzis, N.A. Dodgson, M.A. Sabin: sary conditions for C2 continuity. Further analysis is A generative classification of required to determine its actual continuity class and to define its behaviour around extraordinary points. mesh refinement rules with lattice transformations UCAM-CL-TR-540 N.A. Dodgson, J.R. Moore: September 2002, 13 pages, PDF An updated, improved version of this report The use of computer graphics has been published in Computer Aided Geometric Design 22(1):99–109, January 2004 rendering software in the analysis of a [doi:10.1016/j.cagd.2003.08.001]. The classification novel autostereoscopic display design scheme is slightly different in the CAGD version. Please refer to the CAGD version in any work which August 2002, 6 pages, PDF you produce. Abstract: Computer graphics ‘ray tracing’ software has been used in the design and evaluation of a new au- Abstract: We give a classification of the subdivision re- tostereoscopic 3D display. This software complements finement rules using sequences of similar lattices. Our the conventional optical design software and provides work expands and unifies recent results in the classifi- a cost-effective method of simulating what is actually cation of primal triangular subdivision [Alexa, 2001], seen by a viewer of the display. It may prove a useful and results on the refinement of quadrilateral lattices tool in similar design problems. [Sloan, 1994, 1989]. In the examples we concentrate on the cases with low ratio of similarity and find new

125 univariate and bivariate refinement rules with the low- user already has some idea of the type of image she is est possible such ratio, showing that this very low ratio looking for. usually comes at the expense of symmetry. Images are used in many different application do- mains; the ones we chose to study were stock photog- UCAM-CL-TR-543 raphy and personal photography. We investigated the organisation and browsing of personal photographs in Kerry Rodden: some depth, because of the inevitable future growth in usage of digital cameras, and a lack of previous re- Evaluating similarity-based search in this area. visualisations as interfaces for UCAM-CL-TR-544 image browsing September 2002, 248 pages, PDF I.P. Ivrissimtzis, M.A. Sabin, N.A. Dodgson: PhD thesis (Newnham College, 11 October 2001) On the support of recursive

Abstract: Large collections of digital images are becom- subdivision ing more and more common, and the users of these September 2002, 20 pages, PDF collections need computer-based systems to help them An updated, improved version of this report has been find the images they require. Digital images are easy to published in ACM Trans. Graphics 23(4):1043–1060, shrink to thumbnail size, allowing a large number of October 2004 [doi:10.1145/1027411.1027417] them to be presented to the user simultaneously. Gener- ally, current image browsing interfaces display thumb- Abstract: We study the support of subdivision schemes, nails in a two-dimensional grid, in some default order, that is, the area of the subdivision surface that will be and there has been little exploration of possible alter- affected by the displacement of a single control point. natives to this model. Our main results cover the regular case, where the mesh With textual document collections, information vi- induces a regular Euclidean tessellation of the param- sualisation techniques have been used to produce repre- eter space. If n is the ratio of similarity between the sentations where the documents appear to be clustered tessellation at step k and step k−1 of the subdivision, according to their mutual similarity, which is based on we show that this number determines if the support is the words they have in common. The same techniques polygonal or fractal. In particular if n=2, as it is in the can be applied to images, to arrange a set of thumb- most schemes, the support is a polygon whose vertices nails according to a defined measure of similarity. In can be easily determined. If n is not equal to two as, many collections, the images are manually annotated for example, in the square root of three scheme, the with descriptive text, allowing their similarity to be support is usually fractal and on its boundary we can measured in an analogous way to textual documents. identify sets like the classic ternary Cantor set. Alternatively, research in content-based image retrieval has made it possible to measure similarity based on low-level visual features, such as colour. UCAM-CL-TR-545 The primary goal of this research was to inves- tigate the usefulness of such similarity-based visuali- Anthony C.J. Fox: sations as interfaces for image browsing. We concen- trated on visual similarity, because it is applicable to A HOL specification of the any image collection, regardless of the availability of ARM instruction set architecture annotations. Initially, we used conventional informa- tion retrieval evaluation methods to compare the rel- June 2001, 45 pages, PDF ative performance of a number of different visual sim- ilarity measures, both for retrieval and for creating vi- Abstract: This report gives details of a HOL specifica- sualisations. tion of the ARM instruction set architecture. It is shown Thereafter, our approach to evaluation was influ- that the HOL proof tool provides a suitable environ- enced more by human-computer interaction: we car- ment in which to model the architecture. The specifica- ried out a series of user experiments where arrange- tion is used to execute fragments of ARM code gener- ments based on visual similarity were compared to ran- ated by an assembler. The specification is based primar- dom arrangements, for different image browsing tasks. ily around the third version of the ARM architecture, These included finding a given target image, finding a and the intent is to provide a target semantics for fu- group of images matching a generic requirement, and ture microprocessor verifications. choosing subjectively suitable images for a particular purpose (from a shortlisted set). As expected, we found that similarity-based arrangements are generally more helpful than random arrangements, especially when the

126 UCAM-CL-TR-546 This algorithm manipulates the edges of an object (at the expense of positional accuracy) to enforce consis- Jonathan David Pfautz: tent size, shape and disparity. In a time-to-contact task using only stereo and perspective depth cues, velocity Depth perception in computer was judged more accurately using this method. A sec- graphics ond method manipulated the location and orientation of the viewpoint to maximise the number of samples of September 2002, 182 pages, PDF perspective and stereo depth in a scene. This algorithm PhD thesis (Trinity College, May 2000) was tested in a simulated air traffic control task. The experiment demonstrated that knowledge about where Abstract: With advances in computing and visual dis- the viewpoint is located dominates any benefit gained play technology, the interface between man and ma- in reducing sampling artefacts. chine has become increasingly complex. The usabil- This dissertation provides valuable information for ity of a modern interactive system depends on the de- the visual display designer in the form of task-specific sign of the visual display. This dissertation aims to im- experimental results and computationally inexpensive prove the design process by examining the relation- methods for reducing the effects of sampling. ship between human perception of depth and three- dimensional computer-generated imagery (3D CGI). UCAM-CL-TR-547 Depth is perceived when the human visual sys- tem combines various different sources of informa- Agathoniki Trigoni: tion about a scene. In Computer Graphics, linear per- spective is a common depth cue, and systems utilis- Semantic optimization of OQL ing binocular disparity cues are of increasing interest. queries When these cues are inaccurately and inconsistently presented, the effectiveness of a display will be limited. October 2002, 171 pages, PDF Images generated with computers are sampled, mean- PhD thesis (Pembroke College, October 2001) ing they are discrete in both time and space. This thesis describes the sampling artefacts that occur in 3D CGI Abstract: This work explores all the phases of devel- and their effects on the perception of depth. Tradition- oping a query processor for OQL, the Object Query ally, sampling artefacts are treated as a Signal Process- Language proposed by the Object Data Management ing problem. The approach here is to evaluate artefacts Group (ODMG 3.0). There has been a lot of research using Human Factors and Ergonomics methodology; on the execution of relational queries and their opti- sampling artefacts are assessed via performance on rel- mization using syntactic or semantic transformations. evant visual tasks. However, there is no context that has integrated and A series of formal and informal experiments were tested all the phases of processing an object query performed on human subjects to evaluate the effects of language, including the use of semantic optimization spatial and temporal sampling on the presentation of heuristics. This research is motivated by the need for depth in CGI. In static images with perspective infor- query execution tools that combine two valuable prop- mation, the relative size of an object can be inconsis- erties: i) the expressive power to encompass all the fea- tently presented across depth. This inconsistency pre- tures of the object-oriented paradigm and ii) the flexi- vented subjects from making accurate relative depth bility to benefit from the experience gained with rela- judgements. In moving images, these distortions were tional systems, such as the use of semantic knowledge most visible when the object was moving slowly, pixel to speed up query execution. size was large, the object was located close to the line The contribution of this work is twofold. First, it of sight and/or the object was located a large virtual establishes a rigorous basis for OQL by defining a type distance from the viewer. When stereo images are pre- inference model for OQL queries and proposing a com- sented with perspective cues, the sampling artefacts plete framework for their translation into calculus and found in each cue interact. Inconsistencies in both size algebraic representations. Second, in order to enhance and disparity can occur as the result of spatial and tem- query execution it provides algorithms for applying two poral sampling. As a result, disparity can vary inconsis- semantic optimization heuristics: constraint introduc- tently across an object. Subjects judged relative depth tion and constraint elimination techniques. By taking less accurately when these inconsistencies were present. into consideration a set of association rules with excep- An experiment demonstrated that stereo cues domi- tions, it is possible to add or remove predicates from nated in conflict situations for static images. In moving an OQL query, thus transforming it to a more efficient imagery, the number of samples in stereo cues is lim- form. ited. Perspective information dominated the perception We have implemented this framework, which en- of depth for unambiguous (i.e., constant in direction ables us to measure the benefits and the cost of ex- and velocity) movement. ploiting semantic knowledge during query execution. Based on the experimental results, a novel method The experiments showed significant benefits, especially was developed that ensures the size, shape and dispar- in the application of the constraint introduction tech- ity of an object are consistent as it moves in depth. nique. In contexts where queries are optimized once

127 and are then executed repeatedly, we can ignore the Abstract: Computer security as a technical matter is cost of optimization, and it is always worth carrying complex, and opaque for those who are not them- out the proposed transformation. In the context of ad- selves computer professionals but who encounter, or hoc queries the cost of the optimization becomes an im- are ultimately responsible for, computer systems. This portant consideration. We have developed heuristics to paper presents the essentials of computer security in estimate the cost as well as the benefits of optimization. non-technical terms, with the aim of helping people af- The optimizer will carry out a semantic transformation fected by computer systems to understand what secu- only when the overhead is less than the expected ben- rity is about and to withstand the blinding with science efit. Thus transformations are performed safely even mantras that too often obscure the real issues. with adhoc queries. The framework can often speed up the execution of an OQL query to a considerable ex- UCAM-CL-TR-551 tent. Lawrence C. Paulson: UCAM-CL-TR-548 The relative consistency of the axiom Anthony Fox: of choice — Formal verification of the ARM6 mechanized using Isabelle/ZF micro-architecture December 2002, 63 pages, PDF November 2002, 59 pages, PDF Abstract: The proof of the relative consistency of the Abstract: This report describes the formal verification axiom of choice has been mechanized using Isabelle/ZF. of the ARM6 micro-architecture using the HOL the- The proof builds upon a previous mechanization of the orem prover. The correctness of the microprocessor reflection theorem. The heavy reliance on metatheory design compares the micro-architecture with an ab- in the original proof makes the formalization unusu- stract, target instruction set semantics. Data and tem- ally long, and not entirely satisfactory: two parts of poral abstraction maps are used to formally relate the the proof do not fit together. It seems impossible to state spaces and to capture the timing behaviour of solve these problems without formalizing the metathe- the processor. The verification is carried out in HOL ory. However, the present development follows a stan- and one-step theorems are used to provide the frame- dard textbook, Kunen’s “Set Theory”, and could sup- work for the proof of correctness. This report also de- port the formalization of further material from that scribes the formal specification of the ARM6’s three book. It also serves as an example of what to expect stage pipelined micro-architecture. when deep mathematics is formalized.

UCAM-CL-TR-549 UCAM-CL-TR-552 Ross Anderson: Keir A. Fraser, Steven M. Hand, Two remarks on public key Timothy L. Harris, Ian M. Leslie, cryptology Ian A. Pratt: December 2002, 7 pages, PDF The Xenoserver computing

Abstract: In some talks I gave in 1997-98, I put forward infrastructure two observations on public-key cryptology, concerning January 2003, 11 pages, PDF forward-secure signatures and compatible weak keys. I did not publish a paper on either of them as they ap- Abstract: The XenoServer project will build a public peared to be rather minor footnotes to public key cryp- infrastructure for wide-area distributed computing. We tology. But the work has occasionally been cited, and envisage a world in which XenoServer execution plat- I’ve been asked to write a permanent record. forms will be scattered across the globe and available for any member of the public to submit code for exe- UCAM-CL-TR-550 cution. Crucially, the code’s sponsor will be billed for all the resources used or reserved during its execution. Karen Sparck¨ Jones: This will encourage load balancing, limit congestion, Computer security – and make the platform self-financing. Such a global infrastructure is essential to address a layperson’s guide, from the the fundamental problem of communication latency. By bottom up enabling principals to run programs at points through- out the network they can ensure that their code exe- June 2002, 23 pages, PDF cutes close to the entities with which it interacts. As

128 well as reducing latency this can be used to avoid net- Abstract: It is often claimed that Internet Traffic pat- work bottlenecks, to reduce long-haul network charges terns are interesting because the Internet puts few con- and to provide a network presence for transiently- straints on sources. This leads to innovation. It also connected mobile devices. makes the study of Internet traffic, what we might cal This project will build and deploy a global the search for the Internet Erlang, very difficult. At the XenoServer test-bed and make it available to authen- same time, traffic control (congestion control) and en- ticated external users; initially members of the scientific gineering are both hot topics. community and ultimately of the general public. In this What if “flash crowds” (a.k.a. slashdot), cascades, environment accurate resource accounting and pricing epidemics and so on are the norm? What if the trend is critical – whether in an actual currency or one that continues for network link capacity to become flatter, is fictitious. As with our existing work on OS resource with more equal capacity in the access and core, or management, pricing provides the feedback necessary even more capacity in the access than the core (as in for applications that can adapt, and prevents over-use the early 1980s with 10Mbps LANs versus Kbps links by applications that cannot. in the ARPANET)? How could we cope? This is a paper about the use of field equations (e.g. UCAM-CL-TR-553 gravitational, electrical, magnetic, strong and weak atomic and so forth) as a future model for managing Paul R. Barham, Boris Dragovic, network traffic. We believe that in the future, one could Keir A. Fraser, Steven M. Hand, move from this model to a very general prescriptive technique for designing network control on different Timothy L. Harris, Alex C. Ho, timescales, including traffic engineering and the set of Evangelos Kotsovinos, admission and congestion control laws. We also specu- Anil V.S. Madhavapeddy, Rolf Neugebauer, late about the use of the same idea in wireless networks. Ian A. Pratt, Andrew K. Warfield: UCAM-CL-TR-555 Xen 2002 January 2003, 15 pages, PDF Jon Crowcroft, Richard Gibbens, Stephen Hailes: Abstract: This report describes the design of Xen, the hypervisor developed as part of the XenoServer wide- BOURSE – Broadband Organisation area computing project. Xen enables the hardware re- of Unregulated Radio Systems sources of a machine to be virtualized and dynamically partitioned such as to allow multiple different ‘guest’ through Economics operating system images to be run simultaneously. January 2003, 10 pages, PDF Virtualizing the machine in this manner provides flexibility, allowing different users to choose their pre- Abstract: This is a technical report about an idea for re- ferred operating system (Windows, Linux, NetBSD), search in the intersection of active nets, cognitive radio and also enables use of the platform as a testbed for and power laws of network topologies. operating systems research. Furthermore, Xen provides secure partitioning between these ‘domains’, and en- UCAM-CL-TR-556 ables better resource accounting and QoS isolation than can be achieved within a conventional operating sys- tem. We show these benefits can be achieved at negligi- Jon Crowcroft: ble performance cost. Turing Switches – Turing machines We outline the design of Xen’s main sub-systems, and the interface exported to guest operating systems. for all-optical Internet routing Initial performance results are presented for our most mature guest operating system port, Linux 2.4. This re- January 2003, 7 pages, PDF port covers the initial design of Xen, leading up to our Abstract: This is technical report outlining an idea for first public release which we plan to make available for basic long term research into the architectures for pro- download in April 2003. Further reports will update grammable all-optical Internet routers. the design as our work progresses and present the im- We are revisiting some of the fundamental tenets of plementation in more detail. computer science to carry out this work, and so it is necessarily highly speculative. UCAM-CL-TR-554 Currently, the processing elements in all-electronic routers are typically fairly conventional von-Neumann Jon Crowcroft: architecture computers with processors that have large, Towards a field theory for networks complex instruction sets (even RISC is relatively com- plex compared with the actual requirements for packet January 2003, 9 pages, PDF processing) and Random Access Memory.

129 As the need for speed increases, first this architec- The basis of access control policy in this frame- ture, and then the classical computing hardware com- work is formulated around a semantic construct of a ponents, and finally, electronics cease to be able to keep role. Roles are granted permissions according to the up. job functions that exist in an organisation, and then At this time, optical device technology is making users are assigned to roles on basis of their specific great strides, and we see the availability of gates, as job responsibilities. In order to ensure that permissions well as a plethora of invention in providing buffering included in the roles are used by users only for pur- mechanisms. poses corresponding to the organisation’s present busi- However, a critical problem we foresee is the abil- ness needs, a novel approach of “active” context-based ity to re-program devices for different packet pro- access control is proposed. The usage of role permis- cessing functions such as classification and scheduling. sions in this approach is controlled according to the This proposal is aimed at researching one direction for emerging context associated with progress of various adding optical domain programmability. tasks in the organisation. The work explores formally the security properties UCAM-CL-TR-557 of the established model, in particular, support for sepa- ration of duty and least privilege principles that are im- G.M. Bierman, P. Sewell: portant requirements in many commercial systems. Re- sults have implications for understanding different vari- Iota: A concurrent XML scripting ations of separation of duty policy that are currently used in the role-based access control. language with applications to Finally, a design architecture of the defined secu- Home Area Networking rity model is presented detailing the components and processing phases required for successful application of January 2003, 32 pages, PDF the model to distributed computer environments. The model provides opportunities for the implementers, Abstract: Iota is a small and simple concurrent lan- based on application requirements, to choose between guage that provides native support for functional XML several alternative design approaches. computation and for typed channel-based communica- tion. It has been designed as a domain-specific language UCAM-CL-TR-559 to express device behaviour within the context of Home Area Networking. Eiko Yoneki, Jean Bacon: In this paper we describe Iota, explaining its novel treatment of XML and describing its type system and Pronto: MobileGateway with operational semantics. We give a number of examples including Iota code to program Universal Plug ’n’ Play publish-subscribe paradigm over (UPnP) devices. wireless network

UCAM-CL-TR-558 February 2003, 22 pages, PDF

Abstract: This paper presents the design, implementa- Yolanta Beresnevichiene: tion, and evaluation of Pronto, a middleware system for A role and context based security mobile applications with messaging as a basis. It pro- vides a solution for mobile application specific prob- model lems such as resource constraints, network character- istics, and data optimization. Pronto consists of three January 2003, 89 pages, PDF main functions: 1) MobileJMS Client, a lightweight PhD thesis (Wolfson College, June 2000) client of Message Oriented Middleware (MOM) based on Java Message Service (JMS), 2) Gateway for reli- Abstract: Security requirements approached at the en- able and efficient transmission between mobile devices terprise level initiate the need for models that capture and a server with pluggable components, and 3) Server- the organisational and distributed aspects of informa- less JMS based on IP multicast. The publish-subscribe tion usage. Such models have to express organisation- paradigm is ideal for mobile applications, as mobile de- specific security policies and internal controls aiming vices are commonly used for data collection under con- to protect information against unauthorised access and ditions of frequent disconnection and changing num- modification, and against usage of information for un- bers of recipients. This paradigm provides greater flexi- intended purposes. This technical report describes a bility due to the decoupling of publisher and subscriber. systematic approach to modelling the security require- Adding a gateway as a message hub to transmit infor- ments from the perspective of job functions and tasks mation in real-time or with store-and-forward messag- performed in an organisation. It deals with the design, ing provides powerful optimization and data transfor- analysis, and management of security abstractions and mation. Caching is an essential function of the gate- mechanisms in a unified framework. way, and SmartCaching is designed for generic caching

130 in an N-tier architecture. Serverless JMS aims at a de- consuming more than its fair share of the available sys- centralized messaging model, which supports an ad-hoc tem resources. network, as well as creating a high-speed messaging The computing resources consumed by end-users on . Pronto is an intelligent MobileGateway, provid- programmable nodes within a network are not free, ing a useful MOM intermediary between a server and and must ultimately be paid for in some way. Pro- mobile devices over a wireless network. grammable networks allow users substantially greater complexity in the way that they may consume net- UCAM-CL-TR-560 work resources. This dissertation argues that, due to this complexity, it is essential to be able control and ac- Mike Bond, Piotr Zielinski:´ count for the resources used by untrusted user-supplied code if such technology is to be deployed effectively in Decimalisation table attacks for a wide-area open environment. The Resource Controlled Active Node Environment PIN cracking (RCANE) is presented to facilitate the control of un- February 2003, 14 pages, PDF trusted code. RCANE supports the allocation, schedul- ing and accounting of the resources available on a node, including CPU and network I/O scheduling, memory al- Abstract: We present an attack on hardware security location, and garbage collection overhead. modules used by retail banks for the secure storage and verification of customer PINs in ATM (cash machine) infrastructures. By using adaptive decimalisation tables UCAM-CL-TR-562 and guesses, the maximum amount of information is learnt about the true PIN upon each guess. It takes an Carsten Moenning, Neil A. Dodgson: average of 15 guesses to determine a four digit PIN us- ing this technique, instead of the 5000 guesses intended. Fast Marching farthest point In a single 30 minute lunch-break, an attacker can thus sampling discover approximately 7000 PINs rather than 24 with the brute force method. With a £300 withdrawal limit April 2003, 16 pages, PDF per card, the potential bounty is raised from £7200 to £2.1 million and a single motivated attacker could Abstract: Using Fast Marching for the incremental withdraw £30–50 thousand of this each day. This at- computation of distance maps across the sampling do- tack thus presents a serious threat to bank security. main, we obtain an efficient farthest point sampling technique (FastFPS). The method is based on that of UCAM-CL-TR-561 Eldar et al. (1992, 1997) but extends more naturally to the case of non-uniform sampling and is more widely Paul B. Menage: applicable. Furthermore, it can be applied to both planar domains and curved manifolds and allows for Resource control of untrusted code in weighted domains in which different cost is associated with different points on the surface. We conclude with an open network environment considering the extension of FastFPS to the sampling of March 2003, 185 pages, PDF point clouds without the need for prior surface recon- PhD thesis (Magdalene College, June 2000) struction.

Abstract: Current research into Active Networks, Open UCAM-CL-TR-563 Signalling and other forms of mobile code have made use of the ability to execute user-supplied code at lo- G.M. Bierman, M.J. Parkinson, A.M. Pitts: cations within the network infrastructure, in order to avoid the inherent latency associated with wide area MJ: An imperative core calculus for networks or to avoid sending excessive amounts of data Java and Java with effects across bottleneck links or nodes. Existing research has addressed the design and evaluation of programming April 2003, 53 pages, PDF environments, and testbeds have been implemented on traditional operating systems. Such work has deferred Abstract: In order to study rigorously object-oriented issues regarding resource control; this has been reason- languages such as Java or C#, a common practice is to able, since this research has been conducted in a closed define lightweight fragments, or calculi, which are suf- environment. ficiently small to facilitate formal proofs of key prop- In an open environment, which is required for erties. However many of the current proposals for cal- widespread deployment of such technologies, the code culi lack important language features. In this paper we supplied to the network nodes may not be from a propose Middleweight Java, MJ, as a contender for a trusted source. Thus, it cannot be assumed that such minimal imperative core calculus for Java. Whilst com- code will behave non-maliciously, nor that it will avoid pact, MJ models features such as object identity, field

131 assignment, constructor methods and block structure. describe both the mapping configuration when the tar- We define the syntax, type system and operational se- get is instantiated and the mapping process at invoca- mantics of MJ, and give a proof of type safety. In order tion time. A proof of concept implementation, which to demonstrate the usefulness of MJ to reason about contains a number of technical improvements over ear- operational features, we consider a recent proposal of lier attempts to solve this problem, shows that this ap- Greenhouse and Boyland to extend Java with an effects proach is useable in practice, even for complex archi- system. This effects system is intended to delimit the tectures, such as CORBA and CORBASec (the security scope of computational effects within a Java program. services specified for CORBA). Finally, we examine the We define an extension of MJ with a similar effects sys- security approaches of several related middleware tech- tem and instrument the operational semantics. We then nologies that have emerged since the specification of prove the correctness of the effects system; a question CORBA and CORBASec, and show the applicability left open by Greenhouse and Boyland. We also consider of the resource descriptor mapping. the question of effect inference for our extended calcu- lus, detail an algorithm for inferring effects information UCAM-CL-TR-565 and give a proof of correctness. Carsten Moenning, Neil A. Dodgson: UCAM-CL-TR-564 Fast Marching farthest point Ulrich Lang: sampling for point clouds and Access policies for middleware implicit surfaces May 2003, 138 pages, PDF May 2003, 15 pages, PDF PhD thesis (Wolfson College, March 2003) Abstract: In a recent paper (Moenning and Dodgson, Abstract: This dissertation examines how the architec- 2003), the Fast Marching farthest point sampling strat- tural layering of middleware constrains the design of egy (FastFPS) for planar domains and curved mani- a middleware security architecture, and analyses the folds was introduced. The version of FastFPS for curved complications that arise from that. First, we define a manifolds discussed in the paper deals with surface do- precise notion of middleware that includes its architec- mains in triangulated form only. Due to a restriction ture and features. Our definition is based on the Com- of the underlying Fast Marching method, the algorithm mon Object Request Broker Architecture (CORBA), further requires the splitting of any obtuse into acute which is used throughout this dissertation both as a triangles to ensure the consistency of the Fast March- reference technology and as a basis for a proof of con- ing approximation. In this paper, we overcome these cept implementation. In several steps, we construct a restrictions by using Memoli and Sapiro’s (Memoli and security model that fits to the described middleware ar- Sapiro, 2001 and 2002) extension of the Fast Marching chitecture. The model facilitates conceptual reasoning method to the handling of implicit surfaces and point about security. The results of our analysis indicate that clouds. We find that the extended FastFPS algorithm the cryptographic identities available on the lower lay- can be applied to surfaces in implicit or point cloud ers of the security model are only of limited use for ex- form without the loss of the original algorithm’s com- pressing fine-grained security policies, because they are putational optimality and without the need for any pre- separated from the application layer entities by the mid- processing. dleware layer. To express individual application layer entities in access policies, additional more fine-grained UCAM-CL-TR-566 descriptors are required. To solve this problem for the target side (i.e., the receiving side of an invocation), we Joe Hurd: propose an improved middleware security model that supports individual access policies on a per-target ba- Formal verification of probabilistic sis. The model is based on so-called “resource descrip- algorithms tors”, which are used in addition to cryptographic iden- tities to describe application layer entities in access poli- May 2003, 154 pages, PDF cies. To be useful, descriptors need to fulfil a number PhD thesis (Trinity College, December 2001) of properties, such as local uniqueness and persistency. Next, we examine the information available at the mid- Abstract: This thesis shows how probabilistic algo- dleware layer for its usefulness as resource descriptors, rithms can be formally verified using a mechanical the- in particular the interface name and the instance infor- orem prover. mation inside the object reference. Unfortunately nei- We begin with an extensive foundational develop- ther fulfils all required properties. However, it is pos- ment of probability, creating a higher-order logic for- sible to obtain resource descriptors on the target side malization of mathematical measure theory. This al- through a mapping process that links target instance lows the definition of the probability space we use to information to an externally provided descriptor. We model a random bit generator, which informally is a

132 stream of coin-flips, or technically an infinite sequence UCAM-CL-TR-568 of IID Bernoulli(1/2) random variables. Probabilistic programs are modelled using the state- Gavin Bierman, Michael Hicks, Peter Sewell, transformer monad familiar from functional program- Gareth Stoyle, Keith Wansbrough: ming, where the random bit generator is passed around in the computation. Functions remove random bits Dynamic rebinding for marshalling from the generator to perform their calculation, and then pass back the changed random bit generator with and update, with destruct-time λ the result. February 2004, 85 pages, PDF Our probability space modelling the random bit generator allows us to give precise probabilistic spec- Abstract: Most programming languages adopt static ifications of such programs, and then verify them in the binding, but for distributed programming an exclusive theorem prover. reliance on static binding is too restrictive: dynamic We also develop technical support designed to ex- binding is required in various guises, for example when pedite verification: probabilistic quantifiers; a composi- a marshalled value is received from the network, con- tional property subsuming measurability and indepen- taining identifiers that must be rebound to local re- dence; a probabilistic while loop together with a formal sources. Typically it is provided only by ad-hoc mecha- concept of termination with probability 1. We also in- nisms that lack clean semantics. troduce a technique for reducing properties of a prob- In this paper we adopt a foundational approach, de- abilistic while loop to properties of programs that are veloping core dynamic rebinding mechanisms as exten- guaranteed to terminate: these can then be established sions to the simply-typed call-by-value λ-calculus. To using induction and standard methods of program cor- do so we must first explore refinements of the call- rectness. by-value reduction strategy that delay instantiation, to We demonstrate the formal framework with some ensure computations make use of the most recent ver- example probabilistic programs: sampling algorithms sions of rebound definitions. We introduce redex-time for four probability distributions; some optimal pro- and destruct-time strategies. The latter forms the ba- cedures for generating dice rolls from coin flips; the sis for a λ-marsh calculus that supports dynamic re- symmetric simple random walk. In addition, we ver- binding of marshalled values, while remaining as far ify the Miller-Rabin primality test, a well-known and as possible statically-typed. We sketch an extension of commercially used probabilistic algorithm. Our funda- λ-marsh with concurrency and communication, giving mental perspective allows us to define a version with examples showing how wrappers for encapsulating un- strong properties, which we can execute in the logic to trusted code can be expressed. Finally, we show that a prove compositeness of numbers. high-level semantics for dynamic updating can also be based on the destruct-time strategy, defining a λ-update UCAM-CL-TR-567 calculus with simple primitives to provide type-safe up- dating of running code. We thereby establish primitives Joe Hurd: and a common semantic foundation for a variety of real-world dynamic rebinding requirements. Using inequalities as term ordering constraints UCAM-CL-TR-569 June 2003, 17 pages, PDF James J. Leifer, Gilles Peskine, Peter Sewell, Keith Wansbrough: Abstract: In this paper we show how linear inequalities can be used to approximate Knuth-Bendix term order- Global abstraction-safe marshalling ing constraints, and how term operations such as sub- stitution can be carried out on systems of inequalities. with hash types Using this representation allows an off-the-shelf linear June 2003, 86 pages, PDF arithmetic decision procedure to check the satisfiabil- ity of a set of ordering constraints. We present a formal Abstract: Type abstraction is a key feature of ML-like description of a resolution calculus where systems of in- languages for writing large programs. Marshalling is equalities are used to constrain clauses, and implement necessary for writing distributed programs, exchang- this using the Omega test as a satisfiability checker. We ing values via network byte-streams or persistent stores. give the results of an experiment over problems in the In this paper we combine the two, developing compile- TPTP archive, comparing the practical performance of time and run-time semantics for marshalling, that guar- the resolution calculus with and without inherited in- antee abstraction-safety between separately-built pro- equality constraints. grams. We obtain a namespace for abstract types that is global, ie meaningful between programs, by hash- ing module declarations. We examine the scenarios in

133 which values of abstract types are communicated from UCAM-CL-TR-571 one program to another, and ensure, by constructing hashes appropriately, that the dynamic and static no- James Hall: tions of type equality mirror each other. We use single- ton kinds to express abstraction in the static seman- Multi-layer network monitoring and tics; abstraction is tracked in the dynamic semantics analysis by coloured brackets. These allow us to prove preser- vation, erasure, and coincidence results. We argue that July 2003, 230 pages, PDF our proposal is a good basis for extensions to existing PhD thesis (King’s College, April 2003) ML-like languages, pragmatically straightforward for language users and for implementors. Abstract: Passive network monitoring offers the pos- sibility of gathering a wealth of data about the traf- UCAM-CL-TR-570 fic traversing the network and the communicating pro- cesses generating that traffic. Significant advantages in- clude the non-intrusive nature of data capture and the Ole Høgh Jensen, Robin Milner: range and diversity of the traffic and driving applica- Bigraphs and mobile processes tions which may be observed. Conversely there are also associated practical difficulties which have restricted July 2003, 121 pages, PDF the usefulness of the technique: increasing network bandwidths can challenge the capacity of monitors to Abstract: A bigraphical reactive system (BRS) involves keep pace with passing traffic without data loss, and bigraphs, in which the nesting of nodes represents local- the bulk of data recorded may become unmanageable. ity, independently of the edges connecting them; it also Much research based upon passive monitoring has allows bigraphs to reconfigure themselves. BRSs aim to in consequence been limited to that using a sub-set of provide a uniform way to model spatially distributed the data potentially available, typically TCP/IP packet systems that both compute and communicate. In this headers gathered using Tcpdump or similar monitoring memorandum we develop their static and dynamic the- tools. The bulk of data collected is thereby minimised, ory. and with the possible exception of packet filtering, the In Part I we illustrate bigraphs in action, and show monitor’s available processing power is available for how they correspond to to process calculi. We then de- the task of collection and storage. As the data available velop the abstract (non-graphical) notion of wide re- for analysis is drawn from only a small section of the active system (WRS), of which BRSs are an instance. network protocol stack, detailed study is largely con- Starting from reaction rules —often called rewriting fined to the associated functionality and dynamics in rules— we use the RPO theory of Leifer and Milner to isolation from activity at other levels. Such lack of con- derive (labelled) transition systems for WRSs, in a way text severely restricts examination of the interaction be- that leads automatically to behavioural congruences. tween protocols which may in turn lead to inaccurate In Part II we develop bigraphs and BRSs formally. or erroneous conclusions. The theory is based directly on graphs, not on syntax. The work described in this report attempts to ad- Key results in the static theory are that sufficient RPOs dress some of these limitations. A new passive mon- exist (enabling the results of Part I to be applied), that itoring architecture — Nprobe — is presented, based parallel combinators familiar from process calculi may upon ‘off the shelf’ components and which, by using be defined, and that a complete algebraic theory exists clusters of probes, is scalable to keep pace with cur- at least for pure bigraphs (those without binding). Key rent high bandwidth networks without data loss. Mon- aspects in the dynamic theory —the BRSs— are the def- itored packets are fully captured, but are subject to the inition of parametric reaction rules that may replicate minimum processing in real time needed to identify and or discard parameters, and the full application of the associate data of interest across the target set of proto- behavioural theory of Part I. cols. Only this data is extracted and stored. The data In Part III we introduce a special class: the sim- reduction ratio thus achieved allows examination of a ple BRSs. These admit encodings of many process cal- wider range of encapsulated protocols without strain- culi, including the π-calculus and the ambient calcu- ing the probe’s storage capacity. lus. A still narrower class, the basic BRSs, admits an Full analysis of the data harvested from the network easy characterisation of our derived transition systems. is performed off-line. The activity of interest within We exploit this in a case study for an asynchronous π- each protocol is examined and is integrated across the calculus. We show that structural congruence of pro- range of protocols, allowing their interaction to be cess terms corresponds to equality of the representing studied. The activity at higher levels informs study of bigraphs, and that classical strong bisimilarity corre- the lower levels, and that at lower levels infers detail sponds to bisimilarity of bigraphs. At the end, we ex- of the higher. A technique for dynamically modelling plore several directions for further work. TCP connections is presented, which, by using data from both the transport and higher levels of the proto- col stack, differentiates between the effects of network and end-process activity.

134 The balance of the report presents a study of Web UCAM-CL-TR-574 traffic using Nprobe. Data collected from the IP, TCP, HTTP and HTML levels of the stack is integrated to Ivan Edward Sutherland: identify the patterns of network activity involved in downloading whole Web pages: by using the links con- Sketchpad: A man-machine graphical tained in HTML documents observed by the monitor, together with data extracted from the HTML head- communication system ers of downloaded contained objects, the set of TCP September 2003, 149 pages, PDF connections used, and the way in which browsers use PhD thesis (Massachusetts Institute of Technology, them, are studied as a whole. An analysis of the degree January 1963) and distribution of delay is presented and contributes to New preface by Alan Blackwell and Kerry Rodden. the understanding of performance as perceived by the user. The effects of packet loss on whole page download Abstract: The Sketchpad system uses drawing as a times are examined, particularly those losses occurring novel communication medium for a computer. The sys- early in the lifetime of connections before reliable esti- tem contains input, output, and computation programs mations of round trip times are established. The impli- which enable it to interpret information drawn directly cations of such early packet losses for pages downloads on a computer display. It has been used to draw electri- using persistent connections are also examined by sim- cal, mechanical, scientific, mathematical, and animated ulations using the detailed data available. drawings; it is a general purpose system. Sketchpad has shown the most usefulness as an aid to the understand- UCAM-CL-TR-572 ing of processes, such as the notion of linkages, which can be described with pictures. Sketchpad also makes it Tim Harris: easy to draw highly repetitive or highly accurate draw- ings and to change drawings previously drawn with it. Design choices for language-based The many drawings in this thesis were all made with transactions Sketchpad. A Sketchpad user sketches directly on a computer August 2003, 7 pages, PDF display with a “light pen.” The light pen is used both to position parts of the drawing on the display and Abstract: This report discusses two design choices to point to them to change them. A set of push but- which arose in our recent work on introducing a new tons controls the changes to be made such as “erase,” ‘atomic’ keyword as an extension to the Java program- or “move.” Except for legends, no written language is ming language. We discuss the extent to which pro- used. grams using atomic blocks should be provided with Information sketched can include straight line seg- an explicit ‘abort’ operation to roll-back the effects of ments and circle arcs. Arbitrary symbols may be defined the current block. We also discuss mechanisms for sup- from any collection of line segments, circle arcs, and porting blocks that perform I/O operations or external previously defined symbols. A user may define and use database transactions. as many symbols as he wishes. Any change in the defi- nition of a symbol is at once seen wherever that symbol UCAM-CL-TR-573 appears. Sketchpad stores explicit information about the Lawrence C. Paulson: topology of a drawing. If the user moves one vertex of a polygon, both adjacent sides will be moved. If the user Mechanizing compositional moves a symbol, all lines attached to that symbol will reasoning for concurrent systems: automatically move to stay attached to it. The topolog- ical connections of the drawing are automatically indi- some lessons cated by the user as he sketches. Since Sketchpad is able to accept topological information from a human being August 2003, 20 pages, PDF in a picture language perfectly natural to the human, it can be used as an input program for computation Abstract: The paper reports on experiences of mecha- programs which require topological data, e.g., circuit nizing various proposals for compositional reasoning in simulators. concurrent systems. The work uses the UNITY formal- Sketchpad itself is able to move parts of the drawing ism and the Isabelle proof tool. The proposals inves- around to meet new conditions which the user may ap- tigated include existential/universal properties, guaran- ply to them. The user indicates conditions with the light tees properties and progress sets. The paper mentions pen and push buttons. For example, to make two lines some alternative proposals that are also worth of inves- parallel, he successively points to the lines with the light tigation. The conclusions are that many of these meth- pen and presses a button. The conditions themselves are ods work and are suitable candidates for further devel- displayed on the drawing so that they may be erased or opment. changed with the light pen language. Any combination

135 of conditions can be defined as a composite condition This dissertation quantifies the potential gain from and applied in one step. such a system and how that gain is related to the fre- It is easy to add entirely new types of conditions quency of reconfiguration. It outlines possible network to Sketchpad’s vocabulary. Since the conditions can in- architectures which allow reconfiguration and, through volve anything computable, Sketchpad can be used for simulation, measures the performance of these architec- a very wide range of problems. For example, Sketch- tures. It then discusses the possible interactions between pad has been used to find the distribution of forces in a reconfiguring optical layer and higher-level network the members of truss bridges drawn with it. layers. Sketchpad drawings are stored in the computer in This dissertation argues that the optical layer should a specially designed “ring” structure. The ring struc- be distinct from higher network layers, maintaining sta- ture features rapid processing of topological informa- ble full-mesh connectivity, and dynamically reconfigur- tion with no searching at all. The basic operations used ing the sizes and physical routes of the virtual paths to in Sketchpad for manipulating the ring structure are de- take advantage of changing traffic levels. scribed. UCAM-CL-TR-576 UCAM-CL-TR-575 David R. Spence: Tim Granger: An implementation of a coordinate Reconfigurable wavelength-switched based location system optical networks for the Internet core November 2003, 12 pages, PDF November 2003, 184 pages, PDF PhD thesis (King’s College, August 2003) Abstract: This paper explains the co-ordinate based lo- cation system built for XenoSearch, a resource discov- Abstract: With the quantity of data traffic carried on ery system in the XenoServer Open Platform. The sys- the Internet doubling each year, there is no let up in the tem is builds on the work of GNP, Lighthouse and demand for ever increasing network capacity. Optical many more recent schemes. We also present results fibres have a theoretical capacity of many tens of ter- from various combinations of algorithms to perform abits per second. Currently six terabits per second has the actual co-ordinate calculation based on GNP, Light- been achieved using Dense Wavelength Division Mul- house and spring based systems and show our imple- tiplexing: multiple signals at different wavelengths car- mentations of the various algorithms give similar pre- ried on the same fibre. diction errors. This large available bandwidth moves the perfor- mance bottlenecks to the processing required at each UCAM-CL-TR-577 network node to receive, buffer, route, and transmit each individual packet. For the last 10 years the speed Markus G. Kuhn: of the electronic routers has been, in relative terms, increasing slower than optical capacity. The space re- Compromising emanations: quired and power consumed by these routers is also be- eavesdropping risks of computer coming a significant limitation. One solution examined in this dissertation is to cre- displays ate a virtual topology in the optical layer by using all- December 2003, 167 pages, PDF optical switches to create lightpaths across the network. PhD thesis (Wolfson College, June 2002) In this way nodes that are not directly connected can appear to be a single virtual hop away, and no per- Abstract: Electronic equipment can emit unintentional packet processing is required at the intermediate nodes. signals from which eavesdroppers may reconstruct pro- With advances in optical switches it is now possible for cessed data at some distance. This has been a con- the network to reconfigure lightpaths dynamically. This cern for military hardware for over half a century. The allows the network to share the resources available be- civilian computer-security community became aware of tween the different traffic streams flowing across the the risk through the work of van Eck in 1985. Mili- network, and track changes in traffic volumes by allo- tary “Tempest” shielding test standards remain secret cating bandwidth on demand. and no civilian equivalents are available at present. The This solution is inherently a circuit-switched ap- topic is still largely neglected in security textbooks due proach, but taken into account are characteristics of to a lack of published experimental data. optical switching, in particular waveband switching This report documents eavesdropping experiments (where we switch a contiguous range of wavelengths on contemporary computer displays. It discusses the as a single unit) and latency required to achieve non nature and properties of compromising emanations for disruptive switching. both cathode-ray tube and liquid-crystal monitors. The detection equipment used matches the capabilities to

136 be expected from well-funded professional eavesdrop- Abstract: Mutual-exclusion locks are currently the pers. All experiments were carried out in a normal un- most popular mechanism for interprocess synchroni- shielded office environment. They therefore focus on sation, largely due to their apparent simplicity and emanations from display refresh signals, where periodic ease of implementation. In the parallel-computing en- averaging can be used to obtain reproducible results in vironments that are increasingly commonplace in high- spite of varying environmental noise. performance applications, this simplicity is deceptive: Additional experiments described in this report mutual exclusion does not scale well with large num- demonstrate how to make information emitted via bers of locks and many concurrent threads of execu- the video signal more easily receivable, how to re- tion. Highly-concurrent access to shared data demands cover plaintext from emanations via radio-character a sophisticated ‘fine-grained’ locking strategy to avoid recognition, how to estimate remotely precise video- serialising non-conflicting operations. Such strategies timing parameters, and how to protect displayed text are hard to design correctly and with good performance from radio-frequency eavesdroppers by using special- because they can harbour problems such as deadlock, ized screen drivers with a carefully selected video card. priority inversion and convoying. Lock manipulations Furthermore, a proposal for a civilian radio-frequency may also degrade the performance of cache-coherent emission-security standard is outlined, based on path- multiprocessor systems by causing coherency conflicts loss estimates and published data about radio noise lev- and increased interconnect traffic, even when the lock els. protects read-only data. Finally, a new optical eavesdropping technique is In looking for solutions to these problems, interest demonstrated that reads CRT displays at a distance. It has developed in lock-free data structures. By eschew- observes high-frequency variations of the light emitted, ing mutual exclusion it is hoped that more efficient and even after diffuse reflection. Experiments with a typical robust systems can be built. Unfortunately the current monitor show that enough video signal remains in the reality is that most lock-free algorithms are complex, light to permit the reconstruction of readable text from slow and impractical. In this dissertation I address these signals detected with a fast photosensor. Shot-noise cal- concerns by introducing and evaluating practical ab- culations provide an upper bound for this risk. stractions and data structures that facilitate the devel- opment of large-scale lock-free systems. UCAM-CL-TR-578 Firstly, I present an implementation of two useful abstractions that make it easier to develop arbitrary Robert Ennals, Richard Sharp, Alan Mycroft: lock-free data structures. Although these abstractions have been described in previous work, my designs are Linear types for packet processing the first that can be practically implemented on current (extended version) multiprocessor systems. Secondly, I present a suite of novel lock-free search January 2004, 31 pages, PDF structures. This is interesting not only because of the fundamental importance of searching in computer sci- Abstract: We present PacLang: an imperative, concur- ence and its wide use in real systems, but also because it rent, linearly-typed language designed for expressing demonstrates the implementation issues that arise when packet processing applications. PacLang’s linear type using the practical abstractions I have developed. system ensures that no packet is referenced by more Finally, I evaluate each of my designs and com- than one thread, but allows multiple references to a pare them with existing lock-based and lock-free al- packet within a thread. We argue (i) that this property ternatives. To ensure the strongest possible competi- greatly simplifies compilation of high-level programs to tion, several of the lock-based alternatives are signifi- the distributed memory architectures of modern Net- cant improvements on the best-known solutions in the work Processors; and (ii) that PacLang’s type system literature. These results demonstrate that it is possible captures that style in which imperative packet process- to build useful data structures with all the perceived ing programs are already written. Claim (ii) is justified benefits of lock-freedom and with performance bet- by means of a case-study: we describe a PacLang imple- ter than sophisticated lock-based designs. Furthermore, mentation of the IPv4 unicast packet forwarding algo- and contrary to popular belief, this work shows that ex- rithm. isting hardware primitives are sufficient to build prac- PacLang is formalised by means of an operational tical lock-free implementations of complex data struc- semantics and a Unique Ownership theorem formalises tures. its correctness with respect to the type system. UCAM-CL-TR-580 UCAM-CL-TR-579 Ole Høgh Jensen, Robin Milner: Keir Fraser: Practical lock-freedom Bigraphs and mobile processes (revised) February 2004, 116 pages, PDF PhD thesis (King’s College, September 2003) February 2004, 131 pages, PDF

137 Abstract: A bigraphical reactive system (BRS) involves UCAM-CL-TR-582 bigraphs, in which the nesting of nodes represents local- ity, independently of the edges connecting them; it also Piotr Zielinski:´ allows bigraphs to reconfigure themselves. BRSs aim to provide a uniform way to model spatially distributed Latency-optimal Uniform Atomic systems that both compute and communicate. In this memorandum we develop their static and dynamic the- Broadcast algorithm ory. February 2004, 28 pages, PDF In Part I we illustrate bigraphs in action, and show how they correspond to to process calculi. We then de- Abstract: We present a new asynchronous Uniform velop the abstract (non-graphical) notion of wide re- Atomic Broadcast algorithm with a delivery latency of active system (WRS), of which BRSs are an instance. two communication steps in optimistic settings, which Starting from reaction rules —often called rewriting is faster than any other known algorithm and has been rules— we use the RPO theory of Leifer and Milner to shown to be the lower bound. It also has the weak- derive (labelled) transition systems for WRSs, in a way est possible liveness requirements (the Ω failure detector that leads automatically to behavioural congruences. and a majority of correct processes) and achieves three In Part II we develop bigraphs and BRSs formally. new lower bounds presented in this paper. Finally, we The theory is based directly on graphs, not on syntax. introduce a new notation and several new abstractions, Key results in the static theory are that sufficient RPOs which are used to construct and present the algorithm exist (enabling the results of Part I to be applied), that in a clear and modular way. parallel combinators familiar from process calculi may be defined, and that a complete algebraic theory exists UCAM-CL-TR-583 at least for pure bigraphs (those without binding). Key aspects in the dynamic theory —the BRSs— are the def- inition of parametric reaction rules that may replicate Cedric´ Gerot,´ Loıc¨ Barthe, Neil A. Dodgson, or discard parameters, and the full application of the Malcolm A. Sabin: behavioural theory of Part I. In Part III we introduce a special class: the sim- Subdivision as a sequence of ple BRSs. These admit encodings of many process cal- sampled Cp surfaces and conditions culi, including the π-calculus and the ambient calcu- lus. A still narrower class, the basic BRSs, admits an for tuning schemes easy characterisation of our derived transition systems. March 2004, 68 pages, PDF We exploit this in a case study for an asynchronous π- calculus. We show that structural congruence of pro- Abstract: cess terms corresponds to equality of the representing We deal with practical conditions for tuning bigraphs, and that classical strong bisimilarity corre- a subdivision scheme in order to control its artifacts in the vicinity of a mark point. To do so, we look for sponds to bisimilarity of bigraphs. At the end, we ex- good behaviour of the limit vertices rather than good plore several directions for further work. mathematical properties of the limit surface. The good behaviour of the limit vertices is characterised with the UCAM-CL-TR-581 definition of C2-convergence of a scheme. We propose necessary explicit conditions for C2-convergence of a Robin Milner: scheme in the vicinity of any mark point being a ver- tex of valency n or the centre of an n-sided face with Axioms for bigraphical structure n greater or equal to three. These necessary conditions February 2004, 26 pages, PDF concern the eigenvalues and eigenvectors of subdivision matrices in the frequency domain. The components of Abstract: This paper axiomatises the structure of bi- these matrices may be complex. If we could guaran- graphs, and proves that the resulting theory is com- tee that they were real, this would simplify numerical plete. Bigraphs are graphs with double structure, rep- analysis of the eigenstructure of the matrices, especially resenting locality and connectivity. They have been in the context of scheme tuning where we manipulate shown to represent dynamic theories for the π-calculus, symbolic terms. In this paper we show that an appro- mobile ambients and Petri nets, in a way that is faith- priate choice of the parameter space combined with a ful to each of those models of discrete behaviour. While substitution of vertices lets us transform these matri- the main purpose of bigraphs is to understand mobile ces into pure real ones. The substitution consists in re- systems, a prerequisite for this understanding is a well- placing some vertices by linear combinations of them- behaved theory of the structure of states in such sys- selves. Finally, we explain how to derive conditions on tems. The algebra of bigraph structure is surprisingly the eigenelements of the real matrices which are neces- simple, as the paper demonstrates; this is because bi- sary for the C2-convergence of the scheme. graphs treat locality and connectivity orthogonally.

138 UCAM-CL-TR-584 metaphor will not scale to such a large display; the con- tinuing profusion of paper, which is used as much as Stephen Brooks: ever, attests to its unsurpassed affordances as a medium for manipulating documents; and despite its proven Concise texture editing manual and cognitive benefits, two-handed input is still not used in computer interfaces. March 2004, 164 pages, PDF I present a system called the Escritoire that uses a PhD thesis (Jesus College, October 2003) novel configuration of overlapping projectors to cre- ate a large desk display that fills the area of a con- Abstract: Many computer graphics applications remain ventional desk and also has a high resolution region in the domain of the specialist. They are typically char- in front of the user for precise work. The projectors acterized by complex user-directed tasks, often requir- need not be positioned exactly—the projected imagery ing proficiency in design, colour spaces, computer inter- is warped using standard 3D video hardware to com- action and file management. Furthermore, the demands pensate for rough projector positioning and oblique of this skill set are often exacerbated by an equally com- projection. Calibration involves computing planar ho- plex collection of image or object manipulation com- mographies between the 2D co-ordinate spaces of the mands embedded in a variety of interface components. warped textures, projector framebuffers, desk, and in- The complexity of these graphic editing tools often re- put devices. quires that the user possess a correspondingly high level The video hardware can easily perform the neces- of expertise. sary warping and achieves 30 frames per second for the Concise Texture Editing is aimed at addressing the dual-projector display. Oblique projection has proved over-complexity of modern graphics tools and is based to be a solution to the problem of occlusion common to on the intuitive notion that the human user is skilled at front-projection systems. The combination of an elec- high level decision making while the computer is profi- tromagnetic digitizer and an ultrasonic pen allows si- cient at rapid computation. This thesis has focused on multaneous input with two hands. The pen for the non- the development of interactive editing tools for 2D tex- dominant hand is simpler and coarser than that for ture images and has led to the development of a novel the dominant hand, reflecting the differing roles of the texture manipulation system that allows: hands in bimanual manipulation. I give a new algo- – the concise painting of a texture; rithm for calibrating a pen, that uses piecewise linear – the concise cloning of textures; interpolation between control points. I also give an al- – the concise alteration of texture element size. gorithm to calibrate a wall display at distance using a The system allows complex operations to be per- device whose position and orientation are tracked in formed on images with minimal user interaction. When three dimensions. applied to the domain of image editing, this implies The Escritoire software is divided into a client that that the user can instruct the system to perform com- exploits the video hardware and handles the input de- plex changes to digital images without having to spec- vices, and a server that processes events and stores all ify copious amounts of detail. In order to reduce the of the system state. Multiple clients can connect to a user’s workload, the inherent self-similarity of textures single server to support collaboration. Sheets of vir- is exploited to interactively replicate editing opera- tual paper on the Escritoire can be put in piles which tions globally over an image. This unique image sys- can be browsed and reordered. As with physical paper tem thereby reduces the user’s workload through semi- this allows items to be arranged quickly and informally, automation, resulting in an acutely concise user inter- avoiding the premature work required to add an item face. to a hierarchical file system. Another interface feature is pen traces, which allow remote users to gesture to each UCAM-CL-TR-585 other. I report the results of tests with individuals and with pairs collaborating remotely. Collaborating partic- Mark S. D. Ashdown: ipants found an audio channel and the shared desk sur- face much more useful than a video channel showing Personal projected displays their faces. The Escritoire is constructed from commodity com- March 2004, 150 pages, PDF ponents, and unlike multi-projector display walls its PhD thesis (Churchill College, September 2003) cost is feasible for an individual user and it fits into a normal office setting. It demonstrates a hardware Abstract: Since the inception of the personal com- configuration, calibration algorithm, graphics warping puter, the interface presented to users has been de- process, set of interface features, and distributed archi- fined by the monitor screen, keyboard, and mouse, and tecture that can make personal projected displays a re- by the framework of the desktop metaphor. It is very ality. different from a physical desktop which has a large horizontal surface, allows paper documents to be ar- UCAM-CL-TR-586 ranged, browsed, and annotated, and is controlled via continuous movements with both hands. The desktop Andras´ Belokosztolszki:

139 Role-based access control policy This enables environments where policies are main- administration tained by many administrators who have varying levels of competence, trust, and jurisdiction. March 2004, 170 pages, PDF We have tested all of these concepts in Desert, our PhD thesis (King’s College, November 2003) proof of concept implementation.

Abstract: The wide proliferation of the Internet has set UCAM-CL-TR-587 new requirements for access control policy specifica- tion. Due to the demand for ad-hoc cooperation be- Paul Alexander Cunningham: tween organisations, applications are no longer isolated from each other; consequently, access control policies Verification of asynchronous circuits face a large, heterogeneous, and dynamic environment. Policies, while maintaining their main functionality, go April 2004, 174 pages, PDF through many minor adaptations, evolving as the envi- PhD thesis (Gonville and Caius College, January ronment changes. 2002) In this thesis we investigate the long-term adminis- tration of role-based access control (RBAC) – in partic- Abstract: The purpose of this thesis is to introduce ular OASIS RBAC – policies. proposition-oriented behaviours and apply them to the With the aim of encapsulating persistent goals of verification of asynchronous circuits. The major contri- policies we introduce extensions in the form of meta- bution of proposition-oriented behaviours is their abil- policies. These meta-policies, whose expected lifetime ity to extend existing formal notations to permit the is longer than the lifetime of individual policies, con- explicit use of both signal levels and transitions. tain extra information and restrictions about policies. It This thesis begins with the formalisation of is expected that successive policy versions are checked proposition-oriented behaviours in the context of gate at policy specification time to ensure that they com- networks, and with the set-theoretic extension of both ply with the requirements and guidelines set by meta- regular-expressions and trace-expressions to reason policies. over proposition-oriented behaviours. A new trace- In the first of the three classes of meta-policies we expression construct, referred to as biased composition, group together policy components by annotating them is also introduced. Algorithmic realisation of these set- with context labels. Based on this grouping and an in- theoretic extensions is documented using a special form formation flow relation on context labels, we limit the of finite automata called proposition automata. A ver- way in which policy components may be connected to ification procedure for conformance of gate networks other component groups. We use this to partition con- to a set of proposition automata is described in which ceptually disparate portions of policies, and reference each proposition automaton may be viewed either as these coherent portions to specify policy restrictions a constraint or a specification. The implementation of and policy enforcement behaviour. this procedure as an automated verification program In our second class of meta-policies – compliance called Veraci is summarised, and a number of example policies – we specify requirements on an abstract policy Veraci programs are used to demonstrate contributions model. We then use this for static policy checking. As of proposition-oriented behaviour to asynchronous cir- compliance tests are performed at policy specification cuit design. These contributions include level-event uni- time, compliance policies may include restrictions that fication, event abstraction, and relative timing assump- either cannot be included in policies, or whose inclu- tions using biased composition. The performance of Ve- sion would result in degraded policy enforcement per- raci is also compared to an existing event-oriented ver- formance. We also indicate how to use compliance poli- ification program called Versify, the result of this com- cies to provide information about organisational poli- parison being a consistent performance gain using Ve- cies without disclosing sensitive information. raci over Versify. The final class of our meta-policies, called interface This thesis concludes with the design and im- policies, is used to help set up and maintain cooperation plementation of a 2048 bit dual-rail asynchronous among organisations by enabling them to use compo- Montgomery exponentiator, MOD EXP, in a 0.18µm nents from each other’s policies. Being based on com- standard-cell process. The application of Veraci to the pliance policies, they use an abstract policy component design of MOD EXP is summarised, and the practi- model, and can also specify requirements for both com- cal benefits of proposition-oriented verification are dis- ponent exporters and importers. Using such interface cussed. policies we can reconcile compatibility issues between cooperating parties automatically. UCAM-CL-TR-588 Finally, building on our meta-policies, we consider policy evolution and self-administration, according to Panit Watcharawitch: which we treat RBAC policies as distributed resources to which access is specified with the help of RBAC itself. MulTEP: A MultiThreaded Embedded Processor

140 May 2004, 190 pages, PDF UCAM-CL-TR-590 PhD thesis (Newnham College, November 2003) Peter R. Pietzuch: Abstract: Conventional embedded microprocessors have traditionally followed the footsteps of high-end Hermes: A scalable event-based processor design to achieve high performance. Their middleware underlying architectures prioritise tasks by time-critical interrupts and rely on software to perform scheduling June 2004, 180 pages, PDF tasks. Single threaded execution relies on instruction- PhD thesis (Queens’ College, February 2004) based probabilistic techniques, such as speculative exe- cution and branch prediction, which are unsuitable for Abstract: Large-scale distributed systems require new embedded systems when real-time performance guar- middleware paradigms that do not suffer from the lim- antees need to be met. Multithreading appears to be itations of traditional request/reply middleware. These a feasible solution for embedded processors. Thread- limitations include tight coupling between components, level parallelism has a potential to overcome the limita- a lack of information filtering capabilities, and support tions of insufficient instruction-level parallelism to hide for one-to-one communication semantics only. We ar- the increasing memory latencies. MulTEP is designed gue that event-based middleware is a scalable and pow- to provide high performance thread-level parallelism, erful new type of middleware for building large-scale real-time characteristics, a flexible number of threads distributed systems. However, it is important that an and low incremental cost per thread for the embedded event-based middleware platform includes all the stan- system. In its architecture, a matching-store synchroni- dard functionality that an application programmer ex- sation mechanism allows a thread to wait for multiple pects from middleware. data items. A tagged up/down dynamic-priority hard- In this thesis we describe the design and implemen- ware scheduler is provided for real-time scheduling. tation of Hermes, a distributed, event-based middle- Pre-loading, pre-fetching and colour-tagging techniques ware platform. The power and flexibility of Hermes are implemented to allow context switches without any is illustrated throughout for two application domains: overhead. The architecture provides four additional Internet-wide news distribution and a sensor-rich, ac- multithreading instructions for programmers and ad- tive building. Hermes follows a type- and attribute- vance compilers to create programs with low-overhead based publish/subscribe model that places particular multithreaded operations. Experimental results demon- emphasis on programming language integration by sup- strate that multithreading can be effectively used to im- porting type-checking of event data and event type prove performance and system utilisation. Latency op- inheritance. To handle dynamic, large-scale environ- erations that would otherwise stall the pipeline are hid- ments, Hermes uses peer-to-peer techniques for auto- den by the execution of the other threads. The hard- nomic management of its overlay network of event bro- ware scheduler provides priority scheduling, which is kers and for scalable event dissemination. Its routing suitable for real-time embedded applications. algorithms, implemented on top of a distributed hash table, use rendezvous nodes to reduce routing state in UCAM-CL-TR-589 the system, and include fault-tolerance features for re- pairing event dissemination trees. All this is achieved Glynn Winskel, Francesco Zappa Nardelli: without compromising scalability and efficiency, as is shown by a simulational evaluation of Hermes routing. new-HOPLA — a higher-order The core functionality of an event-based middle- process language with name ware is extended with three higher-level middleware services that address different requirements in a dis- generation tributed computing environment. We introduce a novel congestion control service that avoids congestion in the May 2004, 16 pages, PDF overlay broker network during normal operation and recovery after failure, and therefore enables a resource- Abstract: This paper introduces new-HOPLA, a con- efficient deployment of the middleware. The expressive- cise but powerful language for higher-order nondeter- ness of subscriptions in the event-based middleware is ministic processes with name generation. Its origins as enhanced with a composite event service that performs a metalanguage for domain theory are sketched but for the distributed detection of complex event patterns, the most part the paper concentrates on its operational thus taking the burden away from clients. Finally, a se- semantics. The language is typed, the type of a process curity service adds access control to Hermes according describing the shape of the computation paths it can to a secure publish/subscribe model. This model sup- perform. Its transition semantics, bisimulation, congru- ports fine-grained access control decisions so that sep- ence properties and expressive power are explored. En- arate trust domains can share the same overlay broker codings of π-calculus and HOπ are presented. network.

141 UCAM-CL-TR-591 developing and applying the skills necessary for such a reverse-engineering attack. In the process, we discover Silas S. Brown: that the Luna CA3 has far more undocumented code and functionality than is revealed to the end-user. Conversion of notations June 2004, 159 pages, PDF UCAM-CL-TR-593 PhD thesis (St John’s College, November 2003) Piotr Zielinski:´ Abstract: Music, engineering, mathematics, and many other disciplines have established notations for writing Paxos at war their documents. The effectiveness of each of these no- June 2004, 30 pages, PDF tations can be hampered by the circumstances in which it is being used, or by a user’s disability or cultural Abstract: The optimistic latency of Byzantine Paxos can background. Adjusting the notation can help, but the be reduced from three communication steps to two, requirements of different cases often conflict, meaning without using public-key cryptography. This is done that each new document will have to be transformed by making a decision when more than (n+3f)/2 accep- between many versions. Tools that support the pro- tors report to have received the same proposal from the gramming of such transformations can also assist by al- leader, with n being the total number of acceptors and lowing the creation of new notations on demand, which f the number of the faulty ones. No further improve- is an under-explored option in the relief of educational ment in latency is possible, because every Consensus difficulties. algorithm must take at least two steps even in benign This thesis reviews some programming tools that settings. Moreover, if the leader is correct, our protocol can be used to manipulate the tree-like structure of a achieves the latency of at most three steps, even if some notation in order to transform it into another. It then other processes fail. These two properties make this the describes a system “4DML” that allows the program- fastest Byzantine agreement protocol proposed so far. mer to create a “model” of the desired result, from By running many instances of this algorithm in par- which the transformation is derived. This is achieved allel, we can implement Vector Consensus and Byzan- by representing the structure in a geometric space with tine Atomic Broadcast in two and three steps, respec- many dimensions, where the model acts as an alterna- tively, which is two steps faster than any other known tive frame of reference. algorithm. Example applications of 4DML include the tran- scription of songs and musical scores into various nota- UCAM-CL-TR-594 tions, the production of specially-customised notations to assist a sight-impaired person in learning Chinese, an unusual way of re-organising personal notes, a “web- George Danezis: site scraping” system for extracting data from on-line Designing and attacking anonymous services that provide only one presentation, and an aid to making mathematics and diagrams accessible to peo- communication systems ple with severe print disabilities. The benefits and draw- backs of the 4DML approach are evaluated, and possi- July 2004, 150 pages, PDF ble directions for future work are explored. PhD thesis (Queens’ College, January 2004) Abstract: UCAM-CL-TR-592 This report contributes to the field of anony- mous communications over widely deployed communi- ˇ cation networks. It describes novel schemes to protect Mike Bond, Daniel Cvrcek, anonymity; it also presents powerful new attacks and Steven J. Murdoch: new ways of analysing and understanding anonymity Unwrapping the Chrysalis properties. We present Mixminion, a new generation anony- June 2004, 15 pages, PDF mous remailer, and examine its security against all known passive and active cryptographic attacks. We Abstract: We describe our experiences reverse engineer- use the secure anonymous replies it provides, to de- ing the Chrysalis-ITS Luna CA3 – a PKCS#11 compli- scribe a pseudonym server, as an example of the anony- ant cryptographic token. Emissions analysis and secu- mous protocols that mixminion can support. The secu- rity API attacks are viewed by many to be simpler and rity of mix systems is then assessed against a compul- more efficient than a direct attack on an HSM. But how sion threat model, in which an adversary can request difficult is it to actually “go in the front door”? We de- the decryption of material from honest nodes. A new scribe how we unpicked the CA3 internal architecture construction, the fs-mix, is presented that makes trac- and abused its low-level API to impersonate a CA3 to- ing messages by such an adversary extremely expensive. ken in its cloning protocol – and extract PKCS#11 pri- Moving beyond the static security of anonymous vate keys in the clear. We quantify the effort involved in communication protocols, we define a metric based

142 on information theory that can be used to measure Using this methodology we derive novel composition anonymity. The analysis of the pool mix serves as laws upon quantum states and quantum operations, an example of its use. We then create a framework Schmidt-type decompositions for bipartite pure states within which we compare the traffic analysis resistance and some powerful formulae relating to the correspon- provided by different mix network topologies. A new dence. topology, based on expander graphs, proves to be ef- Quantum cryptography – The key principle of ficient and secure. The rgb-mix is also presented; this quantum cryptography could be summarized as fol- implements a strategy to detect flooding attacks against lows. Honest parties communicate using quantum honest mix nodes and neutralise them by the use of states. To the eavesdropper these states are random cover traffic. and non-orthogonal. In order to gather information Finally a set of generic attacks are studied. Sta- she must measure them, but this may cause irreversible tistical disclosure attacks model the whole anony- damage. Honest parties seek to detect her mischief by mous system as a black box, and are able to uncover checking whether certain quantum states are left intact. the relationships between long-term correspondents. Thus tradeoff between the eavesdropper’s information Stream attacks trace streams of data travelling through gain, and the disturbance she necessarily induces, can anonymizing networks, and uncover the communicat- be viewed as the power engine behind quantum crypto- ing parties very quickly. They both use statistical meth- graphic protocols. We begin by quantifying this trade- ods to drastically reduce the anonymity of users. Other off in the case of a measure distinguishing two non- minor attacks are described against peer discovery and orthogonal equiprobable pure states. A formula for this route reconstruction in anonymous networks, as well tradeoff was first obtained by Fuchs and Peres, but as the naıve¨ use of anonymous replies. we provide a shorter, geometrical derivation (within the framework of the above mentioned conal represen- UCAM-CL-TR-595 tation). Next we proceed to analyze the Information gain versus disturbance tradeoff in a scenario where Pablo J. Arrighi: Alice and Bob interleave, at random, pairwise super- positions of two message words within their otherwise Representations of quantum classical communications. This work constitutes one of the few results currently available regarding d-level operations, with applications to systems quantum cryptography, and seems to provide quantum cryptography a good general primitive for building such protocols. The proof crucially relies on the state-operator corre- July 2004, 157 pages, PDF spondence formulae derived in the first part, together PhD thesis (Emmanuel College, 23 September 2003) with some methods by Banaszek. Finally we make use of this analysis to prove the security of a ‘blind quan- Abstract: Representations of quantum operations – We tum computation’ protocol, whereby Alice gets Bob to start by introducing a geometrical representation (real perform some quantum algorithm for her, but prevents vector space) of quantum states and quantum opera- him from learning her input to this quantum algorithm. tions. To do so we exploit an isomorphism from pos- itive matrices to a subcone of the Minkowski future UCAM-CL-TR-596 light-cone. Pure states map onto certain light-like vec- tors, whilst the axis of revolution encodes the overall probability of occurrence for the state. This extension Keir Fraser, Steven Hand, Rolf Neugebauer, of the Generalized Bloch Sphere enables us to cater for Ian Pratt, Andrew Warfield, non-trace-preserving quantum operations, and in par- Mark Williamson: ticular to view the per-outcome effects of generalized measurements. We show that these consist of the prod- Reconstructing I/O uct of an orthogonal transform about the axis of the August 2004, 16 pages, PDF cone of revolution and a positive real symmetric lin- ear transform. In the case of a qubit the representation Abstract: We present a next-generation architecture becomes all the more interesting since it elegantly as- that addresses problems of dependability, maintainabil- sociates, to each measurement element of a generalized ity, and manageability of I/O devices and their software measurement, a Lorentz transformation in Minkowski drivers on the PC platform. Our architecture resolves space. We formalize explicitly this correspondence be- both hardware and software issues, exploiting emerg- tween ‘observation of a quantum system’ and ‘special ing hardware features to improve device safety. Our relativistic change of inertial frame’. To end this part we high-performance implementation, based on the Xen review the state-operator correspondence, which was virtual machine monitor, provides an immediate tran- successfully exploited by Choi to derive the operator- sition opportunity for today’s systems. sum representation of quantum operations. We go fur- ther and show that all of the important theorems con- cerning quantum operations can in fact be derived as simple corollaries of those concerning quantum states.

143 UCAM-CL-TR-597 Abstract: A framework is defined within which reac- tive systems can be studied formally. The framework Advaith Siddharthan: is based upon s-categories, a new variety of categories, within which reactive systems can be set up in such a Syntactic simplification and way that labelled transition systems can be uniformly extracted. These lead in turn to behavioural preorders text cohesion and equivalences, such as the failures preorder (treated August 2004, 195 pages, PDF elsewhere) and bisimilarity, which are guaranteed to be PhD thesis (Gonville and Caius College, November congruential. The theory rests upon the notion of rela- 2003) tive pushout previously introduced by the authors. The framework is applied to a particular graphical model Abstract: Syntactic simplification is the process of re- known as link graphs, which encompasses a variety ducing the grammatical complexity of a text, while re- of calculi for mobile distributed processes. The specific taining its information content and meaning. The aim theory of link graphs is developed. It is then applied of syntactic simplification is to make text easier to com- to an established calculus, namely condition-event Petri prehend for human readers, or process by programs. In nets. In particular, a labelled transition system is de- this thesis, I describe how syntactic simplification can rived for condition-event nets, corresponding to a natu- be achieved using shallow robust analysis, a small set of ral notion of observable actions in Petri net theory. The hand-crafted simplification rules and a detailed analysis transition system yields a congruential bisimilarity co- of the discourse-level aspects of syntactically rewriting inciding with one derived directly from the observable text. I offer a treatment of relative clauses, apposition, actions. This yields a calibration of the general theory coordination and subordination. of reactive systems and link graphs against known spe- I present novel techniques for relative clause and ap- cific theories. positive attachment. I argue that these attachment de- cisions are not purely syntactic. My approaches rely UCAM-CL-TR-599 on a shallow discourse model and on animacy infor- mation obtained from a lexical knowledge base. I also Mohamed F. Hassan: show how clause and appositive boundaries can be de- termined reliably using a decision procedure based on Further analysis of ternary and local context, represented by part-of-speech tags and 3-point univariate subdivision noun chunks. I then formalise the interactions that take place be- schemes tween syntax and discourse during the simplification process. This is important because the usefulness of August 2004, 9 pages, PDF syntactic simplification in making a text accessible to a wider audience can be undermined if the rewritten text Abstract: The precision set, approximation order and lacks cohesion. I describe how various generation issues Holder¨ exponent are derived for each of the univari- like sentence ordering, cue-word selection, referring- ate subdivision schemes described in Technical Report expression generation, determiner choice and pronom- UCAM-CL-TR-520. inal use can be resolved so as to preserve conjunctive and anaphoric cohesive-relations during syntactic sim- UCAM-CL-TR-600 plification. In order to perform syntactic simplification, I have Brian Ninham Shand: had to address various natural language processing problems, including clause and appositive identifica- Trust for resource control: tion and attachment, pronoun resolution and referring- Self-enforcing automatic rational expression generation. I evaluate my approaches to solving each problem individually, and also present a contracts between computers holistic evaluation of my syntactic simplification sys- August 2004, 154 pages, PDF tem. PhD thesis (Jesus College, February 2004)

UCAM-CL-TR-598 Abstract: Computer systems need to control access to their resources, in order to give precedence to urgent or James J. Leifer, Robin Milner: important tasks. This is increasingly important in net- worked applications, which need to interact with other Transition systems, link graphs and machines but may be subject to abuse unless protected Petri nets from attack. To do this effectively, they need an explicit resource model, and a way to assess others’ actions in August 2004, 64 pages, PDF terms of it. This dissertation shows how the actions can be represented using resource-based computational

144 contracts, together with a rich trust model which mon- This provides a fine-grained integration of model itors and enforces contract compliance. checking and theorem proving using a mathematically Related research in the area has focused on individ- rigourous interface. The generality of our theories al- ual aspects of this problem, such as resource pricing lows us to perform much of the proof offline, in con- and auctions, trust modelling and reputation systems, trast with earlier work. This substantially reduces the or resource-constrained computing and resource-aware inevitable performance penalty of doing model check- middleware. These need to be integrated into a single ing by proof. model, in order to provide a general framework for To demonstrate the feasibility of our approach, op- computing by contract. timisations to the model checking algorithm are added. This work explores automatic computerized con- We add naive caching and also perform advanced tracts for negotiating and controlling resource usage in caching for nested non-alternating fixed-point compu- a distributed system. Contracts express the terms under tations. which client and server promise to exchange resources, Finally, the usefulness of the work is demonstrated. such as processor time in exchange for money, using We leverage our theory by proving translations to sim- a constrained language which can be automatically in- pler logics that are in more widespread use. We then terpreted. A novel, distributed trust model is used to implement an executable theory for counterexample- enforce these promises, and this also supports trust del- guided abstraction refinement that also uses a SAT egation through cryptographic certificates. The model solver. We verify properties of a bus architecture in use is formally proved to have appropriate properties of in industry as well as a pedagogical arithmetic and logic safety and liveness, which ensure that cheats cannot unit. The benchmarks show an acceptable performance systematically gain resources by deceit, and that mu- penalty, and the results are correct by construction. tually profitable contracts continue to be supported. The contract framework has many applications, in UCAM-CL-TR-602 automating distributed services and in limiting the dis- ruptiveness of users’ programs. Applications such as Hasan Amjad: resource-constrained sandboxes, operating system mul- timedia support and automatic distribution of personal Model checking the AMBA protocol address book entries can all treat the user’s time as a scarce resource, to trade off computational costs in HOL against user distraction. Similarly, commercial Grid ser- September 2004, 27 pages, PDF vices can prioritise computations with contracts, while a cooperative service such as distributed composite Abstract: The Advanced Bus Architec- event detection can use contracts for detector place- ture (AMBA) is an open System-on-Chip bus protocol ment and load balancing. Thus the contract frame- for high-performance buses on low-power devices. In work provides a general purpose tool for managing dis- this report we implement a simple model of AMBA tributed computation, allowing participants to take cal- and use model checking and theorem proving to verify culated risks and rationally choose which contracts to latency, arbitration, coherence and deadlock freedom perform. properties of the implementation.

UCAM-CL-TR-601 UCAM-CL-TR-603

Hasan Amjad: Robin Milner: Combining model checking and Bigraphs whose names have theorem proving multiple locality September 2004, 131 pages, PDF September 2004, 15 pages, PDF PhD thesis (Trinity College, March 2004) Abstract: The previous definition of binding bigraphs Abstract: We implement a model checker for the modal is generalised so that local names may be located in mu-calculus as a derived rule in a fully expansive me- more than one region, allowing more succinct and flex- chanical theorem prover, without causing an unaccept- ible presentation of bigraphical reactive systems. This able performance penalty. report defines the generalisation, verifies that it retains We use a restricted form of a higher order logic relative pushouts, and introduces a new notion of bi- representation calculus for binary decision diagrams graph extension; this admits a wider class of parametric (BDDs) to interface the model checker to a high- reaction rules. Extension is shown to be well-behaved performance BDD engine. This is used with a for- algebraically; one consequence is that, as in the original malised theory of the modal mu-calculus (which we definition of bigraphs, discrete parameters are sufficient also develop) for model checking in which all steps to generate all reactions. of the algorithm are justified by fully expansive proof.

145 UCAM-CL-TR-604 Design rationale and language definition Andrei Serjantov: October 2004, 193 pages, PDF On the anonymity of anonymity systems Abstract: This paper studies key issues for distributed programming in high-level languages. We discuss the October 2004, 162 pages, PDF design space and describe an experimental language, PhD thesis (Queens’ College, March 2003) Acute, which we have defined and implemented. Acute extends an OCaml core to support dis- Abstract: Anonymity on the Internet is a property com- tributed development, deployment, and execution, al- monly identified with privacy of electronic communica- lowing type-safe interaction between separately-built tions. A number of different systems exist which claim programs. It is expressive enough to enable a wide vari- to provide anonymous email and web browsing, but ety of distributed infrastructure layers to be written as their effectiveness has hardly been evaluated in prac- simple library code above the byte-string network and tice. In this thesis we focus on the anonymity proper- persistent store APIs, disentangling the language run- ties of such systems. First, we show how the anonymity time from communication. of anonymity systems can be quantified, pointing out This requires a synthesis of novel and existing fea- flaws with existing metrics and proposing our own. In tures: the process we distinguish the anonymity of a message (1) type-safe marshalling of values between pro- and that of an anonymity system. grams; Secondly, we focus on the properties of building (2) dynamic loading and controlled rebinding to lo- blocks of mix-based (email) anonymity systems, eval- cal resources; uating their resistance to powerful blending attacks, (3) modules and abstract types with abstraction their delay, their anonymity under normal conditions boundaries that are respected by interaction; and other properties. This leads us to methods of com- (4) global names, generated either freshly or based puting anonymity for a particular class of mixes – timed on module hashes: at the type level, as runtime names mixes – and a new binomial mix. for abstract types; and at the term level, as channel Next, we look at the anonymity of a message going names and other interaction handles; through an entire anonymity system based on a mix (5) versions and version constraints, integrated with network architecture. We construct a semantics of a type identity; network with threshold mixes, define the information (6) local concurrency and thread thunkification; and observable by an attacker, and give a principled defini- (7) second-order polymorphism with a namecase tion of the anonymity of a message going through such construct. a network. We deal with the interplay among these features and We then consider low latency connection-based the core, and develop a semantic definition that tracks anonymity systems, giving concrete attacks and de- abstraction boundaries, global names, and hashes scribing methods of protection against them. In par- throughout compilation and execution, but which still ticular, we show that Peer-to-Peer anonymity systems admits an efficient implementation strategy. provide less anonymity against the global passive ad- versary than ones based on a “classic” architecture. UCAM-CL-TR-606 Finally, we give an account of how anonymity can be used in censorship resistant systems. These are de- signed to provide availability of documents, while fac- Nicholas Nethercote: ing threats from a powerful adversary. We show how Dynamic binary analysis and anonymity can be used to hide the identity of the servers where each of the documents are stored, thus making instrumentation them harder to remove from the system. November 2004, 177 pages, PDF PhD thesis (Trinity College, November 2004) UCAM-CL-TR-605 Abstract: Dynamic binary analysis (DBA) tools such Peter Sewell, James J. Leifer, as profilers and checkers help programmers create bet- Keith Wansbrough, Mair Allen-Williams, ter software. Dynamic binary instrumentation (DBI) Francesco Zappa Nardelli, Pierre Habouzit, frameworks make it easy to build new DBA tools. This Viktor Vafeiadis: dissertation advances the theory and practice of dy- namic binary analysis and instrumentation, with an em- Acute: High-level programming phasis on the importance of the use and support of metadata. language design for distributed The dissertation has three main parts. computation

146 The first part describes a DBI framework called Val- Abstract: This thesis studies the problem of reducing grind which provides novel features to support heavy- code size produced by an optimizing compiler. We de- weight DBA tools that maintain rich metadata, espe- velop the Value State Dependence Graph (VSDG) as cially location metadata—the shadowing of every reg- a powerful intermediate form. Nodes represent com- ister and memory location with a metavalue. Location putation, and edges represent value (data) and state metadata is used in shadow computation, a kind of (control) dependencies between nodes. The edges spec- DBA where every normal operation is shadowed by an ify a partial ordering of the nodes—sufficient ordering abstract operation. to maintain the I/O semantics of the source program, The second part describes three powerful DBA while allowing optimizers greater freedom to move tools. The first tool performs detailed cache profiling. nodes within the program to achieve better (smaller) The second tool does an old kind of dynamic analysis— code. Optimizations, both classical and new, transform bounds-checking—in a new way. The third tool pro- the graph through graph rewriting rules prior to code duces dynamic data flow graphs, a novel visualisation generation. Additional (semantically inessential) state that cuts to the essence of a program’s execution. All edges are added to transform the VSDG into a Control three tools were built with Valgrind, and rely on Val- Flow Graph, from which target code is generated. grind’s support for heavyweight DBA and rich meta- We show how procedural abstraction can be ad- data, and the latter two perform shadow computation. vantageously applied to the VSDG. Graph patterns are The third part describes a novel system of semi- extracted from a program’s VSDG. We then select re- formal descriptions of DBA tools. It gives many ex- peated patterns giving the greatest size reduction, gen- ample descriptions, and also considers in detail exactly erate new functions from these patterns, and replace all what dynamic analysis is. occurrences of the patterns in the original VSDG with The dissertation makes six main contributions. calls to these abstracted functions. Several embedded First, the descriptions show that metadata is the key processors have load- and store-multiple instructions, component of dynamic analysis; in particular, whereas representing several loads (or stores) as one instruction. static analysis predicts approximations of a program’s We present a method, benefiting from the VSDG form, future, dynamic analysis remembers approximations of for using these instructions to reduce code size by pro- a program’s past, and these approximations are exactly visionally combining loads and stores before code gen- what metadata is. eration. The final contribution of this thesis is a com- Second, the example tools show that rich metadata bined register allocation and code motion (RACM) al- and shadow computation make for powerful and novel gorithm. We show that our RACM algorithm formu- DBA tools that do more than the traditional tracing and lates these two previously antagonistic phases as one profiling. combined pass over the VSDG, transforming the graph Third, Valgrind and the example tools show that a (moving or cloning nodes, or spilling edges) to fit within DBI framework can make it easy to build heavyweight the physical resources of the target processor. DBA tools, by providing good support for rich meta- We have implemented our ideas within a prototype data and shadow computation. C compiler and suite of VSDG optimizers, generating Fourth, the descriptions are a precise and concise code for the Thumb 32-bit processor. Our results show way of characterising tools, provide a directed way of improvements for each optimization and that we can thinking about tools that can lead to better implemen- achieve code sizes comparable to, and in some cases tations, and indicate the theoretical upper limit of the better than, that produced by commercial compilers power of DBA tools in general. with significant investments in optimization technol- Fifth, the three example tools are interesting in their ogy. own right, and the latter two are novel. Finally, the entire dissertation provides many de- UCAM-CL-TR-608 tails, and represents a great deal of condensed expe- rience, about implementing DBI frameworks and DBA Walt Yao: tools. Trust management for widely UCAM-CL-TR-607 distributed systems Neil E. Johnson: November 2004, 191 pages, PDF PhD thesis (Jesus College, February 2003) Code size optimization for embedded processors Abstract: In recent years, we have witnessed the evolu- tionary development of a new breed of distributed sys- November 2004, 159 pages, PDF tems. Systems of this type share a number of charac- PhD thesis (Robinson College, May 2004) teristics – highly decentralized, of Internet-grade scala- bility, and autonomous within their administrative do- mains. Most importantly, they are expected to oper- ate collaboratively across both known and unknown

147 domains. Prime examples include peer-to-peer applica- Using camera-phones to interact with tions and open web services. Typically, authorization in context-aware mobile services distributed systems is identity-based, e.g. access control lists. However, approaches based on predefined iden- December 2004, 23 pages, PDF tities are unsuitable for the new breed of distributed systems because of the need to deal with unknown Abstract: We describe an interaction technique for con- users, i.e. strangers, and the need to manage a poten- trolling site-specific mobile services using commercially tially large number of users and/or resources. Further- available camera-phones, public information displays more, effective administration and management of au- and visual tags. We report results from an experimen- thorization in such systems requires: (1) natural map- tal study validating this technique in terms of pointing ping of organizational policies into security policies; (2) speed and accuracy. Our results show that even novices managing collaboration of independently administered can use camera-phones to “point-and-click” on visual domains/organizations; (3) decentralization of security tags quickly and accurately. We have built a publicly policies and policy enforcement. available client/server software framework for rapid de- This thesis describes Fidelis, a trust management velopment of applications that exploit our interaction framework designed to address the authorization needs technique. We describe two prototype applications that for the next-generation distributed systems. A trust were implemented using this framework and present management system is a term coined to refer to a uni- findings from user-experience studies based on these ap- fied framework for the specification of security poli- plications. cies, the representation of credentials, and the evalu- ation and enforcement of policy compliances. Based on UCAM-CL-TR-610 the concept of trust conveyance and a generic abstrac- tion for trusted information as trust statements, Fidelis provides a generic platform for building secure, trust- Tommy Ingulfsen: aware distributed applications. At the heart of the Fi- delis framework is a language for the specification of Influence of syntax on prosodic security policies, the Fidelis Policy Language (FPL), and boundary prediction the inference model for evaluating policies expressed in FPL. With the policy language and its inference model, December 2004, 49 pages, PDF Fidelis is able to model recommendation-style policies MPhil thesis (Churchill College, July 2004) and policies with arbitrarily complex chains of trust propagation. Abstract: In this thesis we compare the effectiveness Web services have rapidly been gaining significance of different syntactic features and syntactic represen- both in industry and research as a ubiquitous, next- tations for prosodic boundary prediction, setting out to generation middleware platform. The second half of the clarify which representations are most suitable for this thesis describes the design and implementation of the task. The results of a series of experiments show that it Fidelis framework for the standard web service plat- is not possible to conclude that a single representation form. The goal of this work is twofold: first, to demon- is superior to all others. Three representations give rise strate the practical feasibility of Fidelis, and second, to to similar experimental results. One of these representa- investigate the use of a policy-driven trust management tions is composed only of shallow features, which were framework for Internet-scale open systems. An impor- originally thought to have less predictive power than tant requirement in such systems is trust negotiation deep features. Conversely, one of the deep representa- that allows unfamiliar principals to establish mutual tions that seemed to be best suited for our purposes trust and interact with confidence. Addressing this re- (syntactic chunks) turns out not to be among the three quirement, a trust negotiation framework built on top best. of Fidelis is developed. This thesis examines the application of Fidelis in UCAM-CL-TR-611 three distinctive domains: implementing generic role- based access control, trust management in the World Neil A. Dodgson: Wide Web, and an electronic marketplace comprising unfamiliar and untrusted but collaborative organiza- An heuristic analysis of the tions. classification of bivariate subdivision UCAM-CL-TR-609 schemes December 2004, 18 pages, PDF Eleanor Toye, Anil Madhavapeddy, Richard Sharp, David Scott, Alan Blackwell, Eben Upton:

148 Abstract: Alexa [*] and Ivrissimtzis et al. [+] have enable location privacy. This dissertation takes a differ- proposed a classification mechanism for bivariate sub- ent approach and argues that many location-aware ap- division schemes. Alexa considers triangular primal plications can function with anonymised location data schemes, Ivrissimtzis et al. generalise this both to and that, where this is possible, its use is preferable to quadrilateral and hexagonal meshes and to dual and that of access control. mixed schemes. I summarise this classification and then Suitable anonymisation of location data is not a triv- proceed to analyse it in order to determine which ial task: under a realistic threat model simply remov- classes of subdivision scheme are likely to contain use- ing explicit identifiers does not anonymise location in- ful members. My aim is to ascertain whether there are formation. This dissertation describes why this is the any potentially useful classes which have not yet been case and develops two quantitative security models for investigated or whether we can say, with reasonable anonymising location data: the mix zone model and the confidence, that all of the useful classes have already variable quality model. been considered. I apply heuristics related to the map- A trusted third-party can use one, or both, models to pings of element types (vertices, face centres, and mid- ensure that all location events given to untrusted appli- edges) to one another, to the preservation of symme- cations are suitably anonymised. The mix zone model tries, to the alignment of meshes at different subdivision supports untrusted applications which require accu- levels, and to the size of the overall subdivision mask. rate location information about users in a set of dis- My conclusion is that there are only a small number of joint physical locations. In contrast, the variable quality useful classes and that most of these have already been model reduces the temporal or spatial accuracy of loca- investigated in terms of linear, stationary subdivision tion information to maintain user anonymity at every schemes. There is some space for further work, par- location. ticularly in the investigation of whether there are use- Both models provide a quantitative measure of the ful ternary linear, stationary subdivision schemes, but level of anonymity achieved; therefore any given situ- it appears that future advances are more likely to lie ation can be analysed to determine the amount of in- elsewhere. formation an attacker can gain through analysis of the [*] M. Alexa. Refinement operators for triangle anonymised data. The suitability of both these models meshes. Computer Aided Geometric Design, 19(3):169- is demonstrated and the level of location privacy avail- 172, 2002. able to users of real location-aware applications is mea- [+] I. P. Ivrissimtzis, N. A. Dodgson, and M. A. sured. Sabin. A generative classification of mesh refinement rules with lattice transformations. Computer Aided Ge- UCAM-CL-TR-613 ometric Design, 22(1):99-109, 2004. David J. Scott: UCAM-CL-TR-612 Abstracting application-level security Alastair R. Beresford: policy for ubiquitous computing Location privacy in ubiquitous January 2005, 186 pages, PDF computing PhD thesis (Robinson College, September 2004)

January 2005, 139 pages, PDF Abstract: In the future world of Ubiquitous Comput- PhD thesis (Robinson College, April 2004) ing, tiny embedded networked computers will be found in everything from mobile phones to microwave ovens. Abstract: The field of ubiquitous computing envisages Thanks to improvements in technology and software an era when the average consumer owns hundreds or engineering, these computers will be capable of run- thousands of mobile and embedded computing devices. ning sophisticated new applications constructed from These devices will perform actions based on the context mobile agents. Inevitably, many of these systems will of their users, and therefore ubiquitous systems will contain application-level vulnerabilities; errors caused gather, collate and distribute much more personal in- by either unanticipated mobility or interface behaviour. formation about individuals than computers do today. Unfortunately existing methods for applying security Much of this personal information will be considered policy – network firewalls – are inadequate to control private, and therefore mechanisms which allow users to and protect the hordes of vulnerable mobile devices. As control the dissemination of these data are vital. Loca- more and more critical functions are handled by these tion information is a particularly useful form of context systems, the potential for disaster is increasing rapidly. in ubiquitous computing, yet its unconditional distribu- To counter these new threats, this report champi- tion can be very invasive. ons the approach of using new application-level secu- This dissertation develops novel methods for pro- rity policy languages in combination to protect vul- viding location privacy in ubiquitous computing. Much nerable applications. Policies are abstracted from main of the previous work in this area uses access control to application code, facilitating both analysis and future

149 maintenance. As well as protecting existing applica- UCAM-CL-TR-615 tions, such policy systems can help as part of a security- aware design process when building new applications Evangelos Kotsovinos: from scratch. Three new application-level policy languages are Global public computing contributed each addressing a different kind of vulnera- bility. Firstly, the policy language MRPL allows the cre- January 2005, 229 pages, PDF ation of Mobility Restriction Policies, based on a uni- PhD thesis (Trinity Hall, November 2004) fied spatial model which represents both physical lo- cation of objects as well as virtual location of mobile Abstract: High-bandwidth networking and cheap com- code. Secondly, the policy language SPDL-2 protects puting hardware are leading to a world in which the re- applications against a large number of common errors sources of one machine are available to groups of users by allowing the specification of per-request/response beyond their immediate owner. This trend is visible in validation and transformation rules. Thirdly, the pol- many different settings. Distributed computing, where icy language SWIL allows interfaces to be described applications are divided into parts that run on differ- as automata which may be analysed statically by a ent machines for load distribution, geographical dis- model-checker before being checked dynamically in persion, or robustness, has recently found new fertile an application-level firewall. When combined together, ground. Grid computing promises to provide a com- these three languages provide an effective means for mon framework for scheduling scientific computation preventing otherwise critical application-level vulnera- and managing the associated large data sets. Proposals bilities. for utility computing envision a world in which busi- Systems implementing these policy languages have nesses rent computing bandwidth in server farms on- been built; an implementation framework is described demand instead of purchasing and maintaining servers and encouraging performance results and analysis are themselves. presented. All such architectures target particular user and ap- plication groups or deployment scenarios, where sim- UCAM-CL-TR-614 plifying assumptions can be made. They expect cen- tralised ownership of resources, cooperative users, and Robin Milner: applications that are well-behaved and compliant to a Pure bigraphs specific API or middleware. Members of the public who are not involved in Grid communities or wish to de- January 2005, 66 pages, PDF ploy out-of-the-box distributed services, such as game Abstract: Bigraphs are graphs whose nodes may be servers, have no means to acquire resources on large nested, representing locality, independently of the edges numbers of machines around the world to launch their connecting them. They may be equipped with reaction tasks. rules, forming a bigraphical reactive system (Brs) in This dissertation proposes a new distributed com- which bigraphs can reconfigure themselves. Brss aim puting paradigm, termed global public computing, to unify process calculi, and to model applications — which allows any user to run any code anywhere. such as pervasive computing— where locality and mo- Such platforms price computing resources, and ulti- bility are prominent. The paper is devoted to the theory mately charge users for resources consumed. This dis- of pure bigraphs, which underlie various more refined sertation presents the design and implementation of forms. It begins by developing a more abstract struc- the XenoServer Open Platform, putting this vision into ture, a wide reactive system Wrs, of which a Brs is an practice. The efficiency and scalability of the developed instance; in this context, labelled transitions are defined mechanisms are demonstrated by experimental evalua- in such a way that the induced bisimilarity is a congru- tion; the prototype platform allows the global-scale de- ence. ployment of complex services in less than 45 seconds, This work is then specialised to Brss, whose graph- and could scale to millions of concurrent sessions with- ical structure allows many refinements of the dynamic out presenting performance bottlenecks. theory. Elsewhere it is shown that behavioural analy- To facilitate global public computing, this work sis for Petri nets, π-calculus and mobile ambients can addresses several research challenges. It introduces all be recovered in the uniform framework of bigraphs. reusable mechanisms for representing, advertising, and The latter part of the paper emphasizes the parts of bi- supporting the discovery of resources. To allow flexi- graphical theory that are common to these applications, ble and federated control of resource allocation by all especially the treatment of dynamics via labelled tran- stakeholders involved, it proposes a novel role-based sitions. As a running example, the theory is applied to resource management framework for expressing and finite pure CCS, whose resulting transition system and combining distributed management policies. Further- bisimilarity are analysed in detail. more, it implements effective service deployment mod- The paper also discusses briefly the use of bigraphs els for launching distributed services on large numbers to model both pervasive computing and biological sys- of machines around the world easily, quickly, and effi- tems. ciently. To keep track of resource consumption and pass

150 charges on to consumers, it devises an accounting and Abstract: Opportunistic networks make use of human charging infrastructure. mobility and local forwarding in order to distribute data. Information can be stored and passed, taking ad- UCAM-CL-TR-616 vantage of the device mobility, or forwarded over a wireless link when an appropriate contact is met. Such Donnla Nic Gearailt: networks fall into the fields of mobile ad-hoc network- ing and delay-tolerant networking. In order to evalu- Dictionary characteristics in ate forwarding algorithms for these networks, accurate data is needed on the intermittency of connections. cross-language information retrieval In this paper, the inter-contact time between two February 2005, 158 pages, PDF transmission opportunities is observed empirically us- PhD thesis (Gonville and Caius College, February ing four distinct sets of data, two having been specifi- 2003) cally collected for this work, and two provided by other research groups. Abstract: In the absence of resources such a as suitable We discover that the distribution of inter-contact MT system, translation in Cross-Language Information time follows an approximate power law over a large Retrieval (CLIR) consists primarily of mapping query time range in all data sets. This observation is at odds terms to a semantically equivalent representation in the with the exponential decay expected by many currently target language. This can be accomplished by looking used mobility models. We demonstrate that opportunis- up each term in a simple bilingual dictionary. The main tic transmission schemes designed around these cur- problem here is deciding which of the translations pro- rent models have poor performance under approximate vided by the dictionary for each query term should power-law conditions, but could be significantly im- be included in the query translation. We tackled this proved by using limited redundant transmissions. problem by examining different characteristics of the system dictionary. We found that dictionary properties UCAM-CL-TR-618 such as scale (the average number of translations per term), translation repetition (providing the same trans- Mark R. Shinwell: lation for a term more than once in a dictionary entry, for example, for different senses of a term), and dictio- The Fresh Approach: nary coverage rate (the percentage of query terms for functional programming with names which the dictionary provides a translation) can have a profound effect on retrieval performance. Dictionary and binders properties were explored in a series of carefully con- trolled tests, designed to evaluate specific hypotheses. February 2005, 111 pages, PDF These experiments showed that (a) contrary to expec- PhD thesis (Queens’ College, December 2004) tation, smaller scale dictionaries resulted in better per- formance than large-scale ones, and (b) when appro- Abstract: This report concerns the development of a priately managed e.g. through strategies to ensure ad- language called Fresh Objective Caml, which is an ex- equate translational coverage, dictionary-based CLIR tension of the Objective Caml language providing facil- could perform as well as other CLIR methods discussed ities for the manipulation of data structures represent- in the literature. Our experiments showed that it is pos- ing syntax involving α-convertible names and binding sible to implement an effective CLIR system with no operations. resources other than the system dictionary itself, pro- After an introductory chapter which includes a sur- vided this dictionary is chosen with careful examina- vey of related work, we describe the Fresh Objective tion of its characteristics, removing any dependency on Caml language in detail. Next, we proceed to for- outside resources. malise a small core language which captures the essence of Fresh Objective Caml; we call this Mini-FreshML. UCAM-CL-TR-617 We provide two varieties of operational semantics for this language and prove them equivalent. Then in or- der to prove correctness properties of representations Augustin Chaintreau, Pan Hui, of syntax in the language we introduce a new vari- Jon Crowcroft, Christophe Diot, ety of domain theory called FM-domain theory, based Richard Gass, James Scott: on the permutation model of name binding from Pitts and Gabbay. We show how classical domain-theoretic Pocket Switched Networks: constructions—including those for the solution of re- Real-world mobility and its cursive domain equations—fall naturally into this set- ting, where they are augmented by new constructions consequences for opportunistic to handle name-binding. forwarding After developing the necessary domain theory, we demonstrate how it may be exploited to give a monadic February 2005, 26 pages, PDF

151 denotational semantics to Mini-FreshML. This seman- into account the characteristics of the processor and tics in itself is quite novel and demonstrates how a the workloads in order to improve the system-wide simple monad of continuations is sufficient to model throughput. I evaluate designs exploiting various levels dynamic allocation of names. We prove that our de- of processor-specific knowledge. notational semantics is computationally adequate with I finish by discussing alternative ways to exploit respect to the operational semantics—in other words, SMT processors. These include the partitioning onto equality of denotation implies observational equiva- separate simultaneous threads of applications and lence. After this, we show how the denotational seman- hardware interrupt handling. I present preliminary ex- tics may be used to prove our desired correctness prop- periments to evaluate the effectiveness of this tech- erties. nique. In the penultimate chapter, we examine the imple- mentation of Fresh Objective Caml, describing detailed UCAM-CL-TR-620 issues in the compiler and runtime systems. Then in the final chapter we close the report with a discussion of fu- Eleftheria Katsiri: ture avenues of research and an assessment of the work completed so far. Middleware support for

UCAM-CL-TR-619 context-awareness in distributed sensor-driven systems James R. Bulpin: February 2005, 176 pages, PDF Operating system support for PhD thesis (Clare College, January 2005) simultaneous multithreaded Abstract: Context-awareness concerns the ability of processors computing devices to detect, interpret and respond to aspects of the user’s local environment. Sentient Com- February 2005, 130 pages, PDF puting is a sensor-driven programming paradigm which PhD thesis (King’s College, September 2004) maintains an event-based, dynamic model of the en- vironment which can be used by applications in or- Abstract: Simultaneous multithreaded (SMT) proces- der to drive changes in their behaviour, thus achiev- sors are able to execute multiple application threads in ing context-awareness. However, primitive events, es- parallel in order to improve the utilisation of the pro- pecially those arising from sensors, e.g., that a user is at cessor’s execution resources. The improved utilisation position {x,y,z} are too low-level to be meaningful to provides a higher processor-wide throughput at the ex- applications. Existing models for creating higher-level, pense of the performance of each individual thread. more meaningful events, from low-level events, are in- Simultaneous multithreading has recently been in- sufficient to capture the user’s intuition about abstract corporated into the Intel Pentium 4 processor family as system state. Furthermore, there is a strong need for “Hyper-Threading”. While there is already basic sup- user-centred application development, without undue port for it in popular operating systems, that support programming overhead. Applications need to be cre- does not take advantage of any knowledge about the ated dynamically and remain functional independently characteristics of SMT, and therefore does not fully ex- of the distributed nature and heterogeneity of sensor- ploit the processor. driven systems, even while the user is mobile. Both is- SMT presents a number of challenges to operat- sues combined necessitate an alternative model for de- ing system designers. The threads’ dynamic sharing of veloping applications in a real-time, distributed sensor- processor resources means that there are complex per- driven environment such as Sentient Computing. formance interactions between threads. These interac- This dissertation describes the design and imple- tions are often unknown, poorly understood, or hard to mentation of the SCAFOS framework. SCAFOS has avoid. As a result such interactions tend to be ignored two novel aspects. Firstly, it provides powerful tools for leading to a lower processor throughput. inferring abstract knowledge from low-level, concrete In this dissertation I start by describing simultane- knowledge, verifying its correctness and estimating its ous multithreading and the hardware implementations likelihood. Such tools include Hidden Markov Mod- of it. I discuss areas of operating system support that els, a Bayesian Classifier, Temporal First-Order Logic, are either necessary or desirable. the theorem prover SPASS and the production system I present a detailed study of a real SMT processor, CLIPS. Secondly, SCAFOS provides support for sim- the Intel Hyper-Threaded Pentium 4, and describe the ple application development through the XML-based performance interactions between threads. I analyse the SCALA language. By introducing the new concept of results using information from the processor’s perfor- a generalised event, an abstract event, defined as a no- mance monitoring hardware. tification of changes in abstract system state, expres- Building on the understanding of the processor’s op- siveness compatible with human intuition is achieved eration gained from the analysis, I present a design when using SCALA. The applications that are created for an operating system process scheduler that takes

152 through SCALA are automatically integrated and op- raters’ comments, the system derives a notion of the erate seamlessly in the various heterogeneous compo- reputation for each rater, which is in turn fed back into nents of the context-aware environment even while the the model’s recursive scoring algorithm. We demon- user is mobile or when new entities or other applica- strate the convergence of this algorithm, and show the tions are added or removed in SCAFOS. effectiveness of the model’s ability to discriminate be- tween poor and strong raters. Then with a series of UCAM-CL-TR-621 threat models, we show how resilient this model is in terms of finding agreement, despite large collectives of Mark R. Shinwell, Andrew M. Pitts: malicious raters. Finally, in a practical example, we ap- ply the model to the academic peer review process in Fresh Objective Caml user manual order to show its versatility at establishing a ranking of rated objects. February 2005, 21 pages, PDF UCAM-CL-TR-623 Abstract: This technical report is the user manual for the Fresh Objective Caml system, which implements a functional programming language incorporating facili- Keith Wansbrough: ties for manipulating syntax involving names and bind- Simple polymorphic usage analysis ing operations. March 2005, 364 pages, PDF UCAM-CL-TR-622 PhD thesis (Clare Hall, March 2002)

Jorg¨ H. Lepler: Abstract: Implementations of lazy functional languages ensure that computations are performed only when Cooperation and deviation in they are needed, and save the results so that they are market-based resource allocation not repeated. This frees the programmer to describe so- lutions at a high level, leaving details of control flow to March 2005, 173 pages, PDF the compiler. PhD thesis (St John’s College, November 2004) This freedom however places a heavy burden on the compiler; measurements show that over 70% of these Abstract: This thesis investigates how business trans- saved results are never used again. A usage analysis that actions are enhanced through competing strategies for could statically detect values used at most once would economically motivated cooperation. To this end, it fo- enable these wasted updates to be avoided, and would cuses on the setting of a distributed, bilateral allocation be of great benefit. However, existing usage analyses protocol for electronic services and resources. Cooper- either give poor results or have been applied only to ative efforts like these are often threatened by transac- prototype compilers or toy languages. tion parties who aim to exploit their competitors by This thesis presents a sound, practical, type-based deviating from so-called cooperative goals. We anal- usage analysis that copes with all the language features yse this conflict between cooperation and deviation by of a modern functional language, including type poly- presenting the case of two novel market systems which morphism and user-defined algebraic data types, and use economic incentives to solve the complications that addresses a range of problems that have caused diffi- arise from cooperation. culty for previous analyses, including poisoning, mu- The first of the two systems is a pricing model which tual recursion, separate compilation, and partial ap- is designed to address the problematic resource mar- plication and usage dependencies. In addition to well- ket situation, where supply exceeds demand and per- typing rules, an inference algorithm is developed, with fect competition can make prices collapse to level zero. proofs of soundness and a complexity analysis. This pricing model uses supply functions to determine In the process, the thesis develops simple polymor- the optimal Nash-Equilibrium price. Moreover, in this phism, a novel approach to polymorphism in the pres- model the providers’ market estimations are updated ence of subtyping that attempts to strike a balance be- with information about each of their own transactions. tween pragmatic concerns and expressive power. This Here, we implement the protocol in a discrete event thesis may be considered an extended experiment into simulation, to show that the equilibrium prices are this approach, worked out in some detail but not yet above competitive levels, and to demonstrate that de- conclusive. viations from the pricing model are not profitable. The analysis described was designed in parallel with The second of the two systems is a reputation aggre- a full implementation in the Glasgow Haskell Compiler, gation model, which seeks the subgroup of raters that leading to informed design choices, thorough cover- (1) contains the largest degree of overall agreement and age of language features, and accurate measurements of (2) derives the resulting reputation scores from their its potential and effectiveness when used on real code. comments. In order to seek agreement, this model as- The latter demonstrate that the analysis yields moder- sumes that not all raters in the system are equally able ate benefit in practice. to foster an agreement. Based on the variances of the

153 UCAM-CL-TR-624 this may make it possible to prove properties about ex- ecutable implementations of those algorithms); and in Steve Bishop, Matthew Fairbairn, semantics and automated reasoning. Michael Norrish, Peter Sewell, Michael Smith, Keith Wansbrough: UCAM-CL-TR-625 TCP, UDP, and Sockets: Steve Bishop, Matthew Fairbairn, rigorous and experimentally-validated Michael Norrish, Peter Sewell, behavioural specification Michael Smith, Keith Wansbrough: Volume 1: Overview TCP, UDP, and Sockets: March 2005, 88 pages, PDF rigorous and experimentally-validated behavioural specification Abstract: We have developed a mathematically rigor- Volume 2: The Specification ous and experimentally-validated post-hoc specification of the behaviour of TCP, UDP, and the Sockets API. March 2005, 386 pages, PDF It characterises the API and network-interface inter- actions of a host, using operational semantics in the Abstract: See Volume 1 (UCAM-CL-TR-624). higher-order logic of the HOL automated proof assis- tant. The specification is detailed, covering almost all UCAM-CL-TR-626 the information of the real-world communications: it is in terms of individual TCP segments and UDP data- grams, though it abstracts from the internals of IP. It Meng How Lim, Adam Greenhalgh, has broad coverage, dealing with arbitrary API call se- Julian Chesterfield, Jon Crowcroft: quences and incoming messages, not just some well- behaved usage. It is also accurate, closely based on Landmark Guided Forwarding: the de facto standard of (three of) the widely-deployed A hybrid approach for Ad Hoc implementations. To ensure this we have adopted a novel experimental semantics approach, developing test routing generation tools and symbolic higher-order-logic model March 2005, 28 pages, PDF checking techniques that let us validate the specification directly against several thousand traces captured from Abstract: Wireless Ad Hoc network routing presents the implementations. some extremely challenging research problems, trying The resulting specification, which is annotated for to optimize parameters such as energy conservation vs the non-HOL-specialist reader, may be useful as an in- connectivity and global optimization vs routing over- formal reference for TCP/IP stack implementors and head scalability. In this paper we focus on the problems Sockets API users, supplementing the existing infor- of maintaining network connectivity in the presence of mal standards and texts. It can also provide a basis node mobility whilst providing globally efficient and for high-fidelity automated testing of future implemen- robust routing. The common approach among exist- tations, and a basis for design and formal proof of ing wireless Ad Hoc routing solutions is to establish a higher-level communication layers. More generally, the global optimal path between a source and a destination. work demonstrates that it is feasible to carry out sim- We argue that establishing a globally optimal path is ilar rigorous specification work at design-time for new both unreliable and unsustainable as the network diam- protocols. We discuss how such a design-for-test ap- eter, traffic volume, number of nodes all increase in the proach should influence protocol development, leading presence of moderate node mobility. To address this we to protocol specifications that are both unambiguous propose Landmark Guided Forwarding (LGF), a proto- and clear, and to high-quality implementations that can col that provides a hybrid solution of topological and be tested directly against those specifications. geographical routing algorithms. We demonstrate that This document (Volume 1) gives an overview of the LGF is adaptive to unstable connectivity and scalable project, discussing the goals and techniques and giving to large networks. Our results indicate therefore that an introduction to the specification. The specification Landmark Guided Forwarding converges much faster, itself is given in the companion Volume 2 (UCAM-CL- scales better and adapts well within a dynamic wireless TR-625), which is automatically typeset from the (ex- Ad Hoc environment in comparison to existing solu- tensively annotated) HOL source. As far as possible we tions. have tried to make the work accessible to four groups of intended readers: workers in networking (implemen- tors of TCP/IP stacks, and designers of new protocols); in distributed systems (implementors of software above the Sockets API); in distributed algorithms (for whom

154 UCAM-CL-TR-627 UCAM-CL-TR-629

Keith Vertanen: Meng How Lim, Adam Greenhalgh, Efficient computer interfaces Julian Chesterfield, Jon Crowcroft: using continuous gestures, Hybrid routing: A pragmatic language models, and speech approach to mitigating position uncertainty in geo-routing March 2005, 46 pages, PDF MPhil thesis (Darwin College, July 2004) April 2005, 26 pages, PDF

Abstract: Despite advances in speech recognition tech- Abstract: In recent years, research in wireless Ad Hoc nology, users of dictation systems still face a significant routing seems to be moving towards the approach of amount of work to correct errors made by the recog- position based forwarding. Amongst proposed algo- nizer. The goal of this work is to investigate the use of rithms, Greedy Perimeter Stateless Routing has gained a continuous gesture-based data entry interface to pro- recognition for guaranteed delivery with modest net- vide an efficient and fun way for users to correct recog- work overheads. Although this addresses the scaling nition errors. Towards this goal, techniques are investi- limitations with topological routing, it has limited toler- gated which expand a recognizer’s results to help cover ance for position inaccuracy or stale state reported by a recognition errors. Additionally, models are developed location service. Several researchers have demonstrated which utilize a speech recognizer’s n-best list to build that the inaccuracy of the positional system could have letter-based language models. a catastrophic effect on position based routing proto- cols. In this paper, we evaluate how the negative effects UCAM-CL-TR-628 of position inaccuracy can be countered by extending position based forwarding with a combination of re- Moritz Y. Becker: strictive topological state, adaptive route advertisement and hybrid forwarding. Our results show that a hybrid A formal security policy for an of the position and topology approaches used in Land- mark Guided Forwarding yields a high goodput and NHS electronic health record service timely packet delivery, even with 200 meters of posi- March 2005, 81 pages, PDF tion error.

Abstract: The ongoing NHS project for the develop- UCAM-CL-TR-630 ment of a UK-wide electronic health records service, also known as the ‘Spine’, raises many controversial Sergei P. Skorobogatov: issues and technical challenges concerning the security and confidentiality of patient-identifiable clinical data. Semi-invasive attacks – As the system will need to be constantly adapted to A new approach to hardware security comply with evolving legal requirements and guide- lines, the Spine’s authorisation policy should not be analysis hard-coded into the system but rather be specified in April 2005, 144 pages, PDF a high-level, general-purpose, machine-enforceable pol- PhD thesis (Darwin College, September 2004) icy language. We describe a complete authorisation policy for the Abstract: Semiconductor chips are used today not only Spine and related services, written for the trust man- to control systems, but also to protect them against agement system Cassandra, and comprising 375 for- security threats. A continuous battle is waged be- mal rules. The policy is based on the NHS’s Output- tween manufacturers who invent new security solu- based Specification (OBS) document and deals with tions, learning their lessons from previous mistakes, all requirements concerning access control of patient- and the hacker community, constantly trying to break identifiable data, including legitimate relationships, pa- implemented protections. Some chip manufacturers do tients restricting access, authenticated express consent, not pay enough attention to the proper design and test- third-party consent, and workgroup management. ing of protection mechanisms. Even where they claim their products are highly secure, they do not guaran- tee this and do not take any responsibility if a device is compromised. In this situation, it is crucial for the de- sign engineer to have a convenient and reliable method of testing secure chips. This thesis presents a wide range of attacks on hard- ware security in and smartcards. This

155 includes already known non-invasive attacks, such as detailed dynamics. While the common approach is to power analysis and glitching, and invasive attacks, such focus on performance evaluation of existing protocols as reverse engineering and microprobing. A new class using these models, we discuss protocol design oppor- of attacks – semi-invasive attacks – is introduced. Like tunities across layers in view of the simulation results. invasive attacks, they require depackaging the chip to get access to its surface. But the passivation layer re- UCAM-CL-TR-632 mains intact, as these methods do not require electri- cal contact to internal lines. Semi-invasive attacks stand R.I. Tucker, K. Sparck¨ Jones: between non-invasive and invasive attacks. They repre- sent a greater threat to hardware security, as they are Between shallow and deep: almost as effective as invasive attacks but can be low- cost like non-invasive attacks. an experiment in automatic This thesis’ contribution includes practical fault- summarising injection attacks to modify SRAM and EEPROM con- tent, or change the state of any individual CMOS tran- April 2005, 34 pages, PDF sistor on a chip. This leads to almost unlimited capabil- ities to control chip operation and circumvent protec- Abstract: This paper describes an experiment in au- tion mechanisms. A second contribution consist of ex- tomatic summarising using a general-purpose strategy periments on data remanence, which show that it is fea- based on a compromise between shallow and deep pro- sible to extract information from powered-off SRAM cessing. The method combines source text analysis into and erased EPROM, EEPROM and Flash memory de- simple logical forms with the use of a semantic graph vices. for representation and operations on the graph to iden- A brief introduction to copy protection in micro- tify summary content. controllers is given. Hardware security evaluation tech- The graph is based on predications extracted from niques using semi-invasive methods are introduced. the logical forms, and the summary operations apply They should help developers to make a proper selection three criteria, namely importance, representativeness, of components according to the required level of secu- and cohesiveness, in choosing node sets to form the rity. Various defence technologies are discussed, from content representation for the summary. This is used low-cost obscurity methods to new approaches in sili- in different ways for output summaries. The paper con design. presents the motivation for the strategy, details of the CLASP system, and the results of initial testing and evaluation on news material. UCAM-CL-TR-631 UCAM-CL-TR-633 Wenjun Hu, Jon Crowcroft: MIRRORS: An integrated framework Alex Ho, Steven Smith, Steven Hand: for capturing real world behaviour On deadlock, livelock, and forward for models of ad hoc networks progress April 2005, 16 pages, PDF May 2005, 8 pages, PDF

Abstract: The simulation models used in mobile ad hoc Abstract: Deadlock and livelock can happen at many network research have been criticised for lack of real- different levels in a distributed system. We unify both ism. While credited with ease of understanding and im- around the concept of forward progress and standstill. plementation, they are often based on theoretical mod- We describe a framework capable of detecting the lack els, rather than real world observations. Criticisms have of forward progress in distributed systems. Our pro- centred on radio propagation or mobility models. totype can easily solve traditional deadlock problems In this work, we take an integrated approach to where synchronization is via a customer network pro- modelling the real world that underlies a mobile ad tocol; however, many interesting research challenges re- hoc network. While pointing out the correlations be- main. tween the space, radio propagation and mobility mod- els, we use mobility as a focal point to propose a new UCAM-CL-TR-634 framework, MIRRORS, that captures real world be- haviour. We give the formulation of a specific model Kasim Rehman: within the framework and present simulation results that reflect topology properties of the networks syn- Visualisation, interpretation and use thesised. Compared with the existing models studied, of location-aware interfaces our model better represent real world topology prop- erties and presents a wider spectrum of variation in the May 2005, 159 pages, PDF metrics examined, due to the model encapsulating more PhD thesis (St Catharine’s College, November 2004)

156 Abstract: Ubiquitous Computing (Ubicomp), a term Abstract: Statistical results are presented for biometric coined by Mark Weiser in the early 1990’s, is about recognition of persons by their iris patterns, based on transparently equipping the physical environment and 200 billion cross-comparisons between different eyes. everyday objects in it with computational, sensing and The database consisted of 632,500 iris images acquired networking abilities. In contrast with traditional desk- in the Middle East, in a national border-crossing pro- top computing the “computer” moves into the back- tection programme that uses the Daugman algorithms ground, unobtrusively supporting users in their every- for iris recognition. A total of 152 different national- day life. ities were represented in this database. The set of ex- One of the instantiations of Ubicomp is location- haustive cross-comparisons between all possible pair- aware computing. Using location sensors, the “com- ings of irises in the database shows that with reasonable puter” reacts to changes in location of users and ev- acceptance thresholds, the False Match rate is less than eryday objects. Location changes are used to infer user 1 in 200 billion. Recommendations are given for the intent in order to give the user the most appropriate numerical decision threshold policy that would enable support for the task she is performing. Such support reliable identification performance on a national scale can consist of automatically providing information or in the UK. configuring devices and applications deemed adequate for the inferred user task. UCAM-CL-TR-636 Experience with these applications has uncovered a number of usability problems that stem from the Rana Ayman el Kaliouby: fact that the “computer” in this paradigm has become unidentifiable for the user. More specifically, these arise Mind-reading machines: from lack of feedback from, loss of user control over, and the inability to provide a conceptual model of the automated inference of complex “computer”. mental states Starting from the proven premise that feedback is indispensable for smooth human-machine interaction, July 2005, 185 pages, PDF a system that uses Augmented Reality in order to visu- PhD thesis (Newnham College, March 2005) ally provide information about the state of a location- aware environment and devices in it, is designed and Abstract: People express their mental states all the time, implemented. even when interacting with machines. These mental Augmented Reality (AR) as it is understood for states shape the decisions that we make, govern how we the purpose of this research uses a see-through head- communicate with others, and affect our performance. mounted display, trackers and 3-dimensional (3D) The ability to attribute mental states to others from graphics in order to give users the illusion that 3- their behaviour, and to use that knowledge to guide dimensional graphical objects specified and generated one’s own actions and predict those of others is known on a computer are actually located in the real world. as theory of mind or mind-reading. The system described in this thesis can be called The principal contribution of this dissertation is the a Graphical User Interface (GUI) for a physical envi- real time inference of a wide range of mental states from ronment. Properties of GUIs for desktop environments head and facial displays in a video stream. In particular, are used as a valuable resource in designing a software the focus is on the inference of complex mental states: architecture that supports interactivity in a location- the affective and cognitive states of mind that are not aware environment, understanding how users might part of the set of basic emotions. The automated men- conceptualise the “computer” and extracting design tal state inference system is inspired by and draws on principles for visualisation in a Ubicomp environment. the fundamental role of mind-reading in communica- Most importantly this research offers a solution to tion and decision-making. fundamental interaction problems in Ubicomp envi- The dissertation describes the design, implementa- ronments. In doing so this research presents the next tion and validation of a computational model of mind- step from reactive environments to interactive environ- reading. The design is based on the results of a number ments. of experiments that I have undertaken to analyse the fa- cial signals and dynamics of complex mental states. The UCAM-CL-TR-635 resulting model is a multi-level probabilistic graphical model that represents the facial events in a raw video stream at different levels of spatial and temporal ab- John Daugman: straction. Dynamic Bayesian Networks model observ- Results from 200 billion iris able head and facial displays, and corresponding hid- den mental states over time. cross-comparisons The automated mind-reading system implements the model by combining top-down predictions of men- June 2005, 8 pages, PDF tal state models with bottom-up vision-based process- ing of the face. To support intelligent human-computer interaction, the system meets three important criteria.

157 These are: full automation so that no manual prepro- Finally, we draw some conclusions and present possible cessing or segmentation is required, real time execution, directions for future research. and the categorization of mental states early enough af- ter their onset to ensure that the resulting knowledge is UCAM-CL-TR-638 current and useful. The system is evaluated in terms of recognition ac- Piotr Zielinski:´ curacy, generalization and real time performance for six broad classes of complex mental states—agreeing, con- Optimistic Generic Broadcast centrating, disagreeing, interested, thinking and unsure, on two different corpora. The system successfully clas- July 2005, 22 pages, PDF sifies and generalizes to new examples of these classes with an accuracy and speed that are comparable to that Abstract: We consider an asynchronous system with the of human recognition. Ω failure detector, and investigate the number of com- The research I present here significantly advances munication steps required by various broadcast pro- the nascent ability of machines to infer cognitive- tocols in runs in which the leader does not change. affective mental states in real time from nonverbal ex- Atomic Broadcast, used for example in state machine pressions of people. By developing a real time system replication, requires three communication steps. Opti- for the inference of a wide range of mental states be- mistic Atomic Broadcast requires only two steps if all yond the basic emotions, I have widened the scope correct processes receive messages in the same order. of human-computer interaction scenarios in which this Generic Broadcast requires two steps if no messages technology can be integrated. This is an important step conflict. We present an algorithm that subsumes both towards building socially and emotionally intelligent of these approaches and guarantees two-step delivery if machines. all conflicting messages are received in the same order, and three-step delivery otherwise. Internally, our proto- UCAM-CL-TR-637 col uses two new algorithms. First, a Consensus algo- rithm which decides in one communication step if all Shishir Nagaraja, Ross Anderson: proposals are the same, and needs two steps otherwise. Second, a method that allows us to run infinitely many The topology of covert conflict instances of a distributed algorithm, provided that only finitely many of them are different. We assume that July 2005, 15 pages, PDF fewer than a third of all processes are faulty (n > 3f).

Abstract: Often an attacker tries to disconnect a net- UCAM-CL-TR-639 work by destroying nodes or edges, while the defender counters using various resilience mechanisms. Exam- ples include a music industry body attempting to close Chris Purcell, Tim Harris: down a peer-to-peer file-sharing network; medics at- Non-blocking hashtables with tempting to halt the spread of an infectious disease by selective vaccination; and a police agency trying to open addressing decapitate a terrorist organisation. Albert, Jeong and September 2005, 23 pages, PDF Barabasi´ famously analysed the static case, and showed that vertex-order attacks are effective against scale-free networks. We extend this work to the dynamic case by Abstract: We present the first non-blocking hashtable developing a framework based on evolutionary game based on open addressing that provides the following theory to explore the interaction of attack and defence benefits: it combines good cache locality, accessing a strategies. We show, first, that naive defences don’t single cacheline if there are no collisions, with short work against vertex-order attack; second, that defences straight-line code; it needs no storage overhead for based on simple redundancy don’t work much better, pointers and memory allocator schemes, having instead but that defences based on cliques work well; third, that an overhead of two words per bucket; it does not need attacks based on centrality work better against clique to periodically reorganise or replicate the table; and it defences than vertex-order attacks do; and fourth, that does not need garbage collection, even with arbitrary- defences based on complex strategies such as delega- sized keys. Open problems include resizing the table tion plus clique resist centrality attacks better than sim- and replacing, rather than erasing, entries. The result ple clique defences. Our models thus build a bridge be- is a highly-concurrent set algorithm that approaches or tween network analysis and evolutionary game theory, outperforms the best externally-chained implementa- and provide a framework for analysing defence and at- tions we tested, with fixed memory costs and no need to tack in networks where topology matters. They suggest select or fine-tune a garbage collector or locking strat- definitions of efficiency of attack and defence, and may egy. even explain the evolution of insurgent organisations from networks of cells to a more virtual leadership that facilitates operations rather than directing them.

158 UCAM-CL-TR-640 phone identification and to key management in pay- TV set-top boxes, while secure microcontrollers were Feng Hao, Ross Anderson, John Daugman: used in remote key entry devices for cars. In the last five years, dedicated crypto chips have been embedded Combining cryptography with in devices from games console accessories to printer ink cartridges, to control product and accessory aftermar- biometrics effectively kets. The ‘Trusted Computing’ initiative will soon em- July 2005, 17 pages, PDF bed cryptoprocessors in PCs so that they can identify each other remotely. Abstract: We propose the first practical and secure way This paper surveys the range of applications of to integrate the iris biometric into cryptographic appli- tamper-resistant hardware, and the array of attack and cations. A repeatable binary string, which we call a bio- defence mechanisms which have evolved in the tamper- metric key, is generated reliably from genuine iris codes. resistance arms race. A well-known difficulty has been how to cope with the 10 to 20% of error bits within an iris code and derive UCAM-CL-TR-642 an error-free key. To solve this problem, we carefully studied the error patterns within iris codes, and devised Gavin Bierman, Alisdair Wren: a two-layer error correction technique that combines Hadamard and Reed-Solomon codes. The key is gener- First-class relationships in an ated from a subject’s iris image with the aid of auxiliary object-oriented language error-correction data, which do not reveal the key, and can be saved in a tamper-resistant token such as a smart August 2005, 53 pages, PDF card. The reproduction of the key depends on two fac- tors: the iris biometric and the token. The attacker has Abstract: In this paper we investigate the addition to procure both of them to compromise the key. We of first-class relationships to a prototypical object- evaluated our technique using iris samples from 70 dif- oriented programming language (a “middleweight” ferent eyes, with 10 samples from each eye. We found fragment of Java). We provide language-level con- that an error-free key can be reproduced reliably from structs to declare relationships between classes and to genuine iris codes with a 99.5% success rate. We can manipulate relationship instances. We allow relation- generate up to 140 bits of biometric key, more than ships to have attributes and provide a novel notion enough for 128-bit AES. The extraction of a repeatable of relationship inheritance. We formalize our language binary string from biometrics opens new possible ap- giving both the type system and operational semantics plications, where a strong binding is required between and prove certain key safety properties. a person and cryptographic operations. For example, it is possible to identify individuals without maintain- UCAM-CL-TR-643 ing a central database of biometric templates, to which privacy objections might be raised. Nathan E. Dimmock: UCAM-CL-TR-641 Using trust and risk for access control in Global Computing Ross Anderson, Mike Bond, Jolyon Clulow, Sergei Skorobogatov: August 2005, 145 pages, PDF PhD thesis (Jesus College, April 2005) Cryptographic processors – a survey Abstract: Global Computing is a vision of a massively networked infrastructure supporting a large population August 2005, 19 pages, PDF of diverse but cooperating entities. Similar to ubiqui- tous computing, entities of global computing will op- Abstract: Tamper-resistant cryptographic processors erate in environments that are dynamic and unpre- are becoming the standard way to enforce data-usage dictable, requiring them to be capable of dealing with policies. Their history began with military cipher ma- unexpected interactions and previously unknown prin- chines, and hardware security modules used to encrypt cipals using an unreliable infrastructure. the PINs that bank customers use to authenticate them- These properties will pose new security challenges selves to ATMs. In both cases, the designers wanted to that are not adequately addressed by existing security prevent abuse of data and key material should a de- models and mechanisms. Traditionally privileges are vice fall into the wrong hands. From these specialist statically encoded as security policy, and while role-ˆ beginnings, cryptoprocessors spread into devices such based access control introduces a layer of abstraction as prepayment electricity meters, and the vending ma- between privilege and identity, roles,ˆ privileges and con- chines that sell credit for them. In the 90s, tamper- text must still be known in advance of any interaction resistant smartcards became integral to GSM mobile taking place.

159 Human society has developed the mechanism of Jolyon Clulow, Jonathan Herzog, trust to overcome initial suspicion and gradually Amerson Lin, Ronald L. Rivest, evolve privileges. Trust successfully enables collabora- Ross Anderson: tion amongst human agents — a computational model of trust ought to be able to enable the same in compu- Robbing the bank with a theorem tational agents. Existing research in this area has con- centrated on developing trust management systems that prover permit the encoding of, and reasoning about, trust be- August 2005, 26 pages, PDF liefs, but the relationship between these and privilege is still hard coded. These systems also omit any explicit Abstract: We present the first methodology for analy- reasoning about risk, and its relationship to privilege, sis and automated detection of attacks on security ap- nor do they permit the automated evolution of trust plication programming interfaces (security APIs) – the over time. interfaces to hardware cryptographic services used by This thesis examines the relationship between trust, developers of critical security systems, such as banking risk and privilege in an access control system. An applications. Taking a cue from previous work on the outcome-based approach is taken to risk modelling, us- formal analysis of security protocols, we model APIs ing explicit costs and benefits to model the relationship purely according to specifications, under the assump- between risk and privilege. This is used to develop a tion of ideal encryption primitives. We use a theorem novel model of access control — trust-based access con- prover tool and adapt it to the security API context. trol (TBAC) — firstly for the limited domain of collabo- We develop specific formalization and automation tech- ration between Personal Digital Assistants (PDAs), and niques that allow us to fully harness the power of a the- later for more general global computing applications orem prover. We show how, using these techniques, we using the SECURE computational trust framework. were able to automatically re-discover all of the pure This general access control model is also used to ex- API attacks originally documented by Bond and An- tend an existing role-basedˆ access control system to ex- derson against banking payment networks, since their plicitly reason about trust and risk. A further refine- discovery of this type of attack in 2000. We conclude ment is the incorporation of the economic theory of with a note of encouragement: the complexity and un- decision-making under uncertainty by expressing costs intuiveness of the modelled attacks make a very strong and benefits as utility, or preference-scaling, functions. case for continued focus on automated formal analysis It is then shown how Bayesian trust models can be used of cryptographic APIs. in the SECURE framework, and how these models en- able a better abstraction to be obtained in the access control policy. It is also shown how the access control UCAM-CL-TR-645 model can be used to take such decisions as whether the cost of seeking more information about a princi- Frank Stajano: pal is justified by the risk associated with granting the privilege, and to determine whether a principal should RFID is X-ray vision respond to such requests upon receipt. The use of game August 2005, 10 pages, PDF theory to help in the construction of policies is also briefly considered. Abstract: Making RFID tags as ubiquitous as barcodes Global computing has many applications, all of will enable machines to see and recognize any tagged which require access control to prevent abuse by ma- object in their vicinity, better than they ever could with licious principals. This thesis develops three in detail: the smartest image processing algorithms. This opens an information sharing service for PDAs, an identity- many opportunities for “sentient computing” applica- based spam detector and a peer-to-peer collaborative tions. spam detection network. Given the emerging nature of However, in so far as this new capability has some computational trust systems, in order to evaluate the ef- of the properties of X-ray vision, it opens the door to fectiveness of the TBAC model, it was first necessary to abuses. To promote discussion, I won’t elaborate on develop an evaluation methodology. This takes the ap- low level technological solutions; I shall instead discuss proach of a threat-based analysis, considering possible a simple security policy model that addresses most of attacks at the component and system level, to ensure the privacy issues. Playing devil’s advocate, I shall also that components are correctly integrated, and system- indicate why it is currently unlikely that consumers will level assumptions made by individual components are enjoy the RFID privacy that some of them vociferously valid. Applying the methodology to the implementa- demand. tion of the TBAC model demonstrates its effectiveness in the scenarios chosen, with good promise for further, untested, scenarios.

UCAM-CL-TR-644 Paul Youn, Ben Adida, Mike Bond,

160 UCAM-CL-TR-647 There has been a lack of real-world examples of complex security policies: our NPfIT case study fills this Sam Staton: gap. The resulting Cassandra policy (with 375 rules) demonstrates that the policy language is expressive An agent architecture for simulation enough for a real-world application. We thus demon- strate that a general-purpose trust management system of end-users in programming-like can be designed to be highly flexible, expressive, for- tasks mally founded and meet the complex requirements of real-world applications. October 2005, 12 pages, PDF UCAM-CL-TR-649 Abstract: We present some motivation and technical details for a software simulation of an end-user per- Mark Grundland, Neil A. Dodgson: forming programming-like tasks. The simulation uses an agent/agenda model by breaking tasks down into The decolorize algorithm for subgoals, based on work of A. Blackwell. This docu- ment was distributed at the CHI 2002 workshop on contrast enhancing, color to Cognitive Models of Programming-Like Processes. grayscale conversion

UCAM-CL-TR-648 October 2005, 15 pages, PDF Abstract: We present a new contrast enhancing color Moritz Y. Becker: to grayscale conversion algorithm which works in real- Cassandra: flexible trust management time. It incorporates novel techniques for image sam- pling and dimensionality reduction, sampling color dif- and its application to electronic ferences by Gaussian pairing and analyzing color dif- health records ferences by predominant component analysis. In addi- tion to its speed and simplicity, the algorithm has the October 2005, 214 pages, PDF advantages of continuous mapping, global consistency, PhD thesis (Trinity College, September 2005) and grayscale preservation, as well as predictable lu- minance, saturation, and hue ordering properties. We Abstract: The emergence of distributed applications op- give an extensive range of examples and compare our erating on large-scale, heterogeneous and decentralised method with other recently published algorithms. networks poses new and challenging problems of con- cern to society as a whole, in particular for data secu- UCAM-CL-TR-650 rity, privacy and confidentiality. Trust management and authorisation policy languages have been proposed to Rashid Mehmood, Jon Crowcroft: address access control and authorisation in this con- text. Still, many key problems have remained unsolved. Parallel iterative solution method for Existing systems are often not expressive enough, or are large sparse linear equation systems so expressive that access control becomes undecidable; their semantics is not formally specified; and they have October 2005, 22 pages, PDF not been shown to meet the requirements set by actual real-world applications. Abstract: Solving sparse systems of linear equations This dissertation addresses these problems. We is at the heart of scientific computing. Large sparse present Cassandra, a role-based language and system systems often arise in science and engineering prob- for expressing authorisation policy, and the results of a lems. One such problem we consider in this paper is substantial case study, a policy for a national electronic the steady-state analysis of Continuous Time Markov health record (EHR) system, based on the requirements Chains (CTMCs). CTMCs are a widely used formalism of the UK National Health Service’s National Pro- for the performance analysis of computer and commu- gramme for Information Technology (NPfIT). nication systems. A large variety of useful performance Cassandra policies are expressed in a language de- measures can be derived from a CTMC via the com- rived from Datalog with constraints. Cassandra sup- putation of its steady-state probabilities. A CTMC may ports credential-based authorisation (eg between ad- be represented by a set of states and a transition rate ministrative domains), and rules can refer to remote matrix containing state transition rates as coefficients, policies (for credential retrieval and trust negotiation). and can be analysed using probabilistic model check- The expressiveness of the language (and its computa- ing. However, CTMC models for realistic systems are tional complexity) can be tuned by choosing an appro- very large. We address this largeness problem in this priate constraint domain. The language is small and has paper, by considering parallelisation of symbolic meth- a formal semantics for both query evaluation and the ods. In particular, we consider Multi-Terminal Binary access control engine. Decision Diagrams (MTBDDs) to store CTMCs, and,

161 using Jacobi iterative method, present a parallel method UCAM-CL-TR-652 for the CTMC steady-state solution. Employing a 24- node processor bank, we report results of the sparse Roongroj Nopsuwanchai: systems with over a billion equations and eighteen bil- lion nonzeros. Discriminative training methods and their applications to handwriting UCAM-CL-TR-651 recognition Rob Hague: November 2005, 186 pages, PDF PhD thesis (Downing College, August 2004) End-user programming in multiple Abstract: This thesis aims to improve the performance languages of handwriting recognition systems by introducing the use of discriminative training methods. Discriminative October 2005, 122 pages, PDF training methods use data from all competing classes PhD thesis (Fitzwilliam College, July 2004) when training the recogniser for each class. We de- velop discriminative training methods for two popu- Abstract: Advances in user interface technology have lar classifiers: Hidden Markov Models (HMMs) and removed the need for the majority of users to program, a prototype-based classifier. At the expense of addi- but they do not allow the automation of repetitive or in- tional computations in the training process, discrimi- direct tasks. End-user programming facilities solve this native training has demonstrated significant improve- problem without requiring users to learn and use a con- ments in recognition accuracies from the classifiers that ventional programming language, but must be tailored are not discriminatively optimised. Our studies focus to specific types of end user. In situations where the user on isolated character recognition problems with an em- population is particularly diverse, this presents a prob- phasis on, but not limited to, off-line handwritten Thai lem. characters. In addition, studies have shown that the perfor- The thesis is organised as followed. First, we de- mance of tasks based on the manipulation and inter- velop an HMM-based classifier that employs a Maxi- pretation of data depends on the way in which the mum Mutual Information (MMI) discriminative train- data is represented. Different representations may facil- ing criterion. HMMs have an increasing number of ap- itate different tasks, and there is not necessarily a sin- plications to character recognition in which they are gle, optimal representation that is best for all tasks. In usually trained by Maximum Likelihood (ML) using many cases, the choice of representation is also con- the Baum-Welch algorithm. However, ML training does strained by other factors, such as display size. It would not take into account the data of other competing cat- be advantageous for an end-user programming system egories, and thus is considered non-discriminative. By to provide multiple, interchangeable representations of contrast, MMI provides an alternative training method programs. with the aim of maximising the mutual information This dissertation describes an architecture for pro- between the data and their correct categories. One of viding end-user programming facilities in the net- our studies highlights the efficiency of MMI training worked home, a context with a diverse user popula- that improves the recognition results from ML train- tion, and a wide variety of input and output devices. ing, despite being applied to a highly constrained sys- The Media Cubes language, a novel end-user program- tem (tied-mixture density HMMs). Various aspects of ming language, is introduced as the context that lead MMI training are investigated, including its optimisa- to the development of the architecture. A framework tion algorithms and a set of optimised parameters that for translation between languages via a common inter- yields maximum discriminabilities. mediate form is then described, with particular atten- Second, a system for Thai handwriting recognition tion paid to the requirements of mappings between lan- based on HMMs and MMI training is introduced. In guages and the intermediate form. The implementation addition, novel feature extraction methods using block- of Lingua Franca, a system realizing this framework in based PCA and composite images are proposed and the given context, is described. evaluated. A technique to improve generalisation of Finally, the system is evaluated by considering sev- the MMI-trained systems and the use of N-best lists eral end-user programming languages implemented to efficiently compute the probabilities are described. within this system. It is concluded that translation be- By applying these techniques, the results from exten- tween programming languages, via a common interme- sive experiments are compelling, showing up to 65% diate form, is viable for systems within a limited do- relative error reduction, compared to conventional ML main, and the wider applicability of the technique is training without the proposed features. The best results discussed. are comparable to those achieved by other high perfor- mance systems. Finally, we focus on the Prototype-Based Mini- mum Error Classifier (PBMEC), which uses a discrim- inative Minimum Classification Error (MCE) training

162 method to generate the prototypes. MCE tries to min- Finally, I consider a content-blocking system with a imise recognition errors during the training process us- hybrid design that has been deployed by a UK Internet ing data from all classes. Several key findings are re- Service Provider to inhibit access to child pornography. vealed, including the setting of smoothing parameters I demonstrate that the two-level design can be circum- and a proposed clustering method that are more suit- vented at either level, that content providers can use the able for PBMEC than using the conventional methods. first level to attack the second, and that the selectivity These studies reinforce the effectiveness of discrimina- of the first level can be used as an “oracle” to extract a tive training and are essential as a foundation for its ap- list of the sites being blocked. Although many of these plication to the more difficult problem of cursive hand- attacks can be countered, there is an underlying fail- writing recognition. ure that cannot be fixed. The system’s database holds details of the traceability of content, as viewed from a UCAM-CL-TR-653 single location at a single time. However, a blocking system may be deployed at many sites and must track Richard Clayton: content as it moves in space and time; functions which traceability, as currently realized, cannot deliver. Anonymity and traceability in UCAM-CL-TR-654 cyberspace Matthew J. Parkinson: November 2005, 189 pages, PDF PhD thesis (Darwin College, August 2005) Local reasoning for Java November 2005, 120 pages, PDF Abstract: Traceability is the ability to map events in PhD thesis (Churchill College, August 2005) cyberspace, particularly on the Internet, back to real- world instigators, often with a view to holding them ac- Abstract: This thesis develops the local reasoning ap- countable for their actions. Anonymity is present when proach of separation logic for common forms of modu- traceability fails. larity such as abstract datatypes and objects. In partic- I examine how traceability on the Internet actually ular, this thesis focuses on the modularity found in the works, looking first at a classical approach from the Java programming language. late 1990s that emphasises the roleˆ of activity logging We begin by developing a formal semantics for and reporting on the failures that are known to oc- a core imperative subset of Java, Middleweight Java cur. Failures of traceability, with consequent uninten- (MJ), and then adapt separation logic to reason about tional anonymity, have continued as the technology has this subset. However, a naive adaption of separation changed. I present an analysis that ascribes these fail- logic is unable to reason about encapsulation or inheri- ures to the mechanisms at the edge of the network be- tance: it provides no support for modularity. ing inherently inadequate for the burden that traceabil- First, we address the issue of encapsulation with the ity places upon them. The underlying reason for this novel concept of an abstract predicate, which is the log- continuing failure is a lack of economic incentives for ical analogue of an abstract datatype. We demonstrate improvement. The lack of traceability at the edges is how this method can encapsulate state, and provide a further illustrated by a new method of stealing another mechanism for ownership transfer: the ability to trans- person’s identity on an Ethernet Local Area Network fer state safely between a module and its client. We also that existing tools and procedures would entirely fail show how abstract predicates can be used to express to detect. the calling protocol of a class. Preserving activity logs is seen, especially by Gov- However, the encapsulation provided by abstract ernments, as essential for the traceability of illegal cy- predicates is too restrictive for some applications. In berspace activity. I present a new and efficient method particular, it cannot reason about multiple datatypes of processing email server logs to detect machines send- that have shared read-access to state, for example list ing bulk unsolicited email “spam” or email infected iterators. To compensate, we alter the underlying model with “viruses”. This creates a clear business purpose to allow the logic to express properties about read-only for creating logs, but the new detector is so effective references to state. Additionally, we provide a model that the logs can be discarded within days, which may that allows both sharing and disjointness to be ex- hamper general traceability. pressed directly in the logic. Preventing spam would be far better than tracing its Finally, we address the second modularity issue: in- origin or detecting its transmission. Many analyse spam heritance. We do this by extending the concept of ab- in economic terms, and wish to levy a small charge stract predicates to abstract predicate families. This ex- for sending each email. I consider an oft-proposed ap- tension allows a predicate to have multiple definitions proach using computational “proof-of-work” that is that are indexed by class, which allows subclasses to elegant and anonymity preserving. I show that, in a have a different internal representation while remaining world of high profit margins and insecure end-user ma- behavioural subtypes. We demonstrate the usefulness of chines, it is impossible to find a payment level that stops this concept by verifying a use of the visitor design pat- the spam without affecting legitimate usage of email. tern.

163 UCAM-CL-TR-655 Abstract: The aim of this research is to present a new methodology for the systematic design of compound Karen Sparck¨ Jones: protocols from their parts. Some security properties can be made accumulative, i.e. can be put together without Wearing proper combinations interfering with one another, by carefully selecting the mechanisms which implement them. Among them are November 2005, 27 pages, PDF authentication, secrecy and non-repudiation. Based on this observation, a set of accumulative protocol mecha- Abstract: This paper discusses the proper treatment of nisms called protocol primitives are proposed and their multiple indexing fields, representations, or streams, in correctness is verified. These protocol primitives are ob- document retrieval. Previous experiments by Robertson tained from common mechanisms found in many se- and his colleagues have shown that, with a widely used curity protocols such as challenge and response. They type of term weighting and fields that share keys, docu- have been carefully designed not to interfere with each ment scores should be computed using term frequencies other. This feature makes them flexible building blocks over fields rather than by combining field scores. Here in the proposed methodology. Equipped with these pro- I examine a wide range of document and query index- tocol primitives, a scheme for the systematic construc- ing situations, and consider their implications for this tion of a complicated protocol from simple protocol approach to document scoring. primitives is presented, namely, design by composition. This design scheme allows the combination of several UCAM-CL-TR-656 simple protocol parts into a complicated protocol with- out destroying the security properties established by Pablo Vidales: each independent part. In other words, the composition framework permits the specification of a complex pro- Seamless mobility in 4G systems tocol to be decomposed into the specifications of sim- pler components, and thus makes the design and verifi- November 2005, 141 pages, PDF cation of the protocol easier to handle. Benefits of this PhD thesis (Girton College, May 2005) approach are similar to those gained when using a mod- ular approach to software development. Abstract: The proliferation of radio access technolo- The applicability and practicality of the proposed gies, wireless networking devices, and mobile services methodology are validated through many design exam- has encouraged intensive nomadic computing activity. ples of protocols found in many different environments When travelling, mobile users experience connectivity and with various initial assumptions. The method is not disturbances, particularly when they handoff between aimed to cover all existent design issues, but a reason- two access points that belong to the same wireless net- able range of protocols is addressed. work and when they change from one access tech- nology to another. Nowadays, an average mobile user UCAM-CL-TR-658 might connect to many different wireless networks in the course of a day to obtain diverse services, whilst de- Carsten Moenning: manding transparent operation. Current protocols of- fer portability and transparent mobility. However, they Intrinsic point-based surface fail to cope with huge delays caused by different link- layer characteristics when roaming between indepen- processing dent disparate networks. In this dissertation, I address January 2006, 166 pages, PDF this deficiency by introducing and evaluating practical PhD thesis (Queens’ College, January 2005) methods and solutions that minimise connection dis- ruptions and support transparent mobility in future Abstract: The need for the processing of surface ge- communication systems. ometry represents an ubiquitous problem in computer graphics and related disciplines. It arises in numer- UCAM-CL-TR-657 ous important applications such as computer-aided de- sign, reverse engineering, rapid prototyping, medical Hyun-Jin Choi: imaging, cultural heritage acquisition and preservation, video gaming and the movie industry. Existing surface Security protocol design by processing techniques predominantly follow an extrin- sic approach using combinatorial mesh data structures composition in the embedding Euclidean space to represent, manip- January 2006, 155 pages, PDF ulate and visualise the surfaces. This thesis advocates, PhD thesis (Churchill College, December 2004) firstly, the intrinsic processing of surfaces, i.e. process- ing directly across the surface rather than in its embed- ding space. Secondly, it continues the trend towards the use of point primitives for the processing and represen- tation of surfaces.

164 The discussion starts with the design of an intrin- specification. This report is a companion document to sic point sampling algorithm template for surfaces. This our PPoPP 2006 paper entitled “Proving correctness of is followed by the presentation of a module library of highly-concurrent linearisable objects”. template instantiations for surfaces in triangular mesh or point cloud form. The latter is at the heart of the UCAM-CL-TR-660 intrinsic meshless surface simplification algorithm also put forward. This is followed by the introduction of Jeremy Singer: intrinsic meshless surface subdivision, the first intrinsic meshless surface subdivision scheme and a new method Static program analysis based on for the computation of geodesic centroids on mani- folds. The meshless subdivision scheme uses an intrin- virtual register renaming sic neighbourhood concept for point-sampled geometry February 2006, 183 pages, PDF also presented in this thesis. Its main contributions can PhD thesis (Christ’s College, March 2005) therefore be summarised as follows: – An intrinsic neighbourhood concept for point- Abstract: Static single assignment form (SSA) is a popu- sampled geometry. lar program intermediate representation (IR) for static – An intrinsic surface sampling algorithm template analysis. SSA programs differ from equivalent control with sampling density guarantee. flow graph (CFG) programs only in the names of vir- – A modular library of template instantiations for tual registers, which are systematically transformed to the sampling of planar domains and surfaces in trian- comply with the naming convention of SSA. Static sin- gular mesh or point cloud form. gle information form (SSI) is a recently proposed ex- – A new method for the computation of geodesic tension of SSA that enforces a greater degree of sys- centroids on manifolds. tematic virtual register renaming than SSA. This disser- – An intrinsic meshless surface simplification algo- tation develops the principles, properties, and practice rithm. of SSI construction and data flow analysis. Further, it – The introduction of the notion of intrinsic mesh- shows that SSA and SSI are two members of a larger less surface subdivision. family of related IRs, which are termed virtual register – The first intrinsic meshless surface subdivision renaming schemes (VRRSs). SSA and SSI analyses can scheme. be generalized to operate on any VRRS family mem- The overall result is a set of algorithms for the pro- ber. Analysis properties such as accuracy and efficiency cessing of point-sampled geometry centering around depend on the underlying VRRS. a generic sampling template for surfaces in the most This dissertation makes four significant contribu- widely-used forms of representation. The intrinsic na- tions to the field of static analysis research. ture of these point-based algorithms helps to overcome First, it develops the SSI representation. Although limitations associated with the more traditional extrin- SSI was introduced five years ago, it has not yet re- sic, mesh-based processing of surfaces when dealing ceived widespread recognition as an interesting IR in with highly complex point-sampled geometry as is typ- its own right. This dissertation presents a new SSI defi- ically encountered today. nition and an optimistic construction algorithm. It also sets SSI in context among the broad range of IRs for UCAM-CL-TR-659 static analysis. Second, it demonstrates how to reformulate ex- Viktor Vafeiadis, Maurice Herlihy, isting data flow analyses using new sparse SSI-based Tony Hoare, Marc Shapiro: techniques. Examples include liveness analysis, sparse type inference and program slicing. It presents algo- A safety proof of a lazy concurrent rithms, together with empirical results of these algo- list-based set implementation rithms when implemented within a research compiler framework. January 2006, 19 pages, PDF Third, it provides the only major comparative evalu- ation of the merits of SSI for data flow analysis. Several Abstract: We prove the safety of a practical concurrent qualitative and quantitative studies in this dissertation list-based implementation due to Heller et al. It exposes compare SSI with other similar IRs. an interface of an integer set with methods contains, Last, it identifies the family of VRRSs, which are add, and remove. The implementation uses a combina- all CFGs with different virtual register naming conven- tion of fine-grain locking, optimistic and lazy synchro- tions. Many extant IRs are classified as VRRSs. Several nisation. Our proofs are hand-crafted. They use rely- new IRs are presented, based on a consideration of pre- guarantee reasoning and thereby illustrate its power viously unspecified members of the VRRS family. Gen- and applicability, as well as some of its limitations. For eral analyses can operate on any family member. The each method, we identify the linearisation point, and required level of accuracy or efficiency can be selected establish its validity. Hence we show that the meth- by working in terms of the appropriate family member. ods are safe, linearisable and implement a high-level

165 UCAM-CL-TR-661 UCAM-CL-TR-664 Anna Ritchie: Alan F. Blackwell: Compatible RMRS representations Designing knowledge: from RASP and the ERG An interdisciplinary experiment March 2006, 41 pages, PDF in research infrastructure for Abstract: Various applications could potentially bene- fit from the integration of deep and shallow process- shared description ing techniques. A universal representation, compati- April 2006, 18 pages, PDF ble between deep and shallow parsers, would enable such integration, allowing the advantages of both to be Abstract: The report presents the experimental develop- combined. This paper describes efforts to make RMRS ment, evaluation and refinement of a method for doing such a representation. This work was done as part of adventurous design work, in contexts where academics DeepThought, funded under the 5th Framework Pro- must work in collaboration with corporate and pub- gram of the European Commission (contract reference lic policy strategists and researchers. The intention has IST-2001-37836). been to do applied social science, in which a reflective UCAM-CL-TR-662 research process has resulted in a “new social form”, as expressed in the title of the research grant that funded Ted Briscoe: the project. The objective in doing so is not simply to produce new theories, or to enjoy interdisciplinary en- An introduction to tag sequence counters (although both of those have been side effects grammars and the RASP system of this work). My purpose in doing the work and writ- ing this report is purely instrumental – working as a parser technologist among social scientists, the outcome de- March 2006, 30 pages, PDF scribed in this report is intended for adoption as a kind of social technology. I have given this product a name: Abstract: This report describes the tag sequence gram- the “Blackwell-Leach Process” for interdisciplinary de- mars released as part of the Robust Accurate Statisti- sign. The Blackwell-Leach process has since been ap- cal Parsing (RASP) system. It is intended to help users plied and proven useful in several novel situations, and of RASP understand the linguistic and engineering ra- I believe is now sufficiently mature to justify publica- tionale behind the grammars and prepare them to cus- tion of the reports that describe both the process and tomise the system for their application. It also contains its development. a fairly exhaustive list of references to extant work util- ising the RASP parser. UCAM-CL-TR-665 UCAM-CL-TR-663 Huiyun Li: Richard Bergmair: Syntax-driven analysis of Security evaluation at design time for context-free languages with respect to cryptographic hardware fuzzy relational semantics April 2006, 81 pages, PDF PhD thesis (Trinity Hall, December 2005) March 2006, 49 pages, PDF Abstract: A grammatical framework is presented that Abstract: Consumer security devices are becoming augments context-free production rules with semantic ubiquitous, from pay-TV through mobile phones, PDA, production rules that rely on fuzzy relations as rep- prepayment gas meters to smart cards. There are many resentations of fuzzy natural language concepts. It is ongoing research efforts to keep these devices secure shown how the well-known technique of syntax-driven from opponents who try to retrieve key information semantic analysis can be used to infer from an ex- by observation or manipulation of the chip’s compo- pression in a language defined in such a semantically nents. In common industrial practise, it is after the chip augmented grammar a weak ordering on the possible has been manufactured that security evaluation is per- worlds it describes. Considering the application of nat- formed. Due to design time oversights, however, weak- ural language query processing, we show how to order nesses are often revealed in fabricated chips. Further- elements in the domain of a relational database scheme more, post manufacture security evaluation is time con- according to the degree to which they fulfill the intu- suming, error prone and very expensive. This evokes ition behind a given natural language statement like the need of “design time security evaluation” tech- “Carol lives in a small city near San Francisco”. niques in order to identify avoidable mistakes in design.

166 This thesis proposes a set of “design time se- The observation that many agreement protocols curity evaluation” methodologies covering the well- share the same round-based structure helps to cope known non-invasive side-channel analysis attacks, such with a large number of agreement problems in a uni- as power analysis and electromagnetic analysis attacks. form way. One of the main contributions of this thesis The thesis also covers the recently published semi- is “Optimistically Terminating Consensus” (OTC) – a invasive optical fault injection attacks. These security new lightweight agreement abstraction that formalizes evaluation technologies examine the system under test the notion of a round. It is used to provide simple mod- by reproducing attacks through simulation and observ- ular solutions to a large variety of agreement problems, ing its subsequent response. including Consensus, Atomic Commitment, and Inter- The proposed “design time security evaluation” active Consistency. The OTC abstraction tolerates ma- methodologies can be easily implemented into the stan- licious participants and has no latency overhead; agree- dard integrated circuit design flow, requiring only com- ment protocols constructed in the OTC framework re- monly used EDA tools. So it adds little non-recurrent quire no more communication steps than their ad-hoc engineering (NRE) cost to the chip design but helps counterparts. identify the security weaknesses at an early stage, The attractiveness of this approach lies in the fact avoids costly silicon re-spins, and helps succeed in in- that the correctness of OTC algorithms can be tested dustrial evaluation for faster time-to-market. automatically. A theory developed in this thesis al- lows us to quickly evaluate OTC algorithm candidates UCAM-CL-TR-666 without the time-consuming examination of their en- tire state space. This technique is then used to scan Mike Bond, George Danezis: the space of possible solutions in order to automati- cally discover new low-latency OTC algorithms. From A pact with the Devil these, one can now easily obtain new implementations of Consensus and similar agreement problems such as June 2006, 14 pages, PDF Atomic Commitment or Interactive Consistency. Because of its continuous nature, Atomic Broad- Abstract: We study malware propagation strategies cast is considered separately from other agreement ab- which exploit not the incompetence or naivety of stractions. I first show that no algorithm can guaran- users, but instead their own greed, malice and short- tee a latency of less than three communication steps in sightedness. We demonstrate that interactive propaga- all failure-free scenarios. Then, I present new Atomic tion strategies, for example bribery and blackmail of Broadcast algorithms that achieve the two-step latency computer users, are effective mechanisms for malware in some special cases, while still guaranteeing three to survive and entrench, and present an example em- steps for other failure-free scenarios. The special cases ploying these techniques. We argue that in terms of considered here are: Optimistic Atomic Broadcast, (Op- propagation, there exists a continuum between legit- timistic) Generic Broadcast, and closed-group Atomic imate applications and pure malware, rather than a Broadcast. For each of these, I present an appropriate quantised scale. algorithm and prove its latency to be optimal.

UCAM-CL-TR-667 UCAM-CL-TR-668

Piotr Zielinski:´ Piotr Zielinski:´ Minimizing latency of agreement Optimistically Terminating protocols Consensus June 2006, 239 pages, PDF June 2006, 35 pages, PDF PhD thesis (Trinity Hall, September 2005) Abstract: Optimistically Terminating Consensus (OTC) Abstract: Maintaining consistency of fault-tolerant dis- is a variant of Consensus that decides if all correct pro- tributed systems is notoriously difficult to achieve. It cesses propose the same value. It is surprisingly easy often requires non-trivial agreement abstractions, such to implement: processes broadcast their proposals and as Consensus, Atomic Broadcast, or Atomic Commit- decide if sufficiently many processes report the same ment. This thesis investigates implementations of such proposal. This paper shows an OTC-based framework abstractions in the asynchronous model, extended with which can reconstruct all major asynchronous Consen- unreliable failure detectors or eventual synchrony. The sus algorithms, even in Byzantine settings, with no over- main objective is to develop protocols that minimize head in latency or the required number of processes. the number of communication steps required in failure- This result does not only deepen our understanding free scenarios but remain correct if failures occur. For of Consensus, but also reduces the problem of design- several agreement problems and their numerous vari- ing new, modular distributed agreement protocols to ants, this thesis presents such low-latency algorithms choosing the parameters of OTC. and lower-bound theorems proving their optimality.

167 UCAM-CL-TR-669 On the application of program analysis and transformation to David M. Eyers: high reliability hardware Active privilege management for July 2006, 215 pages, PDF distributed access control systems PhD thesis (St Edmund’s College, April 2006) June 2006, 222 pages, PDF Abstract: Safety- and mission-critical systems must be PhD thesis (King’s College, June 2005) both correct and reliable. Electronic systems must be- have as intended and, where possible, do so at the first Abstract: The last decade has seen the explosive up- attempt – the fabrication costs of modern VLSI devices take of technologies to support true Internet-scale dis- are such that the iterative design/code/test methodol- tributed systems, many of which will require security. ogy endemic to the software world is not financially The policy dictating authorisation and privilege re- feasible. In aerospace applications it is also essential to striction should be decoupled from the services being establish that systems will, with known probability, re- protected: (1) policy can be given its own independent main operational for extended periods, despite being language syntax and semantics, hopefully in an appli- exposed to very low or very high temperatures, high cation independent way; (2) policy becomes portable – radiation, large G-forces, hard vacuum and severe vi- it can be stored away from the services it protects; and bration. (3) the evolution of policy can be effected dynamically. Hardware designers have long understood the ad- Management of dynamic privileges in wide-area dis- vantages of formal mathematical techniques. Notably, tributed systems is a challenging problem. Supporting model checking and automated theorem proving both fast credential revocation is a simple example of dy- gained acceptance within the electronic design commu- namic privilege management. More complex examples nity at an early stage, though more recently the research include policies that are sensitive to the current state of focus in validation and verification has drifted toward a principal, such as dynamic separation of duties. software. As a consequence, the newest and most pow- The Open Architecture for Secure Interworking Ser- erful techniques have not been significantly applied to vices (OASIS), an expressive distributed role-based ac- hardware; this work seeks to make a modest contribu- cess control system, is traced to the development of the tion toward redressing the imbalance. Clinical and Biomedical Computing Limited (CBCL) An abstract interpretation-based formalism is intro- OASIS implementation. Two OASIS deployments are duced, transitional logic, that supports formal reason- discussed – an Electronic Health Record framework, ing about dynamic behaviour of combinational asyn- and an inter-organisational distributed courseware sys- chronous circuits. The behaviour of majority voting cir- tem. cuits with respect to single-event transients is analysed, The Event-based Distributed Scalable Authorisation demonstrating that such circuits are not SET-immune. Control architecture for the 21st century (EDSAC21, This result is generalised to show that SET immunity is or just EDSAC) is then presented along with its four de- impossible for all delay-insensitive circuits. sign layers. It builds on OASIS, adding support for the An experimental hardware partial evaluator, collaborative enforcement of distributed dynamic con- HarPE, is used to demonstrate the 1st Futamura straints, and incorporating publish/subscribe messaging projection in hardware – a small CPU is specialised to allow scalable and flexible deployment. The OASIS with respect to a ROM image, yielding results that policy language is extended to support delegation, dy- are equivalent to compiling the program into hard- namic separation of duties, and obligation policies. ware. HarPE is then used alongside an experimental An EDSAC prototype is examined. We show that non-clausal SAT solver to implement an automated our architecture is ideal for experiments performed into transformation system that is capable of repairing location-aware access control. We then demonstrate FPGAs that have suffered cosmic ray damage. This how event-based features specific to EDSAC facilitate approach is extended to support automated configu- integration of an ad hoc workflow monitor into an ac- ration, dynamic testing and dynamic error recovery of cess control system. reconfigurable spacecraft wiring harnesses. The EDSAC architecture is powerful, flexible and extensible. It is intended to have widespread appli- cability as the basis for designing next-generation se- UCAM-CL-TR-671 curity middleware and implementing distributed, dy- namic privilege management. Piotr Zielinski:´

UCAM-CL-TR-670 Low-latency Atomic Broadcast in the presence of contention Sarah Thompson: July 2006, 23 pages, PDF

168 Abstract: The Atomic Broadcast algorithm described in commonly-used abstract data types, it discloses a judi- this paper can deliver messages in two communication cious degree of structure and type in the logical com- steps, even if multiple processes broadcast at the same position of files and makes the data access semantics time. It tags all broadcast messages with the local real of applications explicit. The design of the Datom API time, and delivers all messages in order of these times- weighs the addition of advanced functionality and the tamps. The Ω-elected leader simulates processes it sus- overheads introduced by their employment, taking into pects to have crashed (♦S). For fault-tolerance, it uses account the requirements of the target application do- a new cheap Generic Broadcast algorithm that requires main. The implementation of the Datom API is eval- only a majority of correct processes (n > 2f) and, in uated according to different criteria such as usability, failure-free runs, delivers all non-conflicting messages impact at the source-code level, and performance. The in two steps. The main algorithm satisfies several new experimental results demonstrate that the Datom API lower bounds, which are proved in this paper. reduces work-effort and improves software quality by providing a storage interface based on high-level ab- UCAM-CL-TR-672 stractions.

Calicrates Policroniades-Borraz: UCAM-CL-TR-673

Decomposing file data into Judita Preiss: discernible items Probabilistic word sense August 2006, 230 pages, PDF disambiguation PhD thesis (Hughes Hall, December 2005) Analysis and techniques for Abstract: The development of the different persistent combining knowledge sources data models shows a constant pattern: the higher the level of abstraction a storage system exposes the greater August 2006, 108 pages, PDF the payoff for programmers. The file API offers a simple PhD thesis (Trinity College, July 2005) storage model that is agnostic of any structure or data types in file contents. As a result, developers employ Abstract: This thesis shows that probabilistic word substantial programming effort in writing persistent sense disambiguation systems based on established sta- code. At the other extreme, orthogonally persistent pro- tistical methods are strong competitors to current state- gramming languages reduce the impedance mismatch of-the-art word sense disambiguation (WSD) systems. between the volatile and the persistent data spaces by We begin with a survey of approaches to WSD, and exposing persistent data as conventional programming examine their performance in the systems submitted to objects. Consequently, developers spend considerably the SENSEVAL-2 WSD evaluation exercise. We discuss less effort in developing persistent code. existing resources for WSD, and investigate the amount This dissertation addresses the lack of ability in the of training data needed for effective supervised WSD. file API to exploit the advantages of gaining access to We then present the design of a new probabilistic the logical composition of file content. It argues that the WSD system. The main feature of the design is that trade-off between efficiency and ease of programmabil- it combines multiple probabilistic modules using both ity of persistent code in the context of the file API is Dempster-Shafer theory and Bayes Rule. Additionally, unbalanced. Accordingly, in this dissertation I present the use of Lidstone’s smoothing provides a uniform and evaluate two practical strategies to disclose struc- mechanism for weighting modules based on their ac- ture and type in file data. curacy, removing the need for an additional weighting First, I investigate to what extent it is possible scheme. to identify specific portions of file content in diverse Lastly, we evaluate our probabilistic WSD system data sets through the implementation and evaluation of using traditional evaluation methods, and introduce techniques for data redundancy detection. This study is a novel task-based approach. When evaluated on the interesting not only because it characterises redundancy gold standard used in the SENSEVAL-2 competition, levels in storage systems content, but also because re- the performance of our system lies between the first and dundant portions of data at a sub-file level can be an second ranked WSD system submitted to the English all indication of internal file data structure. Although these words task. techniques have been used by previous work, my anal- Task-based evaluations are becoming more popu- ysis of data redundancy is the first that makes an in- lar in natural language processing, being an absolute depth comparison of them and highlights the trade-offs measure of a system’s performance on a given task. We in their employment. present a new evaluation method based on subcatego- Second, I introduce a novel storage system API, rization frame acquisition. Experiments with our prob- called Datom, that departs from the view of file con- abilistic WSD system give an extremely high correla- tent as a monolithic object. Through a minimal set of tion between subcategorization frame acquisition per- formance and WSD performance, thus demonstrating

169 the suitability of SCF acquisition as a WSD evaluation deployment when there is inherently less accurate po- task. sition data. Our results show that Landmark Guided Forwarding converges faster, scales better and is more UCAM-CL-TR-674 flexible in a range of plausible mobility scenarios than representative protocols from the leading classes of ex- Meng How Lim: isting solutions, namely GPSR, AODV and DSDV. Landmark Guided Forwarding UCAM-CL-TR-675 October 2006, 109 pages, PDF Paula J. Buttery: PhD thesis (St Catharine’s College, September 2006) Computational models for first Abstract: Wireless mobile ad hoc network routing language acquisition presents some extremely challenging research prob- lems. While primarily trying to provide connectivity, November 2006, 176 pages, PDF algorithms may also be designed to minimise resource PhD thesis (Churchill College, March 2006) consumption such as power, or to trade off global op- timisation against the routing protocol overheads. In Abstract: This work investigates a computational this thesis, we focus on the problems of maintaining model of first language acquisition; the Categorial network connectivity in the presence of node mobil- Grammar Learner or CGL. The model builds on the ity whilst providing a balance between global efficiency work of Villavicenio, who created a parametric Cate- and robustness. The common design goal among exist- gorial Grammar learner that organises its parameters ing wireless ad hoc routing solutions is to search for an into an inheritance hierarchy, and also on the work optimal topological path between a source and a des- of Buszkowski and Kanazawa, who demonstrated the tination for some shortest path metric. We argue that learnability of a k-valued Classic Categorial Gram- the goal of establishing an end to end globally optimal mar (which uses only the rules of function applica- path is unsustainable as the network diameter, traffic tion) from strings. The CGL is able to learn a k-valued volume and number of nodes all increase in the pres- General Categorial Grammar (which uses the rules of ence of moderate node mobility. function application, function composition and Gener- Some researchers have proposed using geographic alised Weak Permutation). The novel concept of Sen- position-based forwarding, rather than a topological- tence Objects (simple strings, augmented strings, unla- based approach. In position-based forwarding, besides belled structures and functor-argument structures) are knowing about its own geographic location, every node presented as potential points from which learning may also acquires the geographic position of its surround- commence. Augmented strings (which are strings aug- ing neighbours. Packet delivery in general is achieved mented with some basic syntactic information) are sug- by first learning the destination position from a loca- gested as a sensible input to the CGL as they are cog- tion service. This is followed by addressing the packet nitively plausible objects and have greater information with the destination position before forwarding the content than strings alone. Building on the work of packet on to a neighbour that, amongst all other neigh- Siskind, a method for constructing augmented strings bours, is geographically nearest to the destination. It from unordered logic forms is detailed and it is sug- is clear that in the ad hoc scenario, forwarding only gested that augmented strings are simply a representa- by geodesic position could result in situations that pre- tion of the constraints placed on the space of possible vent the packet from advancing further. To resolve this, parses due to a strings associated semantic content. The some researchers propose improving delivery guaran- CGL makes crucial use of a statistical Memory Mod- tees by routing the packet along a planar graph con- ule (constructed from a Type Memory and Word Or- structed from a Gabriel (GG) or a Relative Neighbour der Memory) that is used to both constrain hypotheses Graph (RNG). This approach however has been shown and handle data which is noisy or parametrically am- to fail frequently when position information is inher- biguous. A consequence of the Memory Module is that ently inaccurate, or neighbourhood state is stale, such the CGL learns in an incremental fashion. This echoes as is the case in many plausible deployment scenarios, real child learning as documented in Browns Stages of e.g. due to relative mobility rates being higher than lo- Language Development and also as alluded to by an in- cation service update frequency. cluded corpus study of child speech. Furthermore, the We propose Landmark Guided Forwarding (LGF), CGL learns faster when initially presented with simpler an algorithm that harnesses the strengths of both topo- linguistic data; a further corpus study of child-directed logical and geographical routing algorithms. LGF is a speech suggests that this echos the input provided to hybrid scheme that leverages the scaling property of the children. The CGL is demonstrated to learn from real geographic approach while using local topology knowl- data. It is evaluated against previous parametric learn- edge to mitigate location uncertainty. We demonstrate ers (the Triggering Learning Algorithm of Gibson and through extensive simulations that LGF is suited both Wexler and the Structural Triggers Learner of Fodor to situations where there are high mobility rates, and and Sakas) and is found to be more efficient.

170 UCAM-CL-TR-676 Abstract: This dissertation deals with data centric net- working in distributed systems, which relies on con- R.J. Gibbens, Y. Saacti: tent addressing instead of host addressing for partic- ipating nodes, thus providing network independence Road traffic analysis using MIDAS for applications. Publish/subscribe asynchronous group communication realises the vision of data centric net- data: journey time prediction working that is particularly important for networks December 2006, 35 pages, PDF supporting mobile clients over heterogeneous wireless Department for Transport Horizons Research networks. In such networks, client applications pre- Programme “Investigating the handling of large fer to receive specific data and require selective data transport related datasets” (project number H05-217) dissemination. Underlying mechanisms such as asyn- chronous message passing, distributed message filtering Abstract: The project described in this report was un- and query/subscription management are essential. Fur- dertaken within the Department for Transport’s sec- thermore, recent progress in wireless sensor networks ond call for proposals in the Horizons research pro- brought a new dimension of data processing in ubiqui- gramme under the theme of “Investigating the handling tous computing, where the sensors are used to gather of large transport related datasets”. The project looked high volumes of different data types and to feed them at the variability of journey times across days in three as contexts to a wide range of applications. day categories: Mondays, midweek days and Fridays. Particular emphasis has been placed on fundamen- Two estimators using real-time data were considered: tal design of event representation. Besides existing event a simple-to-implement regression-based method and a attributes, event order, and continuous context infor- more computationally demanding k-nearest neighbour mation such as time or geographic location can be method. Our example scenario of UK data was taken incorporated within an event description. Data repre- from the M25 London orbital motorway during 2003 sentation of event and query will be even more im- and the results compared in terms of the root-mean- portant in future ubiquitous computing, where events square prediction error. It was found that where the flow over heterogeneous networks. This dissertation variability was greatest (typically during the rush hours presents a multidimensional event representation (i.e., periods or periods of flow breakdowns) the regression Hypercube structure in RTree) for efficient indexing, and nearest neighbour estimators reduced the predic- filtering, matching, and scalability in publish/subscribe tion error substantially compared with a naive estima- systems. The hypercube event with a typed content- tor constructed from the historical mean journey time. based publish/subscribe system for wide-area networks Only as the lag between the decision time and the jour- is demonstrated for improving the event filtering pro- ney start time increased to beyond around 2 hours did cess. the potential to improve upon the historical mean es- As a primary focus, this dissertation investigates a timator diminish. Thus, there is considerable scope for structureless, asynchronous group communication over prediction methods combined with access to real-time wireless ad hoc networks named ‘ECCO Pervasive Pub- data to improve the accuracy in journey time estimates. lish/Subscribe’ (ECCO-PPS). ECCO-PPS uses context- In so doing, they reduce the uncertainty in estimating adaptive controlled flooding, which takes a cross-layer the generalized cost of travel. The regression-based pre- approach between middleware and network layers and diction estimator has a particularly low computational provides a content-based publish/subscribe paradigm. overhead, in contrast to the nearest neighbour estima- Traditionally events have been payload data within tor, which makes it entirely suitable for an online imple- network layer components; the network layer never mentation. Finally, the project demonstrates both the touches the data contents. However, application data value of preserving historical archives of transport re- have more influence on data dissemination in ubiqui- lated datasets as well as provision of access to real-time tous computing scenarios. measurements. The state information of the local node may be the event forwarding trigger. Thus, the model of publish/subscribe must become more symmetric, with UCAM-CL-TR-677 events being disseminated based on rules and condi- tions defined by the events themselves. The event can Eiko Yoneki: thus choose the destinations instead of relying on the potential receivers’ decision. The publish/subscribe sys- ECCO: Data centric asynchronous tem offers a data centric approach, where the destina- communication tion address is not described with any explicit network address. The symmetric publish/subscribe paradigm December 2006, 210 pages, PDF brings another level to the data-centric paradigm, lead- PhD thesis (Lucy Cavendish College, September 2006) ing to a fundamental change in functionality at the net- work level of asynchronous group communication and membership maintenance. To add an additional dimension of event process-

171 ing in global computing, It is important to understand The review makes use of several frameworks to organ- event aggregation, filtering and correlation. Temporal ise the review, for summarising, for systems, for the task ordering of events is essential for event correlation factors affecting summarising, and for evaluation de- over distributed systems. This dissertation introduces sign and practice. generic composite event semantics with interval-based The review considers the evaluation strategies that semantics for event detection. This precisely defines have been applied to summarising and the issues they complex timing constraints among correlated event in- raise, and the major summary evaluation programmes. stances. It examines the input, purpose and output factors that In conclusion, this dissertation provides advanced have been investigated in summarising research in the data-centric asynchronous communication, which pro- last decade, and discusses the classes of strategy, both vides efficiency, reliability, and robustness, while adapt- extractive and non-extractive, that have been explored, ing to the underlying network environments. illustrating the range of systems that have been built. This analysis of strategies is amplified by accounts of UCAM-CL-TR-678 specific exemplar systems. The conclusions drawn from the review are that Andrew D. Twigg: automatic summarisation research has made valuable progress in the last decade, with some practically useful Compact forbidden-set routing approaches, better evaluation, and more understanding of the task. However as the review also makes clear, December 2006, 115 pages, PDF summarising systems are often poorly motivated in re- PhD thesis (King’s College, June 2006) lation to the factors affecting summaries, and evalu- ation needs to be taken significantly further so as to Abstract: We study the compact forbidden-set rout- engage with the purposes for which summaries are in- ing problem. We describe the first compact forbidden- tended and the contexts in which they are used. set routing schemes that do not suffer from non- A reduced version of this report, entitled ‘Automatic convergence problems often associated with Bellman- summarising: the state of the art’ will appear in Infor- Ford iterative schemes such as the interdomain routing mation Processing and Management, 2007. protocol, BGP. For degree-d n-node graphs of treewidth t, our schemes use space O(t2 d polylog(n)) bits per UCAM-CL-TR-680 node; a trivial scheme uses O(n2) and routing trees use Ω(n) per node (these results have since been im- Jing Su, James Scott, Pan Hui, Eben Upton, proved and extended – see [Courcelle, Twigg, Compact Meng How Lim, Christophe Diot, forbidden-set routing, 24th Symposium on Theoretical Aspects of Computer Science, Aachen 2007]. We also Jon Crowcroft, Ashvin Goel, Eyal de Lara: show how to do forbidden-set routing on planar graphs Haggle: Clean-slate networking for between nodes whose distance is less than a parameter l. We prove a lower bound on the space requirements of mobile devices forbidden-set routing for general graphs, and show that January 2007, 30 pages, PDF the problem is related to constructing an efficient dis- tributed representation of all the separators of an undi- Abstract: Haggle is a layerless networking architecture rected graph. Finally, we consider routing while taking for mobile devices. It is motivated by the infrastruc- into account path costs of intermediate nodes and show ture dependence of applications such as email and web that this requires large routing labels. We also study a browsing, even in situations where infrastructure is not novel way of approximating forbidden-set routing us- necessary to accomplish the end user goal, e.g. when the ing quotient graphs of low treewidth. destination is reachable by ad hoc neighbourhood com- munication. In this paper we present details of Hag- UCAM-CL-TR-679 gle’s architecture, and of the prototype implementation which allows existing email and web applications to be- Karen Sparck¨ Jones: come infrastructure-independent, as we show with an experimental evaluation. Automatic summarising: a review and discussion of the state of UCAM-CL-TR-681 the art Piotr Zielinski:´ January 2007, 67 pages, PDF Indirect channels: Abstract: This paper reviews research on automatic a bandwidth-saving technique for summarising over the last decade. This period has seen fault-tolerant protocols a rapid growth of work in the area stimulated by tech- nology and by several system evaluation programmes. April 2007, 24 pages, PDF

172 Abstract: Sending large messages known to the recipi- verification of a multiplier and a simple microcom- ent is a waste of bandwidth. Nevertheless, many fault- puter which has shown us that the compiler supports tolerant agreement protocols send the same large mes- small and medium-sized applications. Although this ap- sage between each pair of participating processes. This proach does not scale to industrial-sized applications practical problem has recently been addressed in the yet, it is a first step towards the implementation of a context of Atomic Broadcast by presenting a special- new technology that can raise the level of mechanisa- ized algorithm. tion in formal verification. This paper proposes a more general solution by pro- viding virtual indirect channels that physically transmit UCAM-CL-TR-683 message ids instead of full messages if possible. Indirect channels are transparent to the application; they can be Martin Kleppmann: used with any distributed algorithm, even with unre- liable channels or malicious participants. At the same Simulation of colliding constrained time, they provide rigorous theoretical properties. Indirect channels are conservative: they do not al- rigid bodies low manipulating message ids if full messages are not April 2007, 65 pages, PDF known. This paper also investigates the consequences of relaxing this assumption on the latency and correct- Abstract: I describe the development of a program to ness of Consensus and Atomic Broadcast implementa- simulate the dynamic behaviour of interacting rigid tions: new algorithms and lower bounds are shown. bodies. Such a simulation may be used to generate ani- mations of articulated characters in 3D graphics appli- UCAM-CL-TR-682 cations. Bodies may have an arbitrary shape, defined by a triangle mesh, and may be connected with a variety Juliano Iyoda: of different joints. Joints are represented by constraint functions which are solved at run-time using Lagrange Translating HOL functions to multipliers. The simulation performs collision detection hardware and prevents penetration of rigid bodies by applying impulses to colliding bodies and reaction forces to bod- April 2007, 89 pages, PDF ies in resting contact. PhD thesis (Hughes Hall, October 2006) The simulation is shown to be physically accurate and is tested on several different scenes, including one Abstract: Delivering error-free products is still a major of an articulated human character falling down a flight challenge for hardware and software engineers. Due to of stairs. the increasingly growing complexity of computing sys- An appendix describes how to derive arbitrary con- tems, there is a demand for higher levels of automation straint functions for the Lagrange multiplier method. in formal verification. Collisions and joints are both represented as con- This dissertation proposes an approach to generate straints, which allows them to be handled with a unified formally verified circuits automatically. The main out- algorithm. The report also includes some results relat- come of our project is a compiler implemented on top ing to the use of quaternions in dynamic simulations. of the theorem prover HOL4 which translates a subset of higher-order logic to circuits. The subset of the logic UCAM-CL-TR-684 is a first-order tail-recursive functional language. The compiler takes a function f as argument and automati- Pan Hui, Jon Crowcroft: cally produces the theorem “` C implements f” where C is a circuit and “implements” is a correctness rela- Bubble Rap: Forwarding in small tion between a circuit and a function. We achieve full mechanisation of proofs by defining theorems which world DTNs in ever decreasing circles are composable. The correctness of a circuit can be May 2007, 44 pages, PDF mechanically determined by the correctness of its sub- circuits. This technology allows the designer to focus Abstract: In this paper we seek to improve understand- on higher levels of abstraction instead of reasoning and ing of the structure of human mobility, and to use this verifying systems at the gate level. in the design of forwarding algorithms for Delay Tol- A pretty-printer translates netlists described in erant Networks for the dissemination of data amongst higher-order logic to structural Verilog. Our compiler mobile users. is integrated with Altera tools to run our circuits in Cooperation binds but also divides human society FPGAs. Thus the theorem prover is used as an envi- into communities. Members of the same community ronment for supporting the development process from interact with each other preferentially. There is struc- formal specification to implementation. ture in human society. Within society and its commu- Our approach has been tested with fairly sub- nities, individuals have varying popularity. Some peo- stantial case studies. We describe the design and the ple are more popular and interact with more people

173 than others; we may call them hubs. Popularity rank- Abstract: Computers and electronic devices are con- ing is one facet of the population. In many physical tinuing to proliferate throughout our lives. Sentient networks, some nodes are more highly connected to Computing systems aim to reduce the time and effort each other than to the rest of the network. The set required to interact with these devices by composing of such nodes are usually called clusters, communities, them into systems which fade into the background of cohesive groups or modules. There is structure to so- the user’s perception. Failures are a significant problem cial networking. Different metrics can be used such as in this scenario because their occurrence will pull the information flow, Freeman betweenness, closeness and system into the foreground as the user attempts to dis- inference power, but for all of them, each node in the cover and understand the fault. However, attempting network can be assigned a global centrality value. to exist and interact with users in a real, unpredictable, What can be inferred about individual popularity, physical environment rather than a well-constrained and the structure of human society from measurements virtual environment makes failures inevitable. within a network? How can the local and global char- This dissertation describes a study of dependability. acteristics of the network be used practically for infor- A dependable system permits applications to discover mation dissemination? We present and evaluate a se- the extent of failures and to adapt accordingly such quence of designs for forwarding algorithms for Pocket that their continued behaviour is intuitive to users of Switched Networks, culminating in Bubble, which ex- the system. ploit increasing levels of information about mobility Cantag, a reliable marker-based machine-vision sys- and interaction. tem, has been developed to aid the investigation of de- pendability. The description of Cantag includes specific UCAM-CL-TR-685 contributions for marker tracking such as rotationally invariant coding schemes and reliable back-projection John Daugman, Cathryn Downing: for circular tags. An analysis of Cantag’s theoretical performance is presented and compared to its real- Effect of severe image compression on world behaviour. This analysis is used to develop op- iris recognition performance timised tag designs and performance metrics. The use of validation is proposed to permit runtime calculation May 2007, 20 pages, PDF of observable metrics and verification of system com- Abstract: We investigate three schemes for severe com- ponents. Formal proof methods are combined with a pression of iris images, in order to assess what their logical validation framework to show the validity of impact would be on recognition performance of the al- performance optimisations. gorithms deployed today for identifying persons by this biometric feature. Currently, standard iris images are UCAM-CL-TR-687 600 times larger than the IrisCode templates computed from them for database storage and search; but it is ad- Viktor Vafeiadis, Matthew Parkinson: ministratively desired that iris data should be stored, transmitted, and embedded in media in the form of im- A marriage of rely/guarantee and ages rather than as templates computed with propri- separation logic etary algorithms. To reconcile that goal with its impli- cations for bandwidth and storage, we present schemes June 2007, 31 pages, PDF that combine region-of-interest isolation with JPEG and JPEG2000 compression at severe levels, and we test Abstract: In the quest for tractable methods for reason- them using a publicly available government database ing about concurrent algorithms both rely/guarantee of iris images. We show that it is possible to compress logic and separation logic have made great advances. iris images to as little as 2 KB with minimal impact They both seek to tame, or control, the complexity of on recognition performance. Only some 2% to 3% of concurrent interactions, but neither is the ultimate ap- the bits in the IrisCode templates are changed by such proach. Rely-guarantee copes naturally with interfer- severe image compression. Standard performance met- ence, but its specifications are complex because they de- rics such as error trade-off curves document very good scribe the entire state. Conversely separation logic has recognition performance despite this reduction in data difficulty dealing with interference, but its specifications size by a net factor of 150, approaching a convergence are simpler because they describe only the relevant state of image data size and template size. that the program accesses. We propose a combined system which marries the UCAM-CL-TR-686 two approaches. We can describe interference naturally (using a relation as in rely/guarantee), and where there Andrew C. Rice: is no interference, we can reason locally (as in separa- Dependable systems for Sentient tion logic). We demonstrate the advantages of the com- bined approach by verifying a lock-coupling list algo- Computing rithm, which actually disposes/frees removed nodes. May 2007, 150 pages, PDF

174 UCAM-CL-TR-688 UCAM-CL-TR-689

Sam Staton: Ursula H. Augsdorfer,¨ Neil A. Dodgson, Name-passing process calculi: Malcolm A. Sabin: operational models and structural Removing polar rendering artifacts in operational semantics subdivision surfaces June 2007, 245 pages, PDF June 2007, 7 pages, PDF PhD thesis (Girton College, December 2006) Abstract: There is a belief that subdivision schemes re- Abstract: This thesis is about the formal semantics quire the subdominant eigenvalue, λ, to be the same of name-passing process calculi. We study operational around extraordinary vertices as in the regular re- models by relating various different notions of model, gions of the mesh. This belief is owing to the polar and we analyse structural operational semantics by ex- rendering artifacts which occur around extraordinary tracting a congruence rule format from a model the- points when λ is significantly larger than in the reg- ory. All aspects of structural operational semantics are ular regions. By constraining the tuning of subdivision addressed: behaviour, syntax, and rule-based inductive schemes to solutions which fulfill this condition we may definitions. prevent ourselves from finding the optimal limit sur- A variety of models for name-passing behaviour are face. We show that the perceived problem is purely a considered and developed. We relate classes of indexed rendering artifact and that it does not reflect the qual- labelled transition systems, proposed by Cattani and ity of the underlying limit surface. Using the bounded Sewell, with coalgebraic models proposed by Fiore and curvature Catmull-Clark scheme as an example, we de- Turi. A general notion of structured coalgebra is intro- scribe three practical methods by which this rendering duced and developed, and a natural notion of struc- artifact can be removed, thereby allowing us to tune tured bisimulation is related to Sangiorgi’s open bisim- subdivision schemes using any appropriate values of λ. ulation for the π-calculus. At first the state spaces are organised as presheaves, but it is reasonable to con- UCAM-CL-TR-690 strain the models to sheaves in a category known as the Schanuel topos. This sheaf topos is exhibited as equiv- Russell Glen Ross: alent to a category of named-sets proposed by Mon- tanari and Pistore for efficient verification of name- Cluster storage for commodity passing systems. Syntax for name-passing calculi involves variable computation binding and substitution. Gabbay and Pitts proposed June 2007, 178 pages, PDF nominal sets as an elegant model for syntax with bind- PhD thesis (Wolfson College, December 2006) ing, and we develop a framework for substitution in this context. The category of nominal sets is equivalent Abstract: Standards in the computer industry have to the Schanuel topos, and so syntax and behaviour can made basic components and entire architectures into be studied within one universe. commodities, and commodity hardware is increasingly An abstract account of structural operational se- being used for the heavy lifting formerly reserved for mantics was developed by Turi and Plotkin. They ex- specialised platforms. Now software and services are plained the inductive specification of a system by rules following. Modern updates to virtualization technology in the GSOS format of Bloom et al., in terms of ini- make it practical to subdivide commodity servers and tial algebra recursion for lifting a monad of syntax to manage groups of heterogeneous services using com- a category of behaviour. The congruence properties of modity operating systems and tools, so services can be bisimilarity can be observed at this level of generality. packaged and managed independent of the hardware We study this theory in the general setting of struc- on which they run. Computation as a commodity is tured coalgebras, and then for the specific case of name- soon to follow, moving beyond the specialised appli- passing systems, based on categories of nominal sets. cations typical of today’s utility computing. At the abstract level of category theory, classes of In this dissertation, I argue for the adoption of ser- rules are understood as natural transformations. In the vice clusters—clusters of commodity machines under concrete domain, though, rules for name-passing sys- central control, but running services in virtual machines tems are formulae in a suitable logical framework. By for arbitrary, untrusted clients—as the basic building imposing a format on rules in Pitts’s nominal logic, we block for an economy of flexible commodity computa- characterise a subclass of rules in the abstract domain. tion. I outline the requirements this platform imposes Translating the abstract results, we conclude that, for a on its storage system and argue that they are necessary name-passing process calculus defined by rules in this for service clusters to be practical, but are not found in format, a variant of open bisimilarity is a congruence. existing systems.

175 Next I introduce Envoy, a distributed file system for Cambridge). The motivation for the proposal was to service clusters. In addition to meeting the needs of a create an innovative research-oriented taught course new environment, Envoy introduces a novel file distri- that would be compatible with the broader policy goals bution scheme that organises metadata and cache man- of the Crucible network for research in interdisciplinary agement according to runtime demand. In effect, the design. As the course is not proceeding, the syllabus is file system is partitioned and control of each part given published here for use by educators and educational re- to the client that uses it the most; that client in turn searchers with interests in design teaching. acts as a server with caching for other clients that re- quire concurrent access. Scalability is limited only by UCAM-CL-TR-693 runtime contention, and clients share a perfectly consis- tent cache distributed across the cluster. As usage pat- Piotr Zielinski:´ terns change, the partition boundaries are updated dy- namically, with urgent changes made quickly and more Automatic classification of eventual minor optimisations made over a longer period of time. Experiments with the Envoy prototype demonstrate failure detectors that service clusters can support cheap and rapid de- July 2007, 21 pages, PDF ployment of services, from isolated instances to groups of cooperating components with shared storage de- Abstract: Eventual failure detectors, such as Ω or ♦P, mands. can make arbitrarily many mistakes before they start providing correct information. This paper shows that UCAM-CL-TR-691 any detector implementable in an purely asynchronous system can be implemented as a function of only the Neil A. Dodgson, Malcolm A. Sabin, order of most-recently heard-from processes. The finite- Richard Southern: ness of this representation means that eventual failure detectors can be enumerated and their relative strengths Preconditions on geometrically tested automatically. The results for systems with two sensitive subdivision schemes and three processes are presented. Implementability can also be modelled as a game August 2007, 13 pages, PDF between Prover and Disprover. This approach not only speeds up automatic implementability testing, but also Abstract: Our objective is to create subdivision schemes results in shorter and more intuitive proofs. I use this with limit surfaces which are surfaces useful in engi- technique to identify the new weakest failure detector neering (spheres, cylinders, cones etc.) without resort- anti-Ω and prove its properties. Anti-Ω outputs process ing to special cases. The basic idea explored by us pre- ids and, while not necessarily stabilizing, it ensures that viously in the curve case is that if the property that all some correct process is eventually never output. vertices lie on an object of the required class can be preserved through the subdivision refinement, it will be UCAM-CL-TR-694 preserved into the limit surface also. The next obvious step was to try a bivariate example. We therefore iden- Piotr Zielinski:´ tified the simplest possible scheme and implemented it. However, this misbehaved quite dramatically. This re- Anti-Ω: the weakest failure detector port, by doing the limit analysis, identifies why the mis- behaviour occurred, and draws conclusions about how for set agreement the problems should be avoided. July 2007, 24 pages, PDF

UCAM-CL-TR-692 Abstract: In the set agreement problem, n processes have to decide on at most n−1 of the proposed values. Alan F. Blackwell: This paper shows that the anti-Ω failure detector is both sufficient and necessary to implement set agreement in Toward an undergraduate an asynchronous shared-memory system equipped with programme in Interdisciplinary registers. Each query to anti-Ω returns a single process id; the specification ensures that there is a correct pro- Design cess whose id is returned only finitely many times. July 2007, 13 pages, PDF

Abstract: This technical report describes an experimen- tal syllabus proposal that was developed for the Cam- bridge Computer Science Tripos (the standard under- graduate degree programme in Computer Science at

176 UCAM-CL-TR-695 of measurement and simulation is used to explore the error characteristics of such systems. For a simple in- Karen Su, Inaki Berenguer, Ian J. Wassell, ertial navigation system (INS) based on the Xsens Mtx Xiaodong Wang: inertial measurement unit (IMU), we show that the av- erage error in position grows to over 150 m after 60 Efficient maximum-likelihood seconds of operation. The propagation of orientation errors caused by noise perturbing gyroscope signals is decoding of spherical lattice codes identified as the critical cause of such drift. By simu- July 2007, 29 pages, PDF lation we examine the significance of individual noise processes perturbing the gyroscope signals, identifying white noise as the process which contributes most to Abstract: A new framework for efficient and exact the overall drift of the system. Maximum-Likelihood (ML) decoding of spherical lat- Sensor fusion and domain specific constraints can tice codes is developed. It employs a double-tree struc- be used to reduce drift in INSs. For an example INS ture: The first is that which underlies established tree- we show that sensor fusion using magnetometers can search decoders; the second plays the crucial role of reduce the average error in position obtained by the guiding the primary search by specifying admissible system after 60 seconds from over 150 m to around candidates and is our focus in this report. Lattice 5 m. We conclude that whilst MEMS IMU technology codes have long been of interest due to their rich is rapidly improving, it is not yet possible to build a structure, leading to numerous decoding algorithms MEMS based INS which gives sub-meter position ac- for unbounded lattices, as well as those with axis- curacy for more than one minute of operation. aligned rectangular shaping regions. Recently, spheri- cal Lattice Space-Time (LAST) codes were proposed to realize the optimal diversity-multiplexing tradeoff of UCAM-CL-TR-697 MIMO channels. We address the so-called boundary control problem arising from the spherical shaping re- Chris J. Purcell: gion defining these codes. This problem is complicated because of the varying number of candidates potentially Scaling Mount Concurrency: under consideration at each search stage; it is not obvi- scalability and progress in concurrent ous how to address it effectively within the frameworks of existing schemes. Our proposed strategy is compat- algorithms ible with all sequential tree-search detectors, as well August 2007, 155 pages, PDF as auxiliary processing such as the MMSE-GDFE and PhD thesis (Trinity College, July 2007) lattice reduction. We demonstrate the superior perfor- mance and complexity profiles achieved when applying Abstract: As processor speeds plateau, chip manufac- the proposed boundary control in conjunction with two turers are turning to multi-processor and multi-core de- current efficient ML detectors and show an improve- signs to increase performance. As the number of simul- ment of 1dB over the state-of-the-art at a comparable taneous threads grows, Amdahl’s Law means the per- complexity. formance of programs becomes limited by the cost that does not scale: communication, via the memory sub- UCAM-CL-TR-696 system. Algorithm design is critical in minimizing these costs. Oliver J. Woodman: In this dissertation, I first show that existing instruc- tion set architectures must be extended to allow general An introduction to inertial navigation scalable algorithms to be built. Since it is impractical August 2007, 37 pages, PDF to entirely abandon existing hardware, I then present a reasonably scalable implementation of a map built on the widely-available compare-and-swap primitive, Abstract: Until recently the weight and size of in- which outperforms existing algorithms for a range of ertial sensors has prohibited their use in domains usages. such as human motion capture. Recent improvements Thirdly, I introduce a new primitive operation, and in the performance of small and lightweight micro- show that it provides efficient and scalable solutions to machined electromechanical systems (MEMS) inertial several problems before proving that it satisfies strong sensors have made the application of inertial techniques theoretical properties. Finally, I outline possible hard- to such problems possible. This has resulted in an in- ware implementations of the primitive with different creased interest in the topic of inertial navigation, how- properties and costs, and present results from a hard- ever current introductions to the subject fail to suffi- ware evaluation, demonstrating that the new primitive ciently describe the error characteristics of inertial sys- can provide good practical performance. tems. We introduce inertial navigation, focusing on strap- down systems based on MEMS devices. A combination

177 UCAM-CL-TR-698 Abstract: We present a new method for constructing a smooth manifold approximating a curve network or Simon J. Hollis: control mesh. In our two-step method, smooth ver- tex patches are initially defined by extrapolating and Pulse-based, on-chip interconnect then blending a univariate or bivariate surface repre- September 2007, 186 pages, PDF sentation. Each face is then constructed by blending to- PhD thesis (Queens’ College, June 2007) gether the segments of each vertex patch corresponding to the face corners. By approximating the input curve Abstract: This thesis describes the development of an network, rather than strictly interpolating it, we have on-chip point-to-point link, with particular emphasis greater flexibility in controlling surface behaviour and on the reduction of its global metal area footprint. have local control. Additionally no initial control mesh To reduce its metal footprint, the interconnect uses fitting or fairing needs to be performed, and no deriva- a serial transmission approach. 8-bit data is sent us- tive information is needed to ensure continuity at patch ing just two wires, through a pulse-based technique, boundaries. inspired by the GasP interconnect from Sun Microsys- tems. Data and control signals are transmitted bi- UCAM-CL-TR-700 directionally on a wire using this double-edged, pulse- based signalling protocol, and formatted using a vari- ant of dual-rail encoding. These choices enable a reduc- Maja Vukovic:´ tion in the number of wires needed, an improvement Context aware service composition in the acknowledgement overhead of the asynchronous protocol, and the ability to cross clock domains with- October 2007, 225 pages, PDF out synchronisation hazards. PhD thesis (Newnham College, April 2006) New, stateful, repeaters are demonstrated, and re- sults from spice simulations of the system show that Abstract: Context aware applications respond and data can be transferred at over 1Gbit/s, over 1mm of adapt to changes in the computing environment. For minimum-sized, minimally-spaced metal 5 wiring, on example, they may react when the location of the user a 180nm (0.18um) technology. This reduces to only or the capabilities of the device used change. Despite 926Mbit/s, when 10mm of wiring is considered, and the increasing importance and popularity of such ap- represents a channel utilisation of a very attractive 45% plications, advances in application models to support of theoretical capacity at this length. Analysis of laten- their development have not kept up. Legacy application cies, energy consumption, and area use are also pro- design models, which embed contextual dependencies vided. in the form of if-then rules specifying how applications The point-to-point link is then expanded with the should react to context changes, are still widely used. invention and demonstration of a router and an arbi- Such models are impractical to accommodate the large trated merge element, to produce a Network-on-Chip variety of possibly even unanticipated context types (NoC) design, called RasP. The full system is then eval- and their values. uated, and peak throughput is shown to be 763Mbit/s This dissertation proposes a new application model for 1mm of wiring, reducing to 599Mbit/s for 10mm of for building context aware applications, considering the narrow metal 5 interconnect. them as dynamically composed sequences of calls Finally, RasP is compared in performance with the to services, software components that perform well- Chain interconnect from the University of Manchester. defined computational operations and export open in- Results for the metrics of throughput, latency, energy terfaces through which they can be invoked. This work consumption and area footprint show that the two sys- employs goal-oriented inferencing from planning tech- tems perform very similarly — the maximum abso- nologies for selecting the services and assembling the lute deviation is under 25% for throughput, latency sequence of their execution, allowing different compo- and area; and the energy-efficiency of RasP is approx- sitions to result from different context parameters such imately twice that of Chain. Between the two systems, as resources available, time constraints, and user loca- RasP has the smaller latency, energy and area require- tion. Contextual changes during the execution of the ments and is shown to be a viable alternative NoC de- services may trigger further re-composition causing the sign. application to evolve dynamically. An important challenge in providing a context UCAM-CL-TR-699 aware service composition facility is dealing with fail- ures that may occur, for instance as a result of con- Richard Southern, Neil A. Dodgson: text changes or missing service descriptions. To handle A smooth manifold based composition failures, this dissertation introduces Goal- Morph, a system which transforms failed composition construction of approximating lofted requests into alternative ones that can be solved. surfaces This dissertation describes the design and imple- mentation of the proposed framework for context October 2007, 17 pages, PDF aware service composition. Experimental evaluation

178 of a realistic infotainment application demonstrates Abstract: Object-oriented approaches to software de- that the framework provides an effcient and scal- sign and implementation have gained enormous popu- able solution. Furthermore, it shows that GoalMorph larity over the past two decades. However, whilst mod- transforms goals successfully, increasing the utility of els of software systems routinely allow software engi- achieved goals without imposing a prohibitive compo- neers to express relationships between objects, object- sition time overhead. oriented programming languages lack this ability. In- By developing the proposed framework for fault- stead, relationships must be encoded using complex ref- tolerant, context aware service composition this work erence structures. When the model cannot be expressed ultimately lowers the barrier for building extensible ap- directly in code, it becomes more difficult for program- plications that automatically adapt to the user’s con- mers to see a correspondence between design and im- text. This represents a step towards a new paradigm plementation – the model no longer faithfully docu- for developing adaptive software to accommodate the ments the code. As a result, programmer intuition is increasing dynamicity of computing environments. lost, and error becomes more likely, particularly during maintenance of an unfamiliar software system. UCAM-CL-TR-701 This thesis explores extensions to object-oriented languages so that relationships may be expressed with Jacques Jean-Alain Fournier: the same ease as objects. Two languages with relation- ships are specified: RelJ, which offers relationships in Vector microprocessors for a class-based language based on Java, and QSigma, cryptography which is an object calculus with heap query. In RelJ, relationship declarations exist at the same October 2007, 174 pages, PDF level as class declarations: relationships are named, they PhD thesis (Trinity Hall, April 2007) may have fields and methods, they may inherit from one Abstract: Embedded security devices like ‘Trusted Plat- another and their instances may be referenced just like forms’ require both scalability (of power, performance objects. Moving into the object-based world, QSigma and area) and flexibility (of software and countermea- is based on the sigma-calculi of Abadi and Cardelli, ex- sures). This thesis illustrates how data parallel tech- tended with the ability to query the heap. Heap query niques can be used to implement scalable architectures allows objects to determine how they are referenced by for cryptography. Vector processing is used to pro- other objects, such that single references are sufficient vide high performance, power efficient and scalable for establishing an inter-object relationship observable processors. A programmable vector 4-stage pipelined by all participants. Both RelJ and QSigma are equipped co-processor, controlled by a scalar MIPS compatible with a formal type system and semantics to ensure type processor, is described. The instruction set of the co- safety in the presence of these extensions. processor is defined for cryptographic algorithms like By giving formal models of relationships in both AES and Montgomery modular multiplication for RSA class- and object-based settings, we can obtain general and ECC. The instructions are assessed using an in- principles for relationships in programming languages struction set simulator based on the ArchC tool. This and, therefore, establish a correspondence between im- instruction set simulator is used to see the impact of plementation and design. varying the vector register depth (p) and the number of vector processing units (r). Simulations indicate that UCAM-CL-TR-703 for vector versions of AES, RSA and ECC the perfor- mance improves in O(log(r)). A cycle-accurate synthe- Jon Crowcroft, Tim Deegan, sisable Verilog model of the system (VeMICry) is im- Christian Kreibich, Richard Mortier, plemented in TSMC’s 90nm technology and used to show that the best area/power/performance tradeoff is Nicholas Weaver: reached for r = (p/4). Also, this highly scalable design Lazy Susan: dumb waiting as proof allows area/power/performance trade-offs to be made for a panorama of applications ranging from smart- of work cards to servers. This thesis is, to my best knowledge, the first attempt to implement embedded cryptography November 2007, 23 pages, PDF using vector processing techniques. Abstract: The open nature of Internet services has been UCAM-CL-TR-702 of great value to users, enabling dramatic innovation and evolution of services. However, this openness per- Alisdair Wren: mits many abuses of open-access Internet services such as web, email, and DNS. To counteract such abuses, a Relationships for object-oriented number of so called proof-of-work schemes have been programming languages proposed. They aim to prevent or limit such abuses by demanding potential clients of the service to prove November 2007, 153 pages, PDF that they have carried out some amount of work before PhD thesis (Sidney Sussex College, March 2007)

179 they will be served. In this paper we show that exist- Abstract: Most modern compilers are based on vari- ing resource-based schemes have several problems, and ants of the Control Flow Graph. Developments on instead propose latency-based proof-of-work as a solu- this representation—specifically, SSA form and the Pro- tion. We describe centralised and distributed variants, gram Dependence Graph (PDG)—have focused on introducing the problem class of non-parallelisable adding and refining data dependence information, and shared secrets in the process. We also discuss applica- these suggest the next step is to use a purely data- tion of this technique at the network layer as a way to dependence-based representation such as the VDG prevent Internet distributed denial-of-service attacks. (Ernst et al.) or VSDG (Johnson et al.). This thesis studies such representations, identifying UCAM-CL-TR-704 key differences in the information carried by the VSDG and several restricted forms of PDG, which relate to Paul William Hunter: functional programming and continuations. We unify these representations in a new framework for specifying Complexity and infinite games on the sharing of resources across a computation. We study the problems posed by using the VSDG, finite graphs and argue that existing techniques have not solved the November 2007, 170 pages, PDF sequentialization problem of mapping VSDGs back to CFGs. We propose a new compiler architecture break- PhD thesis (Hughes Hall, July 2007) ing sequentialization into several stages which focus on different characteristics of the input VSDG, and tend Abstract: This dissertation investigates the interplay be- to be concerned with different properties of the out- tween complexity, infinite games, and finite graphs. We put and target machine. The stages integrate a wide va- present a general framework for considering two-player riety of important optimizations, exploit opportunities games on finite graphs which may have an infinite num- offered by the VSDG to address many common phase- ber of moves and we consider the computational com- order problems, and unify many operations previously plexity of important related problems. Such games are considered distinct. becoming increasingly important in the field of theo- Focusing on branch-intensive code, we demonstrate retical computer science, particularly as a tool for for- how effective control flow—sometimes superior to that mal verification of non-terminating systems. The frame- of the original source code, and comparable to the best work introduced enables us to simultaneously con- CFG optimization techniques—can be reconstructed sider problems on many types of games easily, and this from just the dataflow information comprising the is demonstrated by establishing previously unknown VSDG. Further, a wide variety of more invasive opti- complexity bounds on several types of games. mizations involving the duplication and specialization We also present a general framework which uses in- of program elements are eased because the VSDG re- finite games to define notions of structural complexity laxes the CFG’s overspecification of instruction and for directed graphs. Many important graph parameters, branch ordering. Specifically we identify the optimiza- from both a graph theoretic and algorithmic perspec- tion of nested branches as generalizing the problem of tive, can be defined in this system. By considering nat- minimizing boolean expressions. ural generalizations of these games to directed graphs, We conclude that it is now practical to discard the we obtain a novel feature of digraph complexity: di- control flow information rather than maintain it in par- rected connectivity. We show that directed connectivity allel as is done in many previous approaches (e.g. the is an algorithmically important measure of complexity PDG). by showing that when it is limited, many intractable problems can be efficiently solved. Whether it is struc- turally an important measure is yet to be seen, however UCAM-CL-TR-706 this dissertation makes a preliminary investigation in this direction. Steven J. Murdoch: We conclude that infinite games on finite graphs play an important role in the area of complexity in the- Covert channel vulnerabilities in oretical computer science. anonymity systems

UCAM-CL-TR-705 December 2007, 140 pages, PDF PhD thesis (Girton College, August 2007) Alan C. Lawrence: Abstract: The spread of wide-scale Internet surveillance Optimizing compilation with the has spurred interest in anonymity systems that protect users’ privacy by restricting unauthorised access to their Value State Dependence Graph identity. This requirement can be considered as a flow December 2007, 183 pages, PDF control policy in the well established field of multi- level secure systems. I apply previous research on covert PhD thesis (Churchill College, May 2007)

180 channels (unintended means to communicate in viola- while maintaining low power consumption and sili- tion of a security policy) to analyse several anonymity con area usage. This thesis presents a new architec- systems in an innovative way. ture for a high-performance embedded processor, based One application for anonymity systems is to prevent upon the instruction-level distributed processing (ILDP) collusion in competitions. I show how covert channels methodology. A qualitative analysis of the complex- may be exploited to violate these protections and con- ity of an ILDP implementation as compared to both struct defences against such attacks, drawing from pre- a typical scalar RISC CPU and a superscalar design vious covert channel research and collusion-resistant is provided, which shows that the ILDP architecture voting systems. eliminates or greatly reduces the size of a number of In the military context, for which multilevel secure structures present in a superscalar architecture, allow- systems were designed, covert channels are increasingly ing its complexity and power consumption to compare eliminated by physical separation of interconnected favourably with a simple scalar design. single-role computers. Prior work on the remaining net- The performance of an implementation of the ILDP work covert channels has been solely based on proto- architecture is compared to some typical processors col specifications. I examine some protocol implemen- used in high-performance embedded systems. The ef- tations and show how the use of several covert channels fect on performance of a number of the architectural can be detected and how channels can be modified to parameters is analysed, showing that many of the par- resist detection. allel structures used within the processor can be scaled I show how side channels (unintended information to provide less parallelism with little cost to the over- leakage) in anonymity networks may reveal the be- all performance. In particular, the size of the register haviour of users. While drawing on previous research file can be greatly reduced with little average effect on on traffic analysis and covert channels, I avoid the performance – a size of 32 registers, with 16 visible in traditional assumption of an omnipotent adversary. the instruction set, is shown to provide a good trade-off Rather, these attacks are feasible for an attacker with between area/power and performance. limited access to the network. The effectiveness of these Several novel developments to the ILDP architec- techniques is demonstrated by experiments on a de- ture are then described and analysed. Firstly, a scheme ployed anonymity network, Tor. to halve the number of processing elements and thus Finally, I introduce novel covert and side channels greatly reduce silicon area and power consumption is which exploit thermal effects. Changes in temperature outlined but proves to result in a 12–14% drop in per- can be remotely induced through CPU load and mea- formance. Secondly, a method to reduce the area and sured by their effects on crystal clock skew. Experi- power requirements of the memory logic in the archi- ments show this to be an effective attack against Tor. tecture is presented which can achieve similar perfor- This side channel may also be usable for geolocation mance to the original architecture with a large reduc- and, as a covert channel, can cross supposedly infalli- tion in area and power requirements or, at an increased ble air-gap security boundaries. area/power cost, can improve performance by approxi- This thesis demonstrates how theoretical models mately 24%. Finally, a new organisation for the register and generic methodologies relating to covert channels file is proposed, which reduces the silicon area used by may be applied to find practical solutions to problems the register file by approximately three-quarters and al- in real-world anonymity systems. These findings con- lows even greater power savings, especially in the case firm the existing hypothesis that covert channel anal- where processing elements are power gated. ysis, vulnerabilities and defences developed for multi- Overall, it is shown that the ILDP methodology level secure systems apply equally well to anonymity is a viable approach for future de- systems. sign, and several new variants on the architecture are contributed. Several areas of useful future research are UCAM-CL-TR-707 highlighted, especially with respect to compiler design for the ILDP paradigm. Ian Caulfield: UCAM-CL-TR-708 Complexity-effective superscalar embedded processors using Chi-Kin Chau, Jon Crowcroft, instruction-level distributed Kang-Won Lee, Starsky H.Y. Wong: processing IDRM: Inter-Domain Routing December 2007, 130 pages, PDF Protocol for Mobile Ad Hoc PhD thesis (Queens’ College, May 2007) Networks

Abstract: Modern trends in mobile and embedded de- January 2008, 24 pages, PDF vices require ever increasing levels of performance,

181 Abstract: Inter-domain routing is an important compo- which we call: ‘multi-channel security protocols’, by nent to allow interoperation among heterogeneous net- leveraging on multiple channels, with different prop- work domains operated by different organizations. Al- erties, existing in the said environment. We gained an though inter-domain routing has been extensively stud- appreciation of the fact that location privacy is really a ied in the Internet, it remains relatively unexplored in multi-layer problem, particularly so in ubicomp, where the Mobile Ad Hoc Networks (MANETs) space. In an attacker often may have access to different layers. MANETs, the inter-domain routing problem is chal- Our contributions in this area are to advance the design lenged by: (1) dynamic network topology, and (2) di- for location privacy by introducing a MAC-layer pro- verse intra-domain ad hoc routing protocols. In this posal with stronger unlinkability, and a physical-layer paper, we propose a networking protocol called IDRM proposal with stronger unobservability. (Inter-Domain Routing Protocol for MANETs) to en- able interoperation among MANETs. IDRM can han- UCAM-CL-TR-710 dle the dynamic nature of MANETs and support policy- based routing similarly to BGP. We first discuss the de- Lucy G. Brace-Evans: sign challenges for inter-domain routing in MANETs, and then present the design of IDRM with illustrative Event structures with persistence examples. Finally, we present a simulation-based study to understand the operational effectiveness of inter- February 2008, 113 pages, PDF domain routing and show that the overhead of IDRM PhD thesis (St. John’s College, October 2007) is moderate. Abstract: Increasingly, the style of computation is UCAM-CL-TR-709 changing. Instead of one machine running a program sequentially, we have systems with many individual Ford Long Wong: agents running in parallel. The need for mathematical models of such computations is therefore ever greater. Protocols and technologies for There are many models of concurrent computa- tions. Such models can, for example, provide a seman- security in pervasive computing and tics to process calculi and thereby suggest behavioural communications equivalences between processes. They are also key to the development of automated tools for reasoning January 2008, 167 pages, PDF about concurrent systems. In this thesis we explore PhD thesis (Girton College, August 2007) some applications and generalisations of one partic- ular model – event structures. We describe a variety Abstract: As the state-of-the-art edges towards Mark of kinds of morphism between event structures. Each Weiser’s vision of ubiquitous computing (ubicomp), we kind expresses a different sort of behavioural relation- found that we have to revise some previous assump- ship. We demonstrate the way in which event structures tions about security engineering for this domain. Ubi- can model both processes and types of processes by re- comp devices have to be networked together to be calling a semantics for Affine HOPLA, a higher order able to realize their promise. To communicate securely process language. This is given in terms of asymmet- amongst themselves, they have to establish secret ses- ric spans of event structures. We show that such spans sion keys, but this is a difficult problem when this is support a trace construction. This allows the mod- done primarily over radio in an ad-hoc scenario, i.e. elling of feedback and suggests a semantics for non- without the aid of an infrastructure (such as a PKI), deterministic dataflow processes in terms of spans. The and when it is assumed that the devices are resource- semantics given is shown to be consistent with Kahn’s constrained and cannot perform complex calculations. fixed point construction when we consider spans mod- Secondly, when ubicomp devices are carried by users elling deterministic processes. as personal items, their permanent identifiers inadver- A generalisation of event structures to include per- tently allow the users to be tracked, to the detriment sistent events is proposed. Based on previously de- of user privacy. Unless there are deliberate improve- scribed morphisms between classical event structures, ments in designing for location privacy, ubicomp de- we define several categories of event structures with vices can be trivially detected, and linked to individual persistence. We show that, unlike for the correspond- users, with discomfiting echoes of a surveillance soci- ing categories of classical event structures, all are iso- ety. Our findings and contributions are thus as follow. morphic to Kleisli categories of monads on the most In considering session key establishment, we learnt that restricted category. Amongst other things, this provides asymmetric cryptography is not axiomatically infeasi- us with a way of understanding the asymmetric spans ble, and may in fact be essential, to counter possible mentioned previously as symmetric spans where one attackers, for some of the more computationally ca- morphism is modified by a monad. Thus we provide a pable (and important) devices. We next found existing general setting for future investigations involving event attacker models to be inadequate, along with existing structures. models of bootstrapping security associations, in ubi- comp. We address the inadequacies with a contribution

182 UCAM-CL-TR-711 UCAM-CL-TR-713 Saar Drimer, Steven J. Murdoch, Pan Hui: Ross Anderson: Thinking inside the box: People are the network: system-level failures of tamper experimental design and evaluation of proofing social-based forwarding algorithms February 2008, 37 pages, PDF March 2008, 160 pages, PDF PhD thesis (Churchill College, July 2007) Abstract: PIN entry devices (PEDs) are critical secu- rity components in EMV smartcard payment systems Abstract: Cooperation binds but also divides human as they receive a customer’s card and PIN. Their ap- society into communities. Members of the same com- proval is subject to an extensive suite of evaluation and munity interact with each other preferentially. There is certification procedures. In this paper, we demonstrate structure in human society. Within society and its com- that the tamper proofing of PEDs is unsatisfactory, as munities, individuals have varying popularity. Some is the certification process. We have implemented prac- people are more popular and interact with more people tical low-cost attacks on two certified, widely-deployed than others; we may call them hubs. I develop methods PEDs – the Ingenico i3300 and the Dione Xtreme. By to extract this kind of social information from exper- tapping inadequately protected smartcard communica- imental traces and use it to choose the next hop for- tions, an attacker with basic technical skills can ex- warders in Pocket Switched Networks (PSNs). I find pose card details and PINs, leaving cardholders open that by incorporating social information, forwarding to fraud. We analyze the anti-tampering mechanisms of efficiency can be significantly improved. For practical the two PEDs and show that, while the specific protec- reasons, I also develop distributed algorithms for infer- tion measures mostly work as intended, critical vulner- ring communities. abilities arise because of the poor integration of cryp- Forwarding in Delay Tolerant Networks (DTNs), or tographic, physical and procedural protection. As these more particularly PSNs, is a challenging problem since vulnerabilities illustrate a systematic failure in the de- human mobility is usually difficult to predict. In this sign process, we propose a methodology for doing it thesis, I aim to tackle this problem using an experi- better in the future. They also demonstrate a serious mental approach by studying real human mobility. I problem with the Common Criteria. We discuss the in- perform six mobility experiments in different environ- centive structures of the certification process, and show ments. The resultant experimental datasets are valuable how they can lead to problems of the kind we identi- for the research community. By analysing the experi- fied. Finally, we recommend changes to the Common mental data, I find out that the inter-contact time of Criteria framework in light of the lessons learned. humans follows a power-law distribution with coeffi- An abridged version of this paper is to appear at the cient smaller than 1 (over the range of 10 minutes to IEEE Symposium on Security and Privacy, May 2008, 1 day). I study the limits of “oblivious” forwarding in Oakland, CA, US. the experimental environment and also the impact of the power-law coefficient on message delivery. UCAM-CL-TR-712 In order to study social-based forwarding, I develop methods to infer human communities from the data Christian Richardt: and use these in the study of social-aware forwarding. Flash-exposure high dynamic range I propose several social-aware forwarding schemes and evaluate them on different datasets. I find out that by imaging: virtual photography and combining community and centrality information, for- depth-compensating flash warding efficiency can be significantly improved, and I call this scheme BUBBLE forwarding with the anal- March 2008, 9 pages, PDF ogy that each community is a BUBBLE with big bub- Abstract: I present a revised approach to flash-exposure bles containing smaller bubbles. For practical deploy- high dynamic range (HDR) imaging and demonstrate ment of these algorithms, I propose distributed com- two applications of this image representation. The first munity detection schemes, and also propose methods application enables the creation of realistic ‘virtual pho- to approximate node centrality in the system. tographs’ for arbitrary flash-exposure settings, based Besides the forwarding study, I also propose a lay- on a single flash-exposure HDR image. The second ap- erless data-centric architecture for the PSN scenario to plication is a novel tone mapping operator for flash- address the problem with the status quo in communica- exposure HDR images based on the idea of an ‘intelli- tion (e.g. an infrastructuredependent and synchronous gent flash’. It compensates for the depth-related bright- API), which brings PSN one step closer to real-world ness fall-off occurring in flash photographs by taking deployment. the ambient illumination into account.

183 UCAM-CL-TR-714 UCAM-CL-TR-715

Tim Moreton: Feng Hao: A wide-area file system for migrating On using fuzzy data in security virtual machines mechanisms March 2008, 163 pages, PDF April 2008, 69 pages, PDF PhD thesis (King’s College, February 2007) PhD thesis (Queens’ College, April 2007) Abstract: Improvements in processing power and core Abstract: Under the microscope, every physical object bandwidth set against fundamental constraints on has unique features. It is impossible to clone an object, wide-area latency increasingly emphasise the position reproducing exactly the same physical traits. This un- in the network at which services are deployed. The clonability principle has been applied in many security XenoServer project is building a platform for dis- applications. For example, the science of biometrics is tributed computing that facilitates the migration of ser- about measuring unique personal features. It can au- vices between hosts to minimise client latency and bal- thenticate individuals with a high level of assurance. ance load in response to changing patterns of demand. Similarly, a paper document can be identified by mea- Applications run inside whole-system virtual machines, suring its unique physical properties, such as randomly- allowing the secure multiplexing of host resources. interleaving fiber structure. Since services are specified in terms of a complete Unfortunately, when physical measurements are in- root file system and kernel image, a key component volved, errors arise inevitably and the obtained data of this architecture is a substrate that provides an ab- are fuzzy by nature. This causes two main problems: straction akin to local disks for these virtual machines, 1) fuzzy data cannot be used as a cryptographic key, whether they are running, migrating or suspended. as cryptography demands the key be precise; 2) fuzzy However, the same combination of wide-area latency, data cannot be sorted easily, which prevents efficient constrained bandwidth and global scale that motivates information retrieval. In addition, biometric measure- the XenoServer platform itself impedes the location, ments create a strong binding between a person and his management and rapid transfer of storage between de- unique features, which may conflict with personal pri- ployment sites. This dissertation describes Xest, a novel vacy. In this dissertation, we study these problems in wide-area file system that aims to address these chal- detail and propose solutions. lenges. First, we propose a scheme to derive error-free keys I examine Xest’s design, centred on the abstraction from fuzzy data, such as iris codes. There are two of virtual disks, volumes that allow only a single writer types of errors within iris codes: background-noise er- yet are transparently available despite migration. Vir- rors and burst errors. Accordingly, we devise a two- tual disks support the creation of snapshots and may layer error correction technique, which first corrects the be rapidly forked into copies that can be modified inde- background-noise errors using a Hadamard code, then pendently. This encourages an architectural separation the burst errors using a Reed-Solomon code. Based on into node-local file system and global content distribu- a database of 700 iris images, we demonstrate that an tion framework and reduces the dependence of local error-free key of 140 bits can be reliably reproduced operations on wide-area interactions. from genuine iris codes with a 99.5% success rate. In I then describe how Xest addresses the dual problem addition, despite the irrevocability of the underlying of latency and scale by managing, caching, advertising biometric data, the keys produced using our technique and retrieving storage on the basis of groups, sets of can be easily revoked or updated. files that correspond to portions of inferred working Second, we address the search problem for a large sets of client applications. Coarsening the granularity fuzzy database that stores iris codes or data with a sim- of these interfaces further decouples local and global ilar structure. Currently, the algorithm used in all public activity: fewer units can lead to fewer interactions and deployments of iris recognition is to search exhaustively the maintenance of less addressing state. The precision through a database of iris codes, looking for a match of these interfaces is retained by clustering according to that is close enough. We propose a much more efficient observed access patterns and, in response to evidence of search algorithm: Beacon Guided Search (BGS). BGS poor clusterings, selectively degrading groups into their works by indexing iris codes, adopting a “multiple col- constituent elements. liding segments principle” along with an early termina- I evaluate a real deployment of Xest over a wide- tion strategy to reduce the search range dramatically. area testbed. Doing so entails developing new tools for We evaluate this algorithm using 632,500 real-world capturing and replaying traces to simulate virtual ma- iris codes, showing a substantial speed-up over exhaus- chine workloads. My results demonstrate the practical- tive search with a negligible loss of precision. In addi- ity and high performance of my design and illustrate tion, we demonstrate that our empirical findings match the trade-offs involved in modifying the granularity of theoretical analysis. established storage interfaces.

184 Finally, we study the anonymous-veto problem, Abstract: The simulation of human behaviour is a key which is more commonly known as the Dining Cryp- area of computer graphics as there is currently a great tographers problem: how to perform a secure multi- demand for animations consisting of virtual human party computation of the boolean-OR function, while characters, ranging from film special effects to building preserving the privacy of each input bit. The solution to design. Currently, animated characters can either be la- this problem has general applications in security going boriously created by hand, or by using an automated way beyond biometrics. Even though there have been system: however, results from the latter may still look several solutions presented over the past 20 years, we artificial and require much further manual work. propose a new solution called: Anonymous Veto Net- The aim of this work is to improve the automated work (AV-net). Compared with past work, the AV-net simulation of human behaviour by making use of ideas protocol provides the strongest protection of each del- from psychology research; the ways in which this re- egate’s privacy against collusion; it requires only two search has been used are made clear throughout this rounds of broadcast, fewer than any other solutions; thesis. It has influenced all aspects of the design: the computational load and bandwidth usage are the • Collision avoidance techniques are based on ob- lowest among the available techniques; and our proto- served practices. col does not require any private channels or third par- • Actors have simulated vision and attention. ties. Overall, it seems unlikely that, with the same un- • Actors can be given a variety of moods and emo- derlying technology, there can be any other solutions tions to affect their behaviour. significantly more efficient than ours. This thesis discusses the benefits of the simulation of attention; this technique recreates the eye movements UCAM-CL-TR-716 of each actor, and allows each actor to build up its own mental model of its surroundings. It is this model that Gavin M. Bierman, Matthew J. Parkinson, the actor then uses in its decisions on how to behave: techniques for collision prediction and collision avoid- James Noble: ance are discussed. On top of this basic behaviour, vari- UpgradeJ: Incremental typechecking ability is introduced by allowing all actors to have dif- ferent sets of moods and emotions, which influence all for class upgrades aspects of their behaviour. The real-time 3D simulation created to demonstrate the actors’ behaviour is also de- April 2008, 35 pages, PDF scribed. This thesis demonstrates that the use of techniques Abstract: One of the problems facing developers is the based on psychology research leads to a qualitative and constant evolution of components that are used to build quantitative improvement in the simulation of human applications. This evolution is typical of any multi- behaviour; this is shown through a variety of pictures person or multi-site software project. How can we pro- and videos, and by results of numerical experiments gram in this environment? More precisely, how can lan- and user testing. Results are compared with previous guage design address such evolution? In this paper we work in the field, and with real human behaviour. attack two significant issues that arise from constant component evolution: we propose language- level ex- UCAM-CL-TR-718 tensions that permit multiple, co-existing versions of classes and the ability to dynamically upgrade from one version of a class to another, whilst still maintaining Tyler Moore: type safety guarantees and requiring only lightweight Cooperative attack and defense in extensions to the runtime infrastructure. We show how our extensions, whilst intuitive, provide a great deal of distributed networks power by giving a number of examples. Given the sub- tlety of the problem, we formalize a core fragment of June 2008, 172 pages, PDF our language and prove a number of important safety PhD thesis (St. John’s College, March 2008) properties. Abstract: The advance of computer networking has UCAM-CL-TR-717 made cooperation essential to both attackers and de- fenders. Increased decentralization of network owner- ship requires devices to interact with entities beyond Stephen Julian Rymill: their own realm of control. The distribution of in- Psychologically-based simulation of telligence forces decisions to be taken at the edge. The exposure of devices makes multiple, simultaneous human behaviour attacker-chosen compromise a credible threat. Motiva- tion for this thesis derives from the observation that it June 2008, 250 pages, PDF is often easier for attackers to cooperate than for de- PhD thesis (Jesus College, 2006) fenders to do so. I describe a number of attacks which exploit cooperation to devastating effect. I also propose

185 and evaluate defensive strategies which require cooper- Abstract: An “Intelligent Book” is a Web-based text- ation. book that contains exercises that are backed by com- I first investigate the security of decentralized, or puter models or reasoning systems. Within the exer- ‘ad-hoc’, wireless networks. Many have proposed pre- cises, students work using appropriate graphical no- loading symmetric keys onto devices. I describe two tations and diagrams for the subject matter, and com- practical attacks on these schemes. First, attackers may ments and feedback from the book are related into the compromise several devices and share the pre-loaded content model of the book. The content model can be secrets to impersonate legitimate users. Second, when- extended by its readers. This dissertation examines the ever some keys are not pre-assigned but exchanged question of how to provide an Intelligent Book that upon deployment, a revoked attacker can rejoin the can support undergraduate questions in Number The- network. ory, and particularly questions that allow the student to I next consider defensive strategies where devices write a proof as the answer. Number Theory questions collectively decide to remove a malicious device from pose a challenge not only because the student is work- the network. Existing voting-based protocols are made ing on an unfamiliar topic in an unfamiliar syntax, but resilient to the attacks I have developed, and I propose also because there is no straightforward procedure for alternative strategies that can be more efficient and se- how to prove an arbitrary Number Theory problem. cure. First, I describe a reelection protocol which relies The main contribution is a system for support- on positive affirmation from peers to continue partici- ing student-written proof exercises, backed by the Is- pation. Then I describe a more radical alternative called abelle/HOL automated proof assistant and a set of suicide: a good device removes a bad one unilaterally teaching scripts. Students write proofs using Math- by declaring both devices dead. Suicide offers signifi- sTiles: a graphical notation consisting of composable cant improvements in speed and efficiency compared to tiles, each of which can contain an arbitrary piece of voting-based decision mechanisms. I then apply suicide mathematics or logic written by the teacher. These tiles and voting to revocation in vehicular networks. resemble parts of the proof as it might be written on pa- Next, I empirically investigate attack and defense per, and are translated into Isabelle/HOL’ws Isar syntax in another context: phishing attacks on the Internet. on the server. Unlike traditional syntax-directed editors, I have found evidence that one group responsible for MathsTiles allow students to freely sketch out parts of half of all phishing, the rock-phish gang, cooperates by an answer and do not constrain the order in which an pooling hosting resources and by targeting many banks answer is written. They also allow details of the lan- simultaneously. These cooperative attacks are shown to guage to change between or even during questions. be far more effective. A number of smaller contributions are also pre- I also study the behavior of defenders – banks and sented. By using the dynamic nature of MathsTiles, Internet service providers – who must cooperate to a type of proof exercise is developed where the stu- remove malicious sites. I find that phishing-website dent must search for the statements he or she wishes lifetimes follow a long-tailed lognormal distribution. to use. This allows questions to be supported by infor- While many sites are removed quickly, others remain mal modelling, making them much easier to write, but much longer. I examine several feeds from professional still ensures that the interface does not act as a prop for ‘take-down’ companies and find that a lack of data the answer. The concept of searching for statements is sharing helps many phishing sites evade removal for extended to develop “massively multiple choice” ques- long time periods. tions: a mid-point between the multiple choice and One anti-phishing organization has relied on vol- short answer formats. The question architecture that unteers to submit and verify suspected phishing sites. is presented is applicable across different notational I find its voting-based decision mechanism to be slower forms and different answer analysis techniques. The and less comprehensive than unilateral verification per- content architecture uses an informal ontology that en- formed by companies. I also note that the distribu- ables students and untrained users to add and adapt tion of user participation is highly skewed, leaving the content within the book, including adding their own scheme vulnerable to manipulation. chapters, while ensuring the content can also be re- ferred to by the models and systems that advise students UCAM-CL-TR-719 during exercises.

William H. Billingsley: UCAM-CL-TR-720 The Intelligent Book: technologies for Lauri I.W. Pesonen: intelligent and adaptive textbooks, A capability-based access control focussing on Discrete Mathematics architecture for multi-domain June 2008, 156 pages, PDF publish/subscribe systems PhD thesis (Wolfson College, April 2007) June 2008, 175 pages, PDF PhD thesis (Wolfson College, December 2007)

186 Abstract: Publish/subscribe is emerging as the favoured within the family of statistical and machine learning communication paradigm for large-scale, wide-area (ML) methods and consists of a framework within distributed systems. The publish/subscribe many-to- which a mechanical ‘learner’ induces a functional map- many interaction model together with asynchronous ping between elements drawn from a particular sample messaging provides an efficient transport for highly dis- space and a set of designated target classes. It is appli- tributed systems in high latency environments with di- cable to a wide range of NLP problems and has met rect peer-to-peer interactions amongst the participants. with a great deal of success due to its flexibility and Decentralised publish/subscribe systems implement firm theoretical foundations. the event service as a network of event brokers. The The first task we investigate, topic classification, is broker network makes the system more resilient to firmly established within the NLP/ML communities as a failures and allows it to scale up efficiently as the benchmark application for classification research. Our number of event clients increases. In many cases such aim is to arrive at a deeper understanding of how class distributed systems will only be feasible when imple- granularity affects classification accuracy and to assess mented over the Internet as a joint effort spanning mul- the impact of representational issues on different classi- tiple administrative domains. The participating mem- fication models. Our second task, content-based spam bers will benefit from the federated event broker net- filtering, is a highly topical application for classification works both with respect to the size of the system as techniques due to the ever-worsening problem of unso- well as its fault-tolerance. licited email. We assemble a new corpus and formulate Large-scale, multi-domain environments require ac- a state-of-the-art classifier based on structured language cess control; users will have different privileges for model components. Thirdly, we introduce the problem sending and receiving instances of different event types. of anonymisation, which has received little attention to Therefore, we argue that access control is vital for date within the NLP community. We define the task in decentralised publish/subscribe systems, consisting of terms of obfuscating potentially sensitive references to multiple independent administrative domains, to ever real world entities and present a new publicly-available be deployable in large scale. benchmark corpus. We explore the implications of the This dissertation presents MAIA, an access con- subjective nature of the problem and present an inter- trol mechanism for decentralised, type-based pub- active model for anonymising large quantities of data lish/subscribe systems. While the work concentrates based on syntactic analysis and active learning. Finally, on type-based publish/subscribe the contributions are we investigate the task of hedge classification, a rel- equally applicable to both topic and content-based pub- atively new application which is currently of grow- lish/subscribe systems. ing interest due to the expansion of research into the Access control in distributed publish/subscribe re- application of NLP techniques to scientific literature quires secure, distributed naming, and mechanisms for for information extraction. A high level of annotation enforcing access control policies. The first contribution agreement is obtained using new guidelines and a new of this thesis is a mechanism for names to be referenced benchmark corpus is made publicly available. As part unambiguously from policy without risk of forgeries. of our investigation, we develop a probabilistic model The second contribution is a model describing how for training data acquisition within a semi-supervised signed capabilities can be used to grant domains and learning framework which is explored both theoreti- their members’ access rights to event types in a scal- cally and experimentally. able and expressive manner. The third contribution is a Throughout the report, many common themes model for enforcing access control in the decentralised of fundamental importance to classification for event service by encrypting event content. NLP are addressed, including sample representa- We illustrate the design and implementation of tion, performance evaluation, learning model selec- MAIA with a running example of the UK Police In- tion, linguistically-motivated feature engineering, cor- formation Technology Organisation and the UK police pus construction and real-world application. forces. UCAM-CL-TR-722 UCAM-CL-TR-721 Mbou Eyole-Monono: Ben W. Medlock: Energy-efficient sentient computing Investigating classification for July 2008, 138 pages, PDF natural language processing tasks PhD thesis (Trinity College, January 2008) June 2008, 138 pages, PDF Abstract: PhD thesis (Fitzwilliam College, September 2007) In a bid to improve the interaction between computers and humans, it is becoming necessary to make increasingly larger deployments of sensor net- Abstract: This report investigates the application of works. These clusters of small electronic devices can classification techniques to four natural language pro- be embedded in our surroundings and can detect and cessing (NLP) tasks. The classification paradigm falls

187 react to physical changes. They will make comput- The animation manifold can be used to represent a ers more proactive in general by gathering and inter- morph sequence between surfaces of arbitrary topol- preting useful information about the physical environ- ogy. I present a novel framework for achieving this ment through a combination of measurements. Increas- by connecting planar cross sections in a higher dimen- ing the performance of these devices will mean more sion with a new constrained Delaunay triangulation. intelligence can be embedded within the sensor net- Topological alteration is achieved by using the Voronoi work. However, most conventional ways of increasing skeleton, a novel structure which provides a fast medial performance often come with the burden of increased axis approximation. power dissipation which is not an option for energy- constrained sensor networks. This thesis proposes, de- UCAM-CL-TR-724 velops and tests a design methodology for perform- ing greater amounts of processing within a sensor net- Ulrich Paquet: work while satisfying the requirement for low energy consumption. The crux of the thesis is that there is a Bayesian inference for latent variable great deal of concurrency present in sensor networks models which when combined with a tightly-coupled group of small, fast, energy-conscious processors can result in a July 2008, 137 pages, PDF significantly more efficient network. The construction PhD thesis (Wolfson College, March 2007) of a multiprocessor system aimed at sensor networks is described in detail. It is shown that a routine criti- Abstract: Bayes’ theorem is the cornerstone of statis- cal to sensor networks can be sped up with the addi- tical inference. It provides the tools for dealing with tion of a small set of primitives. The need for a very knowledge in an uncertain world, allowing us to ex- fast inter-processor communication mechanism is high- plain observed phenomena through the refinement of lighted, and the hardware scheduler developed as part belief in model parameters. At the heart of this elegant of this effort forms the cornerstone of the new sen- framework lie intractable integrals, whether in comput- tient computing framework by facilitating thread op- ing an average over some posterior distribution, or in erations and minimising the time required for context- determining the normalizing constant of a distribution. switching. The experimental results also show that end- This thesis examines both deterministic and stochastic to-end latency can be reduced in a flexible way through methods in which these integrals can be treated. Of par- . ticular interest shall be parametric models where the parameter space can be extended with additional latent UCAM-CL-TR-723 variables to get distributions that are easier to handle algorithmically. Deterministic methods approximate the posterior Richard Southern: distribution with a simpler distribution over which Animation manifolds for representing the required integrals become tractable. We derive and examine a new generic α-divergence message passing topological alteration scheme for a multivariate mixture of Gaussians, a par- ticular modeling problem requiring latent variables. July 2008, 131 pages, PDF This algorithm minimizes local α-divergences over a PhD thesis (Clare Hall, February 2008) chosen posterior factorization, and includes variational Bayes and expectation propagation as special cases. Abstract: An animation manifold encapsulates an ani- Stochastic (or Monte Carlo) methods rely on a sam- mation sequence of surfaces contained within a higher ple from the posterior to simplify the integration tasks, dimensional manifold with one dimension being time. giving exact estimates in the limit of an infinite sam- An iso–surface extracted from this structure is a frame ple. Parallel tempering and thermodynamic integration of the animation sequence. are introduced as ‘gold standard’ methods to sample In this dissertation I make an argument for the use from multimodal posterior distributions and determine of animation manifolds as a representation of complex normalizing constants. A parallel tempered approach animation sequences. In particular animation mani- to sampling from a mixture of Gaussians posterior folds can represent transitions between shapes with dif- through Gibbs sampling is derived, and novel meth- fering topological structure and polygonal density. ods are introduced to improve the numerical stability I introduce the animation manifold, and show how of thermodynamic integration. it can be constructed from a keyframe animation se- A full comparison with parallel tempering and ther- quence and rendered using raytracing or graphics hard- modynamic integration shows variational Bayes, ex- ware. I then adapt three Laplacian editing frameworks pectation propagation, and message passing with the to the higher dimensional context. I derive new bound- Hellinger distance α = 1/2 to be perfectly suitable for ary conditions for both primal and dual Laplacian model selection, and for approximating the predictive methods, and present a technique to adaptively regu- distribution with high accuracy. larise the sampling of a deformed manifold after edit- Variational and stochastic methods are combined ing. in a novel way to design Markov chain Monte Carlo

188 (MCMC) transition densities, giving a variational tran- synchronisation at a finer grain. They employ sophisti- sition kernel, which lower bounds an exact transition cated synchronisation schemes (both blocking and non- kernel. We highlight the general need to mix variational blocking) and are usually written in low-level languages methods with other MCMC moves, by proving that the such as C. variational kernel does not necessarily give a geometri- This dissertation addresses the formal verification of cally ergodic chain. such algorithms. It proposes techniques that are modu- lar (and hence scalable), easy for programmers to use, UCAM-CL-TR-725 and yet powerful enough to verify complex algorithms. In doing so, it makes two theoretical and two practical Hamed Haddadi, Damien Fay, contributions to reasoning about fine-grained concur- rency. Almerima Jamakovic, Olaf Maennel, First, building on rely/guarantee reasoning and sep- Andrew W. Moore, Richard Mortier, aration logic, it develops a new logic, RGSep, that Miguel Rio, Steve Uhlig: subsumes these two logics and enables simple, mod- ular proofs of fine-grained concurrent algorithms that Beyond node degree: use complex dynamically allocated data structures and evaluating AS topology models may explicitly deallocate memory. RGSep allows for ownership-based reasoning and ownership transfer be- July 2008, 16 pages, PDF tween threads, while maintaining the expressiveness of binary relations to describe inter-thread interference. Abstract: Many models have been proposed to gener- Second, it describes techniques for proving linearis- ate Internet Autonomous System (AS) topologies, most ability, the standard correctness condition for fine- of which make structural assumptions about the AS grained concurrent algorithms. The main proof tech- graph. In this paper we compare AS topology gener- nique is to introduce auxiliary single-assignment vari- ation models with several observed AS topologies. In ables to capture the linearisation point and to inline the contrast to most previous works, we avoid making as- abstract effect of the program at that point as auxiliary sumptions about which topological properties are im- code. portant to characterize the AS topology. Our analy- Third, it demonstrates this approach by proving lin- sis shows that, although matching degree-based prop- earisability of a collection of concurrent list and stack erties, the existing AS topology generation models fail algorithms, as well as providing the first correctness to capture the complexity of the local interconnection proofs of the RDCSS and MCAS implementations of structure between ASs. Furthermore, we use BGP data Harris et al. from multiple vantage points to show that additional Finally, it describes a prototype safety checker, measurement locations significantly affect local struc- SmallfootRG, for fine-grained concurrent programs ture properties, such as clustering and node centrality. that is based on RGSep. SmallfootRG proves simple Degree-based properties, however, are not notably af- safety properties for a number of list and stack algo- fected by additional measurements locations. These ob- rithms and verifies the absence of memory leaks. servations are particularly valid in the core. The short- comings of AS topology generation models stems from UCAM-CL-TR-727 an underestimation of the complexity of the connectiv- ity in the core caused by inappropriate use of BGP data. Ruoshui Liu, Ian J. Wassell:

UCAM-CL-TR-726 A novel auto-calibration system for wireless sensor motes Viktor Vafeiadis: September 2008, 65 pages, PDF Modular fine-grained concurrency verification Abstract: In recent years, Wireless Sensor Networks (WSNs) research has undergone a quiet revolution, pro- July 2008, 148 pages, PDF viding a new paradigm for sensing and disseminat- PhD thesis (Selwyn College, July 2007) ing information from various environments. In reality, the wireless propagation channel in many harsh en- Abstract: Traditionally, concurrent data structures are vironments has a significant impact on the coverage protected by a single mutual exclusion lock so that range and quality of the radio links between the wire- only one thread may access the data structure at any less nodes (motes). Therefore, the use of diversity tech- time. This coarse-grained approach makes it relatively niques (e.g., frequency diversity and spatial diversity) easy to reason about correctness, but it severely limits must be considered to ameliorate the notoriously vari- parallelism. More advanced algorithms instead perform able and unpredictable point-to-point radio communi- cation links. However, in order to determine the space and frequency diversity characteristics of the channel,

189 accurate measurements need to be made. The most rep- we introduce a metric, the weighted spectral distribu- resentative and inexpensive solution is to use motes, tion, that improves on the raw spectrum by discount- however they suffer poor accuracy owing to their low- ing those eigenvalues believed to be unimportant and cost and compromised radio frequency (RF) perfor- emphasizing the contribution of those believed to be mance. important. In this report we present a novel automated calibra- We use this metric to optimize the selection of pa- tion system for characterising mote RF performance. rameter values for generating Internet topologies. Our The proposed strategy provides us with good knowl- metric leads to parameter choices that appear sensible edge of the actual mote transmit power, RSSI charac- given prior knowledge of the problem domain: the re- teristics and receive sensitivity by establishing calibra- sulting choices are close to the default values of the tion tables for transmitting and receiving mote pairs topology generators and, in the case of the AB gener- over their operating frequency range. The validated re- ator, fall within the expected region. This metric pro- sults show that our automated calibration system can vides a means for meaningfully optimizing parameter achieve an increase of ±1.5 dB in the RSSI accuracy. selection when generating topologies intended to share In addition, measurements of the mote transmit power structure with, but not match exactly, measured graphs. show a significant difference from that claimed in the manufacturer’s data sheet. The proposed calibration UCAM-CL-TR-730 method can also be easily applied to wireless sensor motes from virtually any vendor, provided they have Robert J. Ennals: a RF connector. Adaptive evaluation of non-strict UCAM-CL-TR-728 programs Peter J.C. Brown, Christopher T. Faigle: August 2008, 243 pages, PDF PhD thesis (King’s College, June 2004) A robust efficient algorithm for point location in triangulations Abstract: Most popular programming languages are strict. In a strict language, the binding of a variable to February 1997, 16 pages, PDF an expression coincides with the evaluation of the ex- pression. Abstract: This paper presents a robust alternative to Non-strict languages attempt to make life easier for previous approaches to the problem of point location programmers by decoupling expression binding and ex- in triangulations represented using the quadedge data pression evaluation. In a non-strict language, a variable structure. We generalise the reasons for the failure of can be bound to an unevaluated expression, and such an earlier routine to terminate when applied to certain expressions can be passed around just like values in a non-Delaunay triangulations. This leads to our new de- strict language. This separation allows the programmer terministic algorithm which we prove is guaranteed to to declare a variable at the point that makes most log- terminate. We also present a novel heuristic for choos- ical sense, rather than at the point at which its value is ing a starting edge for point location queries and show known to be needed. that this greatly enhances the efficiency of point loca- Non-strict languages are usually evaluated using a tion for the general case. technique called Lazy Evaluation. Lazy Evaluation will only evaluate an expression when its value is known UCAM-CL-TR-729 to be needed. While Lazy Evaluation minimises the to- tal number of expressions evaluated, it imposes a con- Damien Fay, Hamed Haddadi, Steve Uhlig, siderable bookkeeping overhead, and has unpredictable space behaviour. Andrew W. Moore, Richard Mortier, In this thesis, we present a new evaluation strat- Almerima Jamakovic: egy which we call Optimistic Evaluation. Optimistic Evaluation blends lazy and eager evaluation under the Weighted spectral distribution guidance of an online profiler. The online profiler ob- September 2008, 13 pages, PDF serves the running program and decides which expres- sions should be evaluated lazily, and which should be Abstract: Comparison of graph structures is a fre- evaluated eagerly. We show that the worst case perfor- quently encountered problem across a number of prob- mance of Optimistic Evaluation relative to Lazy Evalu- lem domains. Comparing graphs requires a metric to ation can be bounded with an upper bound chosen by discriminate which features of the graphs are con- the user. Increasing this upper bound allows the pro- sidered important. The spectrum of a graph is often filer to take greater risks and potentially achieve better claimed to contain all the information within a graph, average performance. but the raw spectrum contains too much information This thesis describes both the theory and practice of to be directly used as a useful metric. In this paper Optimistic Evaluation. We start by giving an overview

190 of Optimistic Evaluation. We go on to present a formal Abstract: Recent progress in electronic, display and model, which we use to justify our design. We then de- sensing technologies makes possible a future with om- tail how we have implemented Optimistic Evaluation nipresent, arbitrarily large interactive display surfaces. as part of an industrial-strength compiler. Finally, we Nonetheless, current methods of designing display sys- provide experimental results to back up our claims. tems with multi-touch sensitivity do not scale. This the- sis presents computing surfaces as a viable platform for UCAM-CL-TR-731 resolving forthcoming scalability limitations. Computing surfaces are composed of a homoge- Matthew Johnson: neous network of physically adjoined, small sensitive displays with local computation and communication A new approach to Internet banking capabilities. In this platform, inherent scalability is pro- vided by a distributed architecture. The regular spatial September 2008, 113 pages, PDF distribution of resources presents new demands on the PhD thesis (Trinity Hall, July 2008) way surface input and output information is managed and processed. Abstract: This thesis investigates the protection land- Direct user input with touch based gestures needs to scape surrounding online banking. First, electronic account for the distributed architecture of computing banking is analysed for vulnerabilities and a survey of surfaces. A scalable middleware solution that conceals current attacks is carried out. This is represented graph- the tiled architecture is proposed for reasoning with ically as an attack tree describing the different ways in touch-based gestures. The validity of this middleware which online transactions can be attacked. is proven in a case study, where a fully distributed algo- The discussion then moves on to various defences rithm for online recognition of unistrokes – a particular which have been developed, categorizing them and an- class of touch-based gestures – is presented and evalu- alyzing how successful they are at protecting against the ated. attacks given in the first chapter. This covers everything Novel interaction techniques based around interac- from TLS encryption through phishing site detection to tive display surfaces involve direct manipulation with two-factor authentication. displayed digital objects. In order to facilitate such Having declared all current schemes for protecting interactions in computing surfaces, an efficient dis- online banking lacking in some way, the key aspects of tributed algorithm to perform 2D image transforma- the problem are identified. This is followed by a pro- tions is introduced and evaluated. The performance of posal for a more robust defence system which uses a these transformations is heavily influenced by the ar- small security device to create a trusted path to the bitration policies of the interconnection network. One customer, rather than depend upon trusting the cus- approach for improving the performance of these trans- tomer’s computer. The protocol for this system is de- formations in conventional network architectures is scribed along with all the other restrictions required proposed and evaluated. for actual use. This is followed by a description of a More advanced applications in computing surfaces demonstration implementation of the system. require the presence of some notion of time. An efficient Extensions to the system are then proposed, de- algorithm for internal time synchronisation is presented signed to afford extra protection for the consumer and and evaluated. A hardware solution is adopted to min- also to support other types of device. There is then a imise the delay uncertainty of special timestamp mes- discussion of ways of managing keys in a heterogeneous sages. The proposed algorithm allows efficient, scalable system, rather than one managed by a single entity. time synchronisation among clusters of tiles. A hard- The conclusion discusses the weaknesses of the pro- ware reference platform is constructed to demonstrate posed scheme and evaluates how successful it is likely the basic principles and features of computing surfaces. to be in practice and what barriers there may be to This platform and a complementary simulation envi- adoption in the banking system. ronment is used for extensive evaluation and analysis.

UCAM-CL-TR-732 UCAM-CL-TR-733

Alban Rrustemi: Darren Edge: Computing surfaces – a platform for Tangible user interfaces for peripheral scalable interactive displays interaction November 2008, 156 pages, PDF December 2008, 237 pages, PDF PhD thesis (St Edmund’s College, November 2008) PhD thesis (Jesus College, January 2008)

Abstract: Since Mark Weiser’s vision of ubiquitous computing in 1988, many research efforts have been made to move computation away from the workstation

191 and into the world. One such research area focuses on currently little theoretical basis for their design, and lit- “Tangible” User Interfaces or TUIs – those that provide tle empirical characterisation of their support for col- both physical representation and control of underlying laboration. The construction of remote tabletop appli- digital information. cations also presents considerable technical challenges. This dissertation describes how TUIs can support a This dissertation addresses each of these areas. “peripheral” style of interaction, in which users engage Firstly, a theory of workspace awareness is applied to in short, dispersed episodes of low-attention interaction consider the design of remote tabletop interfaces and with digitally-augmented physical tokens. The applica- the work practices that they may afford. tion domain in which I develop this concept is the of- Secondly, two technical barriers to the rapid explo- fice context, where physical tokens can represent items ration of useful remote tabletop applications are iden- of common interest to members of a team whose work tified: the low resolution of conventional tabletop dis- is mutually interrelated, but predominantly performed plays; and the lack of support for existing user interface independently by individuals at their desks. components. Techniques from multi-projector display An “analytic design process” is introduced as a way walls are applied to address these problems. The result- of developing TUI designs appropriate for their in- ing method is evaluated empirically and used to create tended contexts of use. This process is then used to a number of novel tabletop interfaces. present the design of a bimanual desktop TUI that Thirdly, an empirical investigation compares remote complements the existing workstation, and encourages and co-located tabletop interfaces. The findings show peripheral interaction in parallel with workstation- how the design of remote tabletop interfaces leads to intensive tasks. Implementation of a prototype TUI is collaborators having a high level of awareness of each then described, comprising “task” tokens for work- other’s actions in the workspace. This enables smooth time management, “document” tokens for face-to-face transitions between individual and group work, to- sharing of collaborative documents, and “contact” to- gether with anticipation and assistance, similar to co- kens for awareness of other team members’ status and located tabletop collaboration. However, remote table- workload. Finally, evaluation of this TUI is presented top collaborators use different coordination mecha- via description of its extended deployment in a real of- nisms from co-located collaborators. The results have fice context. implications for the design and future study of these in- The main empirically-grounded results of this work terfaces. are a categorisation of the different ways in which users can interact with physical tokens, and an identification UCAM-CL-TR-735 of the qualities of peripheral interaction that differenti- ate it from other interaction styles. The foremost ben- Diarmuid OS´ eaghdha:´ efits of peripheral interaction were found to arise from the freedom with which tokens can be appropriated to Learning compound noun semantics create meaningful information structures of both cog- nitive and social significance, in the physical desktop December 2008, 167 pages, PDF environment and beyond. PhD thesis (Corpus Christi College, July 2008)

UCAM-CL-TR-734 Abstract: This thesis investigates computational ap- proaches for analysing the semantic relations in com- Philip Tuddenham: pound nouns and other noun-noun constructions. Tabletop interfaces for remote Compound nouns in particular have received a great deal of attention in recent years due to the challenges collaboration they pose for natural language processing systems. One December 2008, 243 pages, PDF reason for this is that the semantic relation between the PhD thesis (Gonville and Caius College, June 2008) constituents of a compound is not explicitly expressed and must be retrieved from other sources of linguistic Abstract: Effective support for synchronous remote col- and world knowledge. laboration has long proved a desirable yet elusive goal I present a new scheme for the semantic annotation for computer technology. Although video views show- of compounds, describing in detail the motivation for ing the remote participants have recently improved, the scheme and the development process. This scheme technologies providing a shared visual workspace of the is applied to create an annotated dataset for use in task still lack support for the visual cues and work prac- compound interpretation experiments. The results of tices of co-located collaboration. a dual-annotator experiment indicate that good agree- Researchers have recently demonstrated shared ment can be obtained with this scheme relative to pre- workspaces for remote collaboration using large hor- viously reported results and also provide insights into izontal interactive surfaces. These remote tabletop in- the challenging nature of the annotation task. terfaces may afford the beneficial work practices associ- I describe two corpus-driven paradigms for compar- ated with co-located collaboration around tables. How- ing pairs of nouns: lexical similarity and relational sim- ever, there has been little investigation of remote table- ilarity. Lexical similarity is based on comparing each top interfaces beyond limited demonstrations. There is

192 constituent of a noun pair to the corresponding con- UCAM-CL-TR-737 stituent of another pair. Relational similarity is based on comparing the contexts in which both constituents Na Xu: of a noun pair occur together with the corresponding contexts of another pair. Using the flexible framework Static contract checking for Haskell of kernel methods, I develop techniques for implement- ing both similarity paradigms. December 2008, 175 pages, PDF A standard approach to lexical similarity represents PhD thesis (Churchill College, August 2008) words by their co-occurrence distributions. I describe a family of kernel functions that are designed for the clas- Abstract: Program errors are hard to detect and are sification of probability distributions. The appropriate- costly, to both programmers who spend significant ef- ness of these distributional kernels for semantic tasks is forts in debugging, and for systems that are guarded by suggested by their close connection to proven measures runtime checks. Static verification techniques have been of distributional lexical similarity. I demonstrate the ef- applied to imperative and object-oriented languages, fectiveness of the lexical similarity model by applying it like Java and C#, for checking basic safety proper- to two classification tasks: compound noun interpreta- ties such as memory leaks. In a pure functional lan- tion and the 2007 SemEval task on classifying semantic guage, many of these basic properties are guaranteed relations between nominals. by design, which suggests the opportunity for verify- To implement relational similarity I use kernels on ing more sophisticated program properties. Neverthe- strings and sets of strings. I show that distributional set less, few automatic systems for doing so exist. In this kernels based on a multinomial probability model can thesis, we show the challenges and solutions to verify- be computed many times more efficiently than previ- ing advanced properties of a pure functional language, ously proposed kernels, while still achieving equal or Haskell. We describe a sound and automatic static ver- better performance. Relational similarity does not per- ification framework for Haskell, that is based on con- form as well as lexical similarity in my experiments. tracts and symbolic execution. Our approach gives pre- However, combining the two models brings an im- cise blame assignments at compile-time in the presence provement over either model alone and achieves state- of higher-order functions and laziness. of-the-art results on both the compound noun and Se- First, we give a formal definition of contract sat- mEval Task 4 datasets. isfaction which can be viewed as a denotational se- mantics for contracts. We then construct two contract UCAM-CL-TR-736 checking wrappers, which are dual to each other, for checking the contract satisfaction. We prove the sound- Mike Dodds, Xinyu Feng, ness and completeness of the construction of the con- Matthew Parkinson, Viktor Vafeiadis: tract checking wrappers with respect to the definition of the contract satisfaction. This part of my research Deny-guarantee reasoning shows that the two wrappers are projections with re- spect to a partial ordering crashes-more-often and fur- January 2009, 82 pages, PDF thermore, they form a projection pair and a closure Abstract: Rely-guarantee is a well-established approach pair. These properties give contract checking a strong to reasoning about concurrent programs that use par- theoretical foundation. allel composition. However, parallel composition is not As the goal is to detect bugs during compile time, how concurrency is structured in real systems. Instead, we symbolically execute the code constructed by the threads are started by ‘fork’ and collected with ‘join’ contract checking wrappers and prove the soundness commands. This style of concurrency cannot be rea- of this approach. We also develop a technique named soned about using rely-guarantee, as the life-time of a counter-example-guided (CEG) unrolling which only thread can be scoped dynamically. With parallel com- unroll function calls on demand. This technique speeds position the scope is static. up the checking process. In this paper, we introduce deny-guarantee rea- Finally, our verification approach makes error trac- soning, a reformulation of rely-guarantee that enables ing much easier compared with the existing set-based reasoning about dynamically scoped concurrency. We analysis. Thus equipped, we are able to tell program- build on ideas from separation logic to allow interfer- mers during compile-time which function to blame and ence to be dynamically split and recombined, in a simi- why if there is a bug in their program. This is a break- lar way that separation logic splits and joins heaps. To through for lazy languages because it is known to be allow this splitting, we use deny and guarantee permis- difficult to report such informative messages either at sions: a deny permission specifies that the environment compile-time or run-time. cannot do an action, and guarantee permission allow us to do an action. We illustrate the use of our proof sys- UCAM-CL-TR-738 tem with examples, and show that it can encode all the original rely-guarantee proofs. We also present the se- Scott Fairbanks: mantics and soundness of the deny-guarantee method.

193 High precision timing using self-timed systems are inherently complex. Shielding applications circuits from this complexity is a challenging problem. To address this challenge, I present a middleware January 2009, 99 pages, PDF called SPS (State-based Publish/Subscribe). It is based PhD thesis (Gonville and Caius College, September on a combination of a State-Centric data model and a 2004) Publish/Subscribe (Pub/Sub) communication paradigm. I argue that a state-centric data model allows applica- Abstract: Constraining the events that demarcate pe- tions to specify environmental situations of interest in riods on a VLSI chip to precise instances of time is the a more natural way than existing solutions. In addi- task undertaken in this thesis. High speed sampling and tion, Pub/Sub enables scalable many-to-many commu- clock distribution are two example applications. Foun- nication between sensors, actuators, and applications. dational to my approach is the use of self-timed data This dissertation initially focuses on Resource- control circuits. constrained Sensor Networks (RSNs) and proposes Specially designed self-timed control circuits deliver State Filters (SFs), which are lightweight, stateful, event high frequency timing signals with precise phase rela- filtering components. Their design is motivated by the tionships. The frequency and the phase relationships redundancy and correlation observed in sensor read- are controlled by varying the number of self-timed con- ings produced close together in space and time. By trol stages and the number of tokens they control. performing context-based data processing, SFs increase The self-timed control circuits are constructed with Pub/Sub expressiveness and improve communication simple digital logic gates. The digital logic gates re- efficiency. spond to a range of analog values with a continuum of Secondly, I propose State Maintenance Components precise and controlled delays. The control circuits im- (SMCs) for capturing more expressive conditions in plement their functionality efficiently. This allows the heterogeneous sensor networks containing more re- gates to drive long wires and distribute the timing sig- sourceful devices. SMCs extend SFs with data fusion nals over a large area. Also gate delays are short and and temporal and spatial data manipulation capabili- few, allowing for high frequencies. ties. They can also be composed together (in a DAG) to The self-timed control circuits implement the func- deduce higher level information. SMCs operate inde- tionality of a FIFO that is then closed into a ring. Tim- pendently from each other and can therefore be decom- ing tokens ripple through the rings. The FIFO stages posed for distributed processing within the network. use digital handshaking protocols to pass the timing to- Finally, I present a Pub/Sub protocol called QPS kens between the stages. The FIFO control stage detects (Quad-PubSub) for location-aware Wireless Sensor the phase between the handshake signals on its inputs Networks (WSNs). QPS is central to the design of my and produces a signal that is sent back to the producers framework as it facilitates messaging between state- with a delay that is a function of the phase relationship based components, applications, sensors, and actua- of the input signals. tors. In contrast to existing data dissemination proto- The methods described are not bound to the same cols, QPS has a layered architecture. This allows for the process and systematic skew limitations of existing transparent operation of routing protocols that meet methods. For a certain power budget, timing signals are different Quality of Service (QoS) requirements. generated and distributed with significantly less power with the approaches to be presented than with conven- UCAM-CL-TR-740 tional methods. Tal Sobol-Shikler: UCAM-CL-TR-739 Analysis of affective expression in Salman Taherian: speech State-based Publish/Subscribe for January 2009, 163 pages, PDF PhD thesis (Girton College, March 2007) sensor systems Abstract: This dissertation presents analysis of expres- January 2009, 240 pages, PDF sions in speech. It describes a novel framework for dy- PhD thesis (St John’s College, June 2008) namic recognition of acted and naturally evoked ex- pressions and its application to expression mapping Abstract: Recent technological advances have enabled and to multi-modal analysis of human-computer inter- the creation of networks of sensor devices. These de- actions. vices are typically equipped with basic computational The focus of this research is on analysis of a wide and communication capabilities. Systems based on range of emotions and mental states from non-verbal these devices can deduce high-level, meaningful infor- expressions in speech. In particular, on inference of mation about the environment that may be useful to complex mental states, beyond the set of basic emo- applications. Due to their scale, distributed nature, and tions, including naturally evoked subtle expressions the limited resources available to sensor devices, these and mixtures of expressions.

194 This dissertation describes a bottom-up computa- In order to construct such a model, the use of ve- tional model for processing of speech signals. It com- hicular sensor networks is proposed. The Sentient Van, bines the application of signal processing, machine a platform for vehicular sensing, is introduced, and de- learning and voting methods with novel approaches to tails are given of experiments carried out concerning the design, implementation and validation. It is based the performance of IEEE 802.11x, specifically for ve- on a comprehensive framework that includes all the hicles. Using the Sentient Van, a corpus of 10 million development stages of a system. The model represents signal strength readings was collected over three years. paralinguistic speech events using temporal abstrac- This data, and further traces, are used in the remainder tions borrowed from various disciplines such as musi- of the work described, thus distinguishing it in using cology, engineering and linguistics. The model consists entirely real world data. of a flexible and expandable architecture. The valida- Algorithms are adapted from the field of 2-D shape tion of the model extends its scope to different expres- simplification to the problem of processing thousands sions, languages, backgrounds, contexts and applica- of signal strength readings. By applying these to the tions. data collected, coverage maps are generated that con- The work adapts an approach that an utterance is tain extents. These represent how coverage varies be- not an isolated entity but rather a part of an interac- tween two locations on a given road. The algorithms tion and should be analysed in this context. The analy- are first proven fit for purpose using synthetic data, be- sis in context includes relations to events and other be- fore being evaluated for accuracy of representation and havioural cues. Expressions of mental states are related compactness of output using real data. not only in time but also by their meaning and content. The problem of how to select the optimal network This work demonstrates the relations between the lex- to connect to is then addressed. The coverage map ical definitions of mental states, taxonomies and theo- representation is converted into a multi-planar graph, retical conceptualization of mental states and their vo- where the coverage of all available wireless networks cal correlates. It examines taxonomies and theoretical is included. This novel representation also includes the conceptualisation of mental states in relation to their ability to hand over between networks, and the penal- vocal characteristics. The results show that a very wide ties so incurred. This allows the benefits of connecting range of mental state concepts can be mapped, or de- to a given network to be traded off with the cost of scribed, using a high-level abstraction in the form of handing over to it. a small sub-set of concepts which are characterised by In order to use the multi-planar graph, shortest path their vocal correlates. routing is used. The theory underpinning multi-criteria This research is an important step towards com- routing is overviewed, and a family of routing met- prehensive solutions that incorporate social intelligence rics developed. These generate efficient solutions to the cues for a wide variety of applications and for multi- problem of calculating the sequence of networks that disciplinary research. should be connected to over a given geographical route. The system is evaluated using real traces, finding that UCAM-CL-TR-741 in 75% of the test cases proactive routing algorithms provide better QoS than a reactive algorithm. More- David N. Cottingham: over, the system can also be run to generate geographi- cal routes that are QoS-aware. Vehicular wireless communication This dissertation concludes by examining how cov- erage mapping can be applied to other types of data, January 2009, 264 pages, PDF and avenues for future research are proposed. PhD thesis (Churchill College, September 2008) UCAM-CL-TR-742 Abstract: Transportation is vital in everyday life. As a consequence, vehicles are increasingly equipped with Thomas Ridge, Michael Norrish, onboard computing devices. Moreover, the demand for connectivity to vehicles is growing rapidly, both from Peter Sewell: business and consumers. Meanwhile, the number of TCP, UDP, and Sockets: wireless networks available in an average city in the de- veloped world is several thousand. Whilst this theoreti- Volume 3: The Service-level cally provides near-ubiquitous coverage, the technology Specification type is not homogeneous. This dissertation discusses how the diversity in com- February 2009, 305 pages, PDF munication systems can be best used by vehicles. Fo- cussing on road vehicles, it first details the technolo- Abstract: Despite more than 30 years of research on gies available, the difficulties inherent in the vehicu- protocol specification, the major protocols deployed in lar environment, and how intelligent handover algo- the Internet, such as TCP, are described only in informal rithms could enable seamless connectivity. In particu- prose RFCs and executable code. In part this is because lar, it identifies the need for a model of the coverage of the scale and complexity of these protocols makes them wireless networks. challenging targets for formal descriptions, and because

195 techniques for mathematically rigorous (but appropri- enables us to compute a set of ‘weighted GRs’ directly ately loose) specification are not in common use. from this structure. Our experiments demonstrate sub- In this work we show how these difficulties can stantial increases in parser accuracy and throughput for be addressed. We develop a high-level specification for weighted GR output. TCP and the Sockets API, describing the byte-stream Finally, we describe a novel confidence-based train- service that TCP provides to users, expressed in the for- ing framework, that can, in principle, be applied to malised mathematics of the HOL proof assistant. This any statistical parser whose output is defined in terms complements our previous low-level specification of the of its consistency with a given level and type of an- protocol internals, and makes it possible for the first notation. We demonstrate that a semisupervised vari- time to state what it means for TCP to be correct: that ant of this framework outperforms both Expectation- the protocol implements the service. We define a precise Maximisation (when both are constrained by unla- abstraction function between the models and validate belled partial-bracketing) and the extant (fully super- it by testing, using verified testing infrastructure within vised) method. These novel training methods utilise HOL. Some errors may remain, of course, especially data automatically extracted from existing corpora. as our resources for testing were limited, but it would Consequently, they require no manual effort on behalf be straightforward to use the method on a larger scale. of the grammar writer, facilitating grammar develop- This is a pragmatic alternative to full proof, providing ment. reasonable confidence at a relatively low entry cost. Together with our previous validation of the low- UCAM-CL-TR-744 level model, this shows how one can rigorously tie together concrete implementations, low-level protocol Anna Ritchie: models, and specifications of the services they claim to provide, dealing with the complexity of real-world pro- Citation context analysis for tocols throughout. Similar techniques should be applicable, and even information retrieval more valuable, in the design of new protocols (as we il- March 2009, 119 pages, PDF lustrated elsewhere, for a MAC protocol for the SWIFT PhD thesis (New Hall, June 2008) optically switched network). For TCP and Sockets, our specifications had to capture the historical complexi- Abstract: This thesis investigates taking words from ties, whereas for a new protocol design, such specifica- around citations to scientific papers in order to create tion and testing can identify unintended complexities at an enhanced document representation for improved in- an early point in the design. formation retrieval. This method parallels how anchor text is commonly used in Web retrieval. In previous UCAM-CL-TR-743 work, words from citing documents have been used as an alternative representation of the cited document but Rebecca F. Watson: no previous experiment has combined them with a full- text document representation and measured effective- Optimising the speed and accuracy of ness in a large scale evaluation. a Statistical GLR Parser The contributions of this thesis are twofold: firstly, we present a novel document representation, along March 2009, 145 pages, PDF with experiments to measure its effect on retrieval ef- PhD thesis (Darwin College, September 2007) fectiveness, and, secondly, we document the construc- tion of a new, realistic test collection of scientific re- Abstract: The focus of this thesis is to develop tech- search papers, with references (in the bibliography) and niques that optimise both the speed and accuracy of a their associated citations (in the running text of the pa- unification-based statistical GLR parser. However, we per) automatically annotated. Our experiments show can apply these methods within a broad range of pars- that the citation-enhanced document representation in- ing frameworks. We first aim to optimise the level of tag creases retrieval effectiveness across a range of standard ambiguity resolved during parsing, given that we em- retrieval models and evaluation measures. ploy a front-end PoS tagger. This work provides the first In Chapter 2, we give the background to our work, broad comparison of tag models as we consider both discussing the various areas from which we draw to- tagging and parsing performance. A dynamic model gether ideas: information retrieval, particularly link achieves the best accuracy and provides a means to structure analysis and anchor text indexing, and bib- overcome the trade-off between tag error rates in sin- liometrics, in particular citation analysis. We show that gle tag per word input and the increase in parse am- there is a close relatedness of ideas between these ar- biguity over multipletag per word input. The second eas but that these ideas have not been fully explored line of research describes a novel modification to the experimentally. Chapter 3 discusses the test collection inside-outside algorithm, whereby multiple inside and paradigm for evaluation of information retrieval sys- outside probabilities are assigned for elements within tems and describes how and why we built our test col- the packed parse forest data structure. This algorithm lection. In Chapter 4 we introduce the ACL Anthology,

196 the archive of computational linguistics papers that our that of the SPARCv8. Both are adapted to handle - test collection is centred around. The archive contains specific features. We have implemented the axiomatic the most prominent publications since the beginning model in our memevents tool, which calculates the set of the field in the early 1960s, consisting of one jour- of all valid executions of test programs, and, for greater nal plus conferences and workshops, resulting in over confidence, verify the witnesses of such executions di- 10,000 papers. Chapter 5 describes how the PDF pa- rectly, with code extracted from a third, more algorith- pers are prepared for our experiments, including iden- mic, equivalent version of the definition. tification of references and citations in the papers, once converted to plain text, and extraction of citation in- UCAM-CL-TR-746 formation to an XML database. Chapter 6 presents our experiments: we show that adding citation terms to the Shishir Nagaraja, Ross Anderson: full-text of the papers improves retrieval effectiveness by up to 7.4%, that weighting citation terms higher The snooping dragon: relative to paper terms increases the improvement and that varying the context from which citation terms are social-malware surveillance of the taken has a significant effect on retrieval effectiveness. Tibetan movement Our main hypothesis that citation terms enhance a full- text representation of scientific papers is thus proven. March 2009, 12 pages, PDF There are some limitations to these experiments. The relevance judgements in our test collection are in- Abstract: In this note we document a case of malware- complete but we have experimentally verified that the based electronic surveillance of a political organisation test collection is, nevertheless, a useful evaluation tool. by the agents of a nation state. While malware attacks Using the Lemur toolkit constrained the method that are not new, two aspects of this case make it worth we used to weight citation terms; we would like to ex- serious study. First, it was a targeted surveillance at- periment with a more realistic implementation of term tack designed to collect actionable intelligence for use weighting. Our experiments with different citation con- by the police and security services of a repressive state, texts did not conclude an optimal citation context; we with potentially fatal consequences for those exposed. would like to extend the scope of our investigation. Second, the modus operandi combined social phishing Now that our test collection exists, we can address with high-grade malware. This combination of well- these issues in our experiments and leave the door open written malware with well-designed email lures, which for more extensive experimentation. we call social malware, is devastatingly effective. Few organisations outside the defence and intelligence sec- UCAM-CL-TR-745 tor could withstand such an attack, and although this particular case involved the agents of a major power, Scott Owens, Susmit Sarkar, Peter Sewell: the attack could in fact have been mounted by a ca- pable motivated individual. This report is therefore of A better x86 memory model: importance not just to companies who may attract the attention of government agencies, but to all organisa- x86-TSO tions. As social-malware attacks spread, they are bound (extended version) to target people such as accounts-payable and payroll staff who use computers to make payments. Preven- March 2009, 52 pages, PDF tion will be hard. The traditional defence against so- cial malware in government agencies involves expen- Abstract: Real multiprocessors do not provide the se- sive and intrusive measures that range from mandatory quentially consistent memory that is assumed by most access controls to tiresome operational security proce- work on semantics and verification. Instead, they have dures. These will not be sustainable in the economy as relaxed memory models, typically described in ambigu- a whole. Evolving practical low-cost defences against ous prose, which lead to widespread confusion. These social-malware attacks will be a real challenge. are prime targets for mechanized formalization. In pre- vious work we produced a rigorous x86-CC model, for- UCAM-CL-TR-747 malizing the Intel and AMD architecture specifications of the time, but those turned out to be unsound with re- spect to actual hardware, as well as arguably too weak Fei Song, Hongke Zhang, Sidong Zhang, to program above. We discuss these issues and present Fernando Ramos, Jon Crowcroft: a new x86-TSO model that suffers from neither prob- lem, formalized in HOL4. We believe it is sound with An estimator of forward and respect to real processors, reflects better the vendor’s backward delay for multipath intentions, and is also better suited for programming. We give two equivalent definitions of x86-TSO: an in- transport tuitive operational model based on local write buffers, March 2009, 16 pages, PDF and an axiomatic total store ordering model, similar to

197 Abstract: Multipath transport protocols require aware- UCAM-CL-TR-749 ness of the capability of different paths being used for transmission. It is well known that round trip time Pan Hui, Eiko Yoneki, Jon Crowcroft, (RTT) can be used to estimate retransmission timeout Shu-Yan Chan: with reasonable accuracy. However, using RTT to eval- uate the delay of forward or backward paths is not al- Identifying social communities ways suitable. In fact, these paths are usually dissimilar, and therefore the packet delay can be significantly dif- in complex communications for ferent in each direction. network efficiency We propose a forward and backward delay estima- tor that aims to solve this problem. Based on the re- May 2009, 14 pages, PDF sults of the estimator, a new retransmission heuristic mechanism for multipath transport is proposed. With Abstract: Complex communication networks, more this same technique we also build two other heuris- particular Mobile Ad Hoc Networks (MANET) and tics: A bottleneck bandwidth estimator and a shared Pocket Switched Networks (PSN), rely on short range congestion detector. These help the sender to choose radio and device mobility to transfer data across the the high bandwidth path in retransmission and ensure network. These kind of mobile networks contain dual- TCP-friendliness in multipath transport, respectively. ity in nature: they are radio networks at the same time also human networks, and hence knowledge from so- UCAM-CL-TR-748 cial networks can be also applicable here. In this pa- per, we demonstrate how identifying social communi- Marco Canini, Wei Li, Andrew W. Moore: ties can significantly improve the forwarding efficien- cies in term of delivery ratio and delivery cost. We ver- GTVS: boosting the collection of ify our hypothesis using data from five human mobil- ity experiments and test on two application scenarios, application traffic ground truth asynchronous messaging and publish/subscribe service. April 2009, 20 pages, PDF UCAM-CL-TR-750 Abstract: Interesting research in the areas of traffic clas- sification, network monitoring, and application-orient Marco Canini, Wei Li, Martin Zadnik, analysis can not proceed with real trace data labeled Andrew W. Moore: with actual application information. However, hand- labeled traces are an extremely valuable but scarce re- AtoZ: an automatic traffic organizer source in the traffic monitoring and analysis commu- using NetFPGA nity, as a result of both privacy concerns and technical difficulties: hardly any possibility exists for payloaded May 2009, 27 pages, PDF data to be released to the public, while the intensive labor required for getting the ground-truth application Abstract: This paper introduces AtoZ, an automatic information from the data severely constrains the feasi- traffic organizer that provides end-users with con- bility of releasing anonymized versions of hand-labeled trol of how their applications use network resources. payloaded data. Such an approach contrasts with the moves of many The usual way to obtain the ground truth is frag- ISPs towards network-wide application throttling and ile, inefficient and not directly comparable from one’s provider-centric control of an application’s network- work to another. This chapter proposes and details a usage. AtoZ provides seamless per-application traffic- methodology that significantly boosts the efficiency in organizing on gigabit links, with minimal packet-delays compiling the application traffic ground truth. In con- and no unintended packet drops. trast with other existing work, our approach maintains The AtoZ combines the high-speed packet process- the high certainty as in hand-verification, while striv- ing of the NetFPGA with an efficient flow-behavior ing to save time and labor required for that. Further, it identification method. Currently users can enable AtoZ is implemented as an easy hands-on tool suite which is control over network resources by prohibiting certain now freely available to the public. applications and controlling the priority of others. We In this paper we present a case study using a 30 discuss deployment experience and use real traffic to minute real data trace to guide the readers through our illustrate how such an architecture enables several dis- ground-truth classification process. We also present a tinct features: high accuracy, high throughput, minimal method, which is an extension of GTVS that efficiently delay, and efficient packet labeling – all in a low-cost, classifies HTTP traffic by its purpose. robust configuration that works alongside the home or enterprise access-router.

198 UCAM-CL-TR-751 Abstract: RFID technology is the prevalent method for implementing proximity identification in a number of David C. Turner: security sensitive applications. The perceived proximity of a token serves as a measure of trust and is often used Nominal domain theory for as a basis for granting certain privileges or services. En- suring that a token is located within a specified distance concurrency of the reader is therefore an important security require- July 2009, 185 pages, PDF ment. In the case of high-frequency RFID systems the PhD thesis (Clare College, December 2008) limited operational range of the near-field communica- tion channel is accepted as implicit proof that a token Abstract: Domain theory provides a powerful mathe- is in close proximity to a reader. In some instances, it is matical framework for describing sequential computa- also presumed that this limitation can provide further tion, but the traditional tools of domain theory are in- security services. applicable to concurrent computation. Without a gen- The first part of this dissertation presents attacks eral mathematical framework it is hard to compare against current proximity identification systems. It doc- developments and approaches from different areas of uments how eavesdropping, skimming and relay at- study, leading to time and effort wasted in rediscover- tacks can be implemented against HF RFID systems. ing old ideas in new situations. Experimental setups and practical results are provided A possible remedy to this situation is to build a for eavesdropping and skimming attacks performed denotational semantics based directly on computation against RFID systems adhering to the ISO 14443 and paths, where a process denotes the set of paths that it ISO 15693 standards. These attacks illustrate that the may follow. This has been shown to be a remarkably limited operational range cannot prevent unauthorised powerful idea, but it lacks certain computational fea- access to stored information on the token, or ensure tures. Notably, it is not possible to express the idea of that transmitted data remains confidential. The practi- names and name-generation within this simple path se- cal implementation of passive and active relay attacks mantics. against an ISO 14443 RFID system is also described. Nominal set theory is a non-standard mathemati- The relay attack illustrates that proximity identifica- cal foundation that captures the notion of names in a tion should not rely solely on the physical character- general way. Building a mathematical development on istics of the communication channel, even if it could be top of nominal set theory has the effect of incorporat- shown to be location-limited. As a result, it is proposed ing names into its fabric at a low level. Importantly, that additional security measures, such as distance- nominal set theory is sufficiently close to conventional bounding protocols, should be incorporated to verify foundations that it is often straightforward to transfer proximity claims. A new method, using cover noise, is intuitions into the nominal setting. also proposed to make the backward communication Here the original path-based domain theory for channel more resistant to eavesdropping attacks. concurrency is developed within nominal set theory, The second part of this dissertation discusses which has the effect of systematically adjoining name- distance-bounding protocols. These protocols deter- generation to the model. This gives rise to an expressive mine an upper bound for the physical distance between metalanguage, Nominal HOPLA, which supports a no- two parties. A detailed survey of current proposals, tion of name-generation. Its denotational semantics is investigating their respective merits and weaknesses, given entirely in terms of universal constructions on do- identifies general principles governing secure distance- mains. An operational semantics is also presented, and bounding implementations. It is practically shown that relationships between the denotational and operational an attacker can circumvent the distance bound by im- descriptions are explored. plementing attacks at the packet and physical layer of The generality of this approach to including name conventional communication channels. For this reason generation into a simple semantic model indicates that the security of a distance bound depends not only on it will be possible to apply the same techniques to the cryptographic protocol, but also on the time mea- more powerful domain theories for concurrency, such surement provided by the underlying communication. as those based on presheaves. Distance-bounding protocols therefore require special channels. Finally, a new distance-bounding protocol and a practical implementation of a suitable distance- UCAM-CL-TR-752 bounding channel for HF RFID systems are proposed.

Gerhard P. Hancke: UCAM-CL-TR-753

Security of proximity identification John L. Miller, Jon Crowcroft: systems Carbon: trusted auditing for July 2009, 161 pages, PDF PhD thesis (Wolfson College, February 2008) P2P distributed virtual environments August 2009, 20 pages, PDF

199 Abstract: Many Peer-to-Peer Distributed Virtual Envi- Skin-detached surface for interactive ronments (P2P DVE’s) have been proposed, but none large mesh editing are widely deployed. One significant barrier to deploy- ment is lack of security. This paper presents Carbon, September 2009, 18 pages, PDF a trusted auditing system for P2P DVE’s which pro- vides reasonable security with low per-client overhead. Abstract: We propose a method for interactive defor- DVE’s using Carbon perform offline auditing to evalu- mation of large detailed meshes. Our method allows ate DVE client correctness. Carbon audits can be used the users to manipulate the mesh directly using freely- to catch DVE clients which break DVE rules – cheaters selected handles on the mesh. To best preserve sur- – so the DVE can punish them. We analyze the im- face details, we introduce a new surface representation, pact of applying Carbon to a peer-to-peer game with the skin-detached surface. It represents a detailed sur- attributes similar to World of Warcraft. We show that face model as a peeled “skin” added over a simplified 99.9% of cheaters – of a certain profile – can be caught surface model. The “skin” contains the details of the with guided auditing and 2.3% bandwidth overhead, surface while the simplified mesh maintains the basic or 100% of cheaters can be caught with exhaustive au- shape. The deformation process consists of three steps: diting and 27% bandwidth overhead. The surprisingly At the mesh loading stage, the “skin” is precomputed low overhead for exhaustive auditing is the result of according to the detailed mesh and detached from the the small payload in most DVE packet updates, com- simplified mesh. Then we deform the simplified mesh pared to the larger aggregate payloads in audit mes- following the nonlinear gradient domain mesh editing sages. Finally, we compare Carbon to PeerReview, and approach to satisfy the handle position constraints. Fi- show that for DVE scenarios Carbon consumes signif- nally the detailed “skin” is remapped onto the simpli- icantly less resources – in typical cases by an order of fied mesh, resulting in a deformed detailed mesh. We magnitude – while sacrificing little protection. investigate the advantages as well as the limitations of our method by implementing a prototype system and UCAM-CL-TR-754 applying it to several examples.

Frank Stajano, Paul Wilson: UCAM-CL-TR-756

Understanding scam victims: Hamed Haddadi, Damien Fay, Steve Uhlig, seven principles for systems security Andrew W. Moore, Richard Mortier, August 2009, 22 pages, PDF Almerima Jamakovic: An updated, abridged and peer-reviewed version Analysis of the Internet’s structural of this report appeared in Communications of the ACM 54(3):70-75, March 2011 evolution [doi:10.1145/1897852.1897872]. Please cite the refereed CACM version in any related work. September 2009, 13 pages, PDF

Abstract: The success of many attacks on computer sys- Abstract: In this paper we study the structural evolu- tems can be traced back to the security engineers not tion of the AS topology as inferred from two different understanding the psychology of the system users they datasets over a period of seven years. We use a variety meant to protect. We examine a variety of scams and of topological metrics to analyze the structural differ- “short cons” that were investigated, documented and ences revealed in the AS topologies inferred from the recreated for the BBC TV programme The Real Hus- two different datasets. In particular, to focus on the tle and we extract from them some general principles evolution of the relationship between the core and the about the recurring behavioural patterns of victims that periphery, we make use of the weighted spectral distri- hustlers have learnt to exploit. bution. We argue that an understanding of these inher- We find that the traceroute dataset has increasing ent “human factors” vulnerabilities, and the necessity difficulty in sampling the periphery of the AS topology, to take them into account during design rather than largely due to limitations inherent to active probing. naıvely¨ shifting the blame onto the “gullible users”, is Such a dataset has too limited a view to properly ob- a fundamental paradigm shift for the security engineer serve topological changes at the AS-level compared to which, if adopted, will lead to stronger and more re- a dataset largely based on BGP data. We also highlight silient systems security. limitations in current measurements that require a bet- ter sampling of particular topological properties of the Internet. Our results indicate that the Internet is chang- UCAM-CL-TR-755 ing from a core-centered, strongly customer-provider oriented, disassortative network, to a soft-hierarchical, Yujian Gao, Aimin Hao, Qinping Zhao, peering-oriented, assortative network. Neil A. Dodgson:

200 UCAM-CL-TR-757 value of runtime data movement, and as well as pro- ducing optimisation useful in their own right may be Mark Adcock: used to guide the design of future cache-aware RDSs and layout-improving garbage collectors. Improving cache performance by runtime data movement UCAM-CL-TR-758 July 2009, 174 pages, PDF Alexey Gotsman: PhD thesis (Christ’s College, June 2009) Logics and analyses for concurrent Abstract: The performance of a recursive data struc- heap-manipulating programs ture (RDS) increasingly depends on good data cache be- haviour, which may be improved by software/hardware October 2009, 160 pages, PDF prefetching or by ensuring that the RDS has a good data PhD thesis (Churchill College, September 2009) layout. The latter is harder but more effective, and re- quires solving two separate problems: firstly ensuring Abstract: Reasoning about concurrent programs is dif- that new RDS nodes are allocated in a good location ficult because of the need to consider all possible in- in memory, and secondly preventing a degradation in teractions between concurrently executing threads. The layout when the RDS changes shape due to pointer up- problem is especially acute for programs that manipu- dates. late shared heap-allocated data structures, since heap- The first problem has been studied in detail, but manipulation provides more ways for threads to in- only two major classes of solutions to the second ex- teract. Modular reasoning techniques sidestep this dif- ist. Layout degradation may be side-stepped by using ficulty by considering every thread in isolation under a ‘cache-aware’ RDS, one designed to have inherently some assumptions on its environment. good cache behaviour (e.g. using a B-Tree in place of In this dissertation we develop modular program a binary search tree), but such structures are difficult logics and program analyses for the verification of con- to devise and implement. A more automatic solution in current heap-manipulating programs. Our approach is some languages is to use a ‘layout-improving’ garbage to exploit reasoning principles provided by program collector, which attempt to improve heap data layout logics to construct modular program analyses and to during collection using online profiling of data access use this process to obtain further insights into the log- patterns. This may carry large performance, memory ics. In particular, we build on concurrent separation and latency overheads. logic—a Hoare-style logic that allows modular manual In this thesis we investigate the insertion of code reasoning about concurrent programs written in a sim- into a program which attempts to move RDS nodes ple heap-manipulating programming language. at runtime to prevent or reduce layout degradation. Our first contribution is to show the soundness Such code affects only the performance of a program of concurrent separation logic without the conjunc- not its semantics. The body of this thesis is a thorough tion rule and the restriction that resource invariants and systematic evaluation of three different forms of be precise, and to construct an analysis for concurrent data movement. The first method adapts existing work heap-manipulating programs that exploits this mod- on static RDS data layout, performing ad-hoc single ified reasoning principle to achieve modularity. The node movements at a program’s pointer-update sites, analysis can be used to automatically verify a num- which is simple to apply and effective in practice, but ber of safety properties, including memory safety, data- the performance gain may be hard to predict. The sec- structure integrity, data-race freedom, the absence of ond method performs infrequent movement of larger memory leaks, and the absence of assertion violations. groups of nodes, borrowing techniques from garbage We show that we can view the analysis as generating collection but also embedding data movement in ex- proofs in our variant of the logic, which enables the use isting traversals of the RDS; the benefit of performing of its results in proof-carrying code or theorem proving additional data movement to compact the heap is also systems. demonstrated. The third method restores a pre-chosen Reasoning principles expressed by program logics layout after each RDS pointer update, which is a com- are most often formulated for only idealised program- plex but effective technique, and may be viewed both ming constructs. Our second contribution is to develop as an optimisation and as a way of synthesising new logics and analyses for modular reasoning about fea- cache-aware RDSs. tures present in modern languages and libraries for con- Concentrating on both maximising performance current programming: storable locks (i.e., locks dynam- while minimising latency and extra memory usage, two ically created and destroyed in the heap), first-order fundamental RDSs are used for the investigation, rep- procedures, and dynamically-created threads. resentative of two common data access patterns (lin- ear and branching). The methods of this thesis compare favourably to upper bounds on performance and to the canonical cache-aware solutions. This thesis shows the

201 UCAM-CL-TR-759 This report presents the results of an in-depth study into successful interdisciplinary innovation, focusing on Eric Koskinen, Matthew Parkinson, the personal experiences of the people who achieve it. Maurice Herlihy: It is complementary to organisational research, and to research on the economic impact of innovation, but has Coarse-grained transactions primarily adopted perspectives and methods from other disciplines. Instead, this report has been developed by (extended version) a team that is itself interdisciplinary, with a particular August 2011, 34 pages, PDF focus on anthropology, design research, and strategic policy. It also draws on reports from expert witnesses and invited commentators in many other fields. Abstract: Traditional transactional memory systems suffer from overly conservative conflict detection, yield- ing so-called false conflicts, because they are based on UCAM-CL-TR-761 fine-grained, low-level read/write conflicts. In response, the recent trend has been toward integrating various Jonathan J. Davies: abstract data-type libraries using ad-hoc methods of high-level conflict detection. These proposals have led Programming networks of vehicles to improved performance but a lack of a unified theory November 2009, 292 pages, PDF has led to confusion in the literature. PhD thesis (Churchill College, September 2008) We clarify these recent proposals by defining a gen- eralization of transactional memory in which a trans- Abstract: As computers become smaller in size and ad- action consists of course-grained (abstract data-type) vances in communications technology are made, we hy- operations rather than simply memory read/write op- pothesise that a new range of applications involving erations. We provide semantics for both pessimistic computing in road vehicles will emerge. These appli- (e.g. transactional boosting) and optimistic (e.g. tradi- cations may be enabled by the future arrival of general- tional TMs and recent alternatives) execution. We show purpose computing platforms in vehicles. Many of that both are included in the standard atomic seman- these applications will involve the collection, process- tics, yet find that the choice imposes different require- ing and distribution of data sampled by sensors on large ments on the coarse-grained operations: pessimistic re- numbers of vehicles. This dissertation is primarily con- quires operations be left-movers, optimistic requires cerned with addressing how these applications can be right-movers. Finally, we discuss how the semantics ap- designed and implemented by programmers. plies to numerous TM implementation details discussed We explore how a vehicular sensor platform may be widely in the literature. built and how data from a variety of sensors can be sampled and stored. Applications exploiting such plat- UCAM-CL-TR-760 forms will infer higher-level information from the raw sensor data collected. We present the design and imple- Alan F. Blackwell, Lee Wilson, Alice Street, mentation of one such application which involves pro- Charles Boulton, John Knell: cessing vehicles’ location histories into an up-to-date road map. Radical innovation: Our experience shows that there is a problem with crossing knowledge boundaries with programming this kind of application: the number of vehicles and the nature of computational infrastructure interdisciplinary teams available are not known until the application is exe- cuted. By comparison, existing approaches to program- November 2009, 124 pages, PDF ming applications in wireless sensor networks tend to assume that the nature of the network architecture is Abstract: Interdisciplinary innovation arises from the known at design-time. This is not an appropriate as- positive effects that result when stepping across the so- sumption to make in vehicular sensor networks. In- cial boundaries that we structure knowledge by. Those stead, this dissertation proposes that the functionality boundaries include academic disciplines, government of applications is designed and implemented at a higher departments, companies’ internal functions, companies level and the problem of deciding how and where its and sectors, and the boundaries between these do- components are to be executed is left to a compiler. We mains. In the knowledge economy, it is often the case call this ‘late physical binding’. that the right knowledge to solve a problem is in a dif- This approach brings the benefit that applications ferent place to the problem itself, so interdisciplinary can be automatically adapted and optimised for exe- innovation is an essential tool for the future. There are cution in a wide range of environments. We describe a also many problems today that need more than one suite of transformations which can change the order in kind of knowledge to solve them, so interdisciplinary which components of the program are executed whilst innovation is also an essential tool for the challenging preserving its semantic integrity. These transformations problems of today.

202 may affect several of the application’s characteristics resources to all application tiers detecting saturation such as its execution time or energy consumption. points across components. This results in them act- The practical utility of this approach is demon- ing faster to workload variations than their single-tier strated through a novel programming language based counterparts. on Java. Two examples of diverse applications are pre- All controllers are evaluated against the Rubis sented which demonstrate that the language and com- benchmark application deployed on a prototype virtu- piler can be used to create non-trivial applications. Per- alized cluster built for this purpose. formance measurements show that the compiler can introduce parallelism to make more efficient use of UCAM-CL-TR-763 resources and reduce an application’s execution time. One of the applications belongs to a class of dis- Saar Drimer: tributed systems beyond merely processing vehicular sensor data, suggesting that the late physical binding Security for volatile FPGAs paradigm has broader application to other areas of dis- tributed computing. November 2009, 169 pages, PDF PhD thesis (Darwin College, August 2009) UCAM-CL-TR-762 Abstract: With reconfigurable devices fast becoming Evangelia Kalyvianaki: complete systems in their own right, interest in their security properties has increased. While research on Resource provisioning for virtualized “FPGA security” has been active since the early 2000s, server applications few have treated the field as a whole, or framed its chal- lenges in the context of the unique FPGA usage model November 2009, 161 pages, PDF and application space. This dissertation sets out to ex- PhD thesis (Lucy Cavendish College, August 2008) amine the role of FPGAs within a security system and how solutions to security challenges can be provided. I Abstract: Data centre virtualization creates an agile offer the following contributions: environment for application deployment. Applications I motivate authenticating configurations as an addi- run within one or more virtual machines and are hosted tional capability to FPGA configuration logic, and then on various servers throughout the data centre. One key describe a flexible security protocol for remote recon- mechanism provided by modern virtualization tech- figuration of FPGA-based systems over insecure net- nologies is dynamic resource allocation. Using this tech- works. Non-volatile memory devices are used for per- nique virtual machines can be allocated resources as sistent storage when required, and complement the lack required and therefore, occupy only the necessary re- of features in some FPGAs with tamper proofing in or- sources for their hosted application. In fact, two of the der to maintain specified security properties. A unique main challenges faced by contemporary data centres, advantage of the protocol is that it can be implemented server consolidation and power saving, can be tackled on some existing FPGAs (i.e., it does not require FPGA efficiently by capitalising on this mechanism. vendors to add functionality to their devices). Also pro- This dissertation shows how to dynamically adjust posed is a solution to the “IP distribution problem” the CPU resources allocated to virtualized server ap- where designs from multiple sources are integrated into plications in the presence of workload fluctuations. In a single bitstream, yet must maintain their confidential- particular it employs a reactive approach to resource ity. provisioning based on feedback control and introduces I discuss the difficulty of reproducing and com- five novel controllers. All five controllers adjust the ap- paring FPGA implementation results reported in the plication allocations based on past utilisation observa- academic literature. Concentrating on cryptographic tions. implementations, problems are demonstrated through A subset of the controllers integrate the Kalman fil- designing three architecture-optimized variants of the tering technique to track the utilisations and based on AES block cipher and analyzing the results to show which they predict the allocations for the next interval. that single figures of merit, namely “throughput” or This approach is particularly attractive for the resource “throughput per slice”, are often meaningless without management problem since the Kalman filter uses the the context of an application. To set a precedent for re- evolution of past utilisations to adjust the allocations. producibility in our field, the HDL source code, simula- In addition, the adaptive Kalman controller which ad- tion testbenches and compilation instructions are made justs its parameters online and dynamically estimates publicly available for scrutiny and reuse. the utilisation dynamics, is able to differentiate sub- Finally, I examine payment systems as ubiquitous stantial workload changes from small fluctuations for embedded devices, and evaluate their security vulnera- unknown workloads. bilities as they interact in a multi-chip environment. Us- In addition, this dissertation captures, models, and ing FPGAs as an adversarial tool, a man-in-the-middle builds controllers based on the CPU resource cou- attack against these devices is demonstrated. An FPGA- pling of application components. In the case of multi- based defense is also demonstrated: the first secure tier applications, these controllers collectively allocate wired “distance bounding” protocol implementation.

203 This is then put in the context of securing reconfig- Abstract: Formal program verification provides mathe- urable systems. matical means of increasing assurance for the correct- ness of software. Most approaches to program verifi- UCAM-CL-TR-764 cation are either fully automatic and prove only weak properties, or alternatively are manual and labour in- Caroline V. Gasperin: tensive to apply; few target realistically modelled ma- chine code. The work presented in this dissertation Statistical anaphora resolution in aims to ease the effort required in proving properties of biomedical texts programs on top of detailed models of machine code. The contributions are novel approaches for both verifi- December 2009, 124 pages, PDF cation of existing programs and methods for automati- PhD thesis (Clare Hall, August 2008) cally constructing correct code. For program verification, this thesis presents a new Abstract: This thesis presents a study of anaphora in approach based on translation: the problem of proving biomedical scientific literature and focuses on tackling properties of programs is reduced, via fully-automatic the problem of anaphora resolution in this domain. deduction, to a problem of proving properties of recur- Biomedical literature has been the focus of many in- sive functions. The translation from programs to recur- formation extraction projects; there are, however, very sive functions is shown to be implementable in a the- few works on anaphora resolution in biomedical scien- orem prover both for simple while-programs as well tific full-text articles. Resolving anaphora is an impor- as real machine code. This verification-after-translation tant step in the identification of mentions of biomedical approach has several advantages over established ap- entities about which information could be extracted. proaches of verification condition generation. In partic- We have identified coreferent and associative ular, the new approach does not require annotating the anaphoric relations in biomedical texts. Among asso- program with assertions. More importantly, the pro- ciative relations we were able to distinguish 3 main posed approach separates the verification proof from types: biotype, homolog and set-member relations. We the underlying model so that specific resource names, have created a corpus of biomedical articles that are some instruction orderings and certain control-flow annotated with anaphoric links between noun phrases structures become irrelevant. As a result proof reuse is referring to biomedical entities of interest. Such noun enabled to a greater extent than in currently used meth- phrases are typed according to a scheme that we have ods. The scalability of this new approach is illustrated developed based on the Sequence Ontology; it distin- through the verification of ARM, x86 and PowerPC im- guishes 7 types of entities: gene, part of gene, product plementations of a copying garbage collector. of gene, part of product, subtype of gene, supertype of For construction of correct code this thesis presents gene and gene variant. a new compiler which maps functions from logic, via We propose a probabilistic model for the reso- proof, down to multiple carefully modelled commercial lution of anaphora in biomedical texts. The model machine languages. Unlike previously published work seeks to find the antecedents of anaphoric expressions, on compilation from higher-order logic, this compiler both coreferent and associative, and also to identify allows input functions to be partially specified and sup- discourse-new expressions. The model secures good ports a broad range of user-defined extensions. These performance despite being trained on a small corpus: features enabled the production of formally verified it achieves 55-73% precision and 57-63% recall on machine-code implementations of a LISP interpreter, as coreferent cases, and reasonable performance on differ- a case study. ent classes of associative cases. We compare the perfor- The automation and proofs have been implemented mance of the model with a rule-based baseline system in the HOL4 theorem prover, using a new machine- that we have also developed, a naive Bayes system and code Hoare triple instantiated to detailed specifications a decision trees system, showing that the ours outper- of ARM, x86 and PowerPC instruction set architec- forms the others. tures. We have experimented with active learning in order to select training samples to improve the performance UCAM-CL-TR-766 of our probabilistic model. It was not, however, more successful than random sampling. Julian M. Smith: UCAM-CL-TR-765 Towards robust inexact geometric Magnus O. Myreen: computation Formal verification of machine-code December 2009, 186 pages, PDF PhD thesis (St. Edmund’s College, July 2009) programs December 2009, 109 pages, PDF Abstract: Geometric algorithms implemented using PhD thesis (Trinity College, December 2008) rounded arithmetic are prone to robustness problems.

204 Geometric algorithms are often a mix of arithmetic and using the Ising model to analyse the spread of informa- combinatorial computations, arising from the need to tion among real communities. The inner opinion of a create geometric data structures that are themselves a given community is forced to change through the in- complex mix of numerical and combinatorial data. De- troduction of a unique external source and we anal- cisions that influence the topology of a geometric struc- yse how the other communities react to this change. ture are made on the basis of certain arithmetic calcula- We model two conceptual external sources: namely, tions, but the inexactness of these calculations may lead “Strong-belief”, and “propaganda”, by an infinitely to inconsistent decisions, causing the algorithm to pro- strong inhomogeneous external field and a finite uni- duce a topologically invalid result or to fail catastroph- form external field, respectively. In the former case, the ically. The research reported here investigates ways to community changes independently from other commu- produce robust algorithms with inexact computation. nities while in the latter case according also to interac- I present two algorithms for operations on piecewise tions with the other communities. We apply our model linear (polygonal/polyhedral) shapes. Both algorithms to synthetic networks as well as various real world are topologically robust, meaning that they are guar- data ranging from human physical contact networks to anteed to generate a topologically valid result from a online social networks. The experimental results using topologically valid input, irrespective of numerical er- real world data clearly demonstrate two distinct scenar- rors in the computations. The first algorithm performs ios of phase transitions characterised by the presence of the Boolean operation in 3D, and also in 2D. The strong memory effects when the graph and coupling pa- main part of this algorithm is a series of interdepen- rameters are above a critical threshold. dent operations. The relationship between these opera- tions ensures a consistency in these operations, which, I UCAM-CL-TR-768 prove, guarantees the generation of a shape represen- tation with valid topology. The basic algorithm may Cecily Morrison, Adona Iosif, Miklos Danka: generate geometric artifacts such as gaps and slivers, which generally can be removed by a data-smoothing Report on existing open-source post-process. The second algorithm presented performs simplification in 2D, converting a geometrically invalid electronic medical records (but topologically valid) shape representation into one February 2010, 12 pages, PDF that is fully valid. This algorithm is based on a variant of the Bentley-Ottmann sweep line algorithm, but with Abstract: In this report we provide an overview of ex- additional rules to handle situations not possible under isting open-source electronic medical records and assess an exact implementation. them against the criteria established by the EViDence Both algorithms are presented in the context of what group. is required of an algorithm in order for it to be classed as robust in some sense. I explain why the formulaic ap- UCAM-CL-TR-769 proach used for the Boolean algorithm cannot readily be used for the simplification process. I also give essen- tial code details for a C++ implementation of the 2D Sriram Srinivasan: simplification algorithm, and discuss the results of ex- Kilim: A server framework with treme tests designed to show up any problems. Finally, I discuss floating-point arithmetic, present error analysis lightweight actors, isolation types and for the floating-point computation of the intersection zero-copy messaging point between two segments in 2D, and discuss how such errors affect both the simplification algorithm and February 2010, 127 pages, PDF the basic Boolean algorithm in 2D. PhD thesis (King’s College, February 2010)

UCAM-CL-TR-767 Abstract: Internet services are implemented as hierar- chical aggregates of communicating components: net- works of data centers, networks of clusters in a data Massimo Ostilli, Eiko Yoneki, center, connected servers in a cluster, and multiple vir- Ian X. Y. Leung, Jose F. F. Mendes, tual machines on a server machine, each containing sev- Pietro Lio,´ Jon Crowcroft: eral operating systems processes. This dissertation ar- gues for extending this structure to the intra-process Ising model of rumour spreading in level, with networks of communicating actors. An ac- interacting communities tor is a single-threaded state machine with a private heap and a thread of its own. It communicates with January 2010, 24 pages, PDF other actors using well-defined and explicit messaging protocols. Actors must be light enough to comfortably Abstract: We report a preliminary investigation on in- match the inherent concurrency in the problem space, teractions between communities in a complex network and to exploit all available parallelism. Our aims are two-fold: (a) to treat SMP systems as they really are:

205 distributed systems with eventual consistency, and (b) are responsible for protecting its confidentiality, in line recognize from the outset that a server is always part of with patient consent, codes of practice and legislation. a larger collection of communicating components, thus Ideally, one should receive only that information nec- eliminating the mindset mismatch between concurrent essary for the tasks they perform—on a need-to-know programming and distributed programming. basis. Although the actor paradigm is by no means new, Healthcare requires mechanisms to strictly con- our design points are informed by drawing parallels trol information dissemination. Many solutions fail between the macro and micro levels. As with compo- to account for the scale and heterogeneity of the en- nents in a distributed system, we expect that actors vironment. Centrally managed data services impede must be isolatable in a number of ways: memory iso- the local autonomy of health institutions, impact- lation, fault isolation, upgrade isolation, and execution ing security by diminishing accountability and in- isolation. The application should be able to have a say creasing the risks/impacts of incorrect disclosures. Di- in actor placement and scheduling, and actors must be rect, synchronous (request-response) communication easily monitorable. requires an enumeration of every potential informa- Our primary contribution is in showing that these tion source/sink. This is impractical when considering requirements can be satisfied in a language and envi- health services at a national level. Healthcare presents a ronment such as Java, without changes to the source data-driven environment highly amenable to an event- language or to the virtual machine, and without leaving based infrastructure, which can inform, update and much of the idiomatic ambit of Java, with its mindset alert relevant parties of incidents as they occur. Event- of pointers and mutable state. In other words, one does based data dissemination paradigms, while efficient not have to move to a concurrency-oriented language and scalable, generally lack the rigorous access control or to an entirely immutable object paradigm. mechanisms required for health infrastructure. We demonstrate an open-source toolkit called Kilim This dissertation describes how publish/subscribe, that provides (a) ultra-lightweight actors (faster and an asynchronous, push-based, many-to-many middle- lighter than extant environments such as Erlang), (b) a ware communication paradigm, is extended to include type system that guarantees memory isolation between mechanisms for actively controlling information disclo- threads by separating internal objects from exportable sure. We present Interaction Control: a data-control messages and by enforcing ownership and structural layer above a publish/subscribe service allowing the constraints on the latter (linearity and tree-structure, re- definition of context-aware policy rules to authorise in- spectively) and, (c) a library with I/O support and cus- formation channels, transform information and restrict tomizable synchronization constructs and schedulers. data propagation according to the circumstances. As We show that this solution is simpler to program dissemination policy is defined at the broker-level and than extant solutions, yet statically guaranteed to be enforced by the middleware, client compliance is en- free of low-level data races. It is also faster, more scal- sured. Although policy enforcement involves extra pro- able and more stable (in increasing scale) in two in- cessing, we show that in some cases the control mecha- dustrial strength evaluations: interactive web services nisms can actually improve performance over a general (comparing Kilim Web Server to Jetty) and databases publish/subscribe implementation. We build Interaction (comparing Berkeley DB to a Kilim variant of it). Control mechanisms into integrated database-brokers to provide a rich representation of state; while facilitat- UCAM-CL-TR-770 ing audit, which is essential for accountability. Healthcare requires the sharing of sensitive infor- Jatinder Singh: mation across federated domains of administrative con- trol. Interaction Control provides the means for balanc- Controlling the dissemination and ing the competing concerns of information sharing and protection. It enables those responsible for information disclosure of healthcare events to meet their data management obligations, through February 2010, 193 pages, PDF specification of fine-grained disclosure policy. PhD thesis (St. John’s College, September 2009) UCAM-CL-TR-771 Abstract: Information is central to healthcare: for proper care, information must be shared. Modern Cecily Morrison: healthcare is highly collaborative, involving interac- tions between users from a range of institutions, includ- Bodies-in-Space: investigating ing primary and secondary care providers, researchers, technology usage in co-present group government and private organisations. Each has spe- cific data requirements relating to the service they pro- interaction vide, and must be informed of relevant information as March 2010, 147 pages, PDF it occurs. PhD thesis (Darwin College, August 2009) Personal health information is highly sensitive. Those who collect/hold data as part of the care process

206 Abstract: With mobile phones in people’s pockets, dig- We begin by presenting a generalised notion of sys- ital devices in people’s homes, and information systems tems defined by a set of schematic inference rules. This in group meetings at work, technology is frequently is our model for the kind of languages that might be present when people interact with each other. Unlike implemented using alphaML. We then present the syn- devices used by a single person at a desk, people, rather tax, type system and operational semantics of the al- than machines, are the main focus in social settings. An phaML language and proceed to define a sound and important difference then between these two scenarios, complete embedding of schematic inference rules. We individual and group, is the role of the body. Although turn to program equivalence and define a standard no- non-verbal behaviour is not part of human-computer tion of operational equivalence between alphaML ex- interaction, it is very much part of human-human in- pressions and use this to prove correctness results about teraction. This dissertation explores bodies-in-space — the representation of data terms involving binding and people’s use of spatial and postural positioning of their about schematic formulae and inductive definitions. bodies to maintain a social interaction when technol- The fact that binding can be represented correctly ogy is supporting the social interaction of a co-present in alphaML is interesting for technical reasons, because group. the language dispenses with the notion of globally dis- I begin this dissertation with a review of literature, tinct names present in most systems based on nomi- looking at how and when bodies-in-space have been ac- nal methods. These results, along with the encoding of counted for in research and design processes of tech- inference rules, constitute the main technical payload nology for co-present groups. I include examples from of the dissertation. However, our approach compli- both human-computer interaction, as well the social cates the solving of constraints between terms. There- sciences more generally. Building on this base, the fol- fore, we develop a novel algorithm for solving equality lowing four chapters provide examples and discussion and freshness constraints between nominal terms which of methods to: (1) see (analytically), (2) notate, (3) ad- does not rely on standard devices such as swappings just (choreograph), and (4) research in the laboratory, and suspended permutations. Finally, we discuss an im- bodies-in-space. I conclude with reflections on the value plementation of alphaML, and conclude with a sum- of capturing bodies-in-space in the process of designing mary of the work and a discussion of possible future technology for co-present groups and emphasise a trend extensions. towards end-user involvement and its consequences for the scope of human-computer interaction research. UCAM-CL-TR-773 All of the research in this dissertation derives from, and relates to, the real-world context of an intensive Thomas J. Cashman: care unit of a hospital and was part of assessing the deployment of an electronic patient record. NURBS-compatible subdivision UCAM-CL-TR-772 surfaces March 2010, 99 pages, PDF Matthew R. Lakin: PhD thesis (Queens’ College, January 2010) An executable meta-language for Abstract: Two main technologies are available to design inductive definitions with binders and represent freeform surfaces: Non-Uniform Ratio- nal B-Splines (NURBS) and subdivision surfaces. Both March 2010, 171 pages, PDF representations are built on uniform B-splines, but they PhD thesis (Queens’ College, March 2010) extend this foundation in incompatible ways, and dif- Abstract: A testable prototype can be invaluable for ferent industries have therefore established a preference identifying bugs during the early stages of language de- for one representation over the other. NURBS are the velopment. For such a system to be useful in practice it dominant standard for Computer-Aided Design, while should be quick and simple to generate prototypes from subdivision surfaces are popular for applications in an- the language specification. imation and entertainment. However there are bene- This dissertation describes the design and develop- fits of subdivision surfaces (arbitrary topology) which ment of a new programming language called alphaML, would be useful within Computer-Aided Design, and which extends traditional functional programming lan- features of NURBS (arbitrary degree and non-uniform guages with specific features for producing correct, ex- parametrisations) which would make good additions to ecutable prototypes. The most important new features current subdivision surfaces. of alphaML are for the handling of names and bind- I present NURBS-compatible subdivision surfaces, ing structures in user-defined languages. To this end, al- which combine topological freedom with the ability phaML uses the techniques of nominal sets (due to Pitts to represent any existing NURBS surface exactly. Sub- and Gabbay) to represent names explicitly and handle division schemes that extend either non-uniform or binding correctly up to alpha-renaming. The language general-degree B-spline surfaces have appeared before, also provides built-in support for constraint solving and but this dissertation presents the first surfaces able to non-deterministic search. handle both challenges simultaneously. To achieve this

207 I develop a novel factorisation of knot insertion rules Abstract: A typical Internet server finds itself in the for non-uniform, general-degree B-splines. middle of a virtual battleground, under constant threat Many subdivision surfaces have poor second-order from worms, viruses and other malware seeking to sub- behaviour near singularities. I show that it is possible vert the original intentions of the programmer. In par- to bound the curvatures of the general-degree subdivi- ticular, critical Internet servers such as OpenSSH, BIND sion surfaces created using my factorisation. Bounded- and Sendmail have had numerous security issues rang- curvature surfaces have previously been created by ing from low-level buffer overflows to subtle protocol ‘tuning’ uniform low-degree subdivision schemes; this logic errors. These problems have cost billions of dol- dissertation shows that general-degree schemes can be lars as the growth of the Internet exposes increasing tuned in a similar way. As a result, I present the first numbers of computers to electronic malware. Despite general-degree subdivision schemes with bounded cur- the decades of research on techniques such as model- vature at singularities. checking, type-safety and other forms of formal anal- Previous subdivision schemes, both uniform and ysis, the vast majority of server implementations con- non-uniform, have inserted knots indiscriminately, but tinue to be written unsafely and informally in C/C++. the factorised knot insertion algorithm I describe in this In this dissertation we propose an architecture for dissertation grants the flexibility to insert knots selec- constructing new implementations of standard Inter- tively. I exploit this flexibility to preserve convexity in net protocols which integrates mature formal meth- highly non-uniform configurations, and to create lo- ods not currently used in deployed servers: (i) static cally uniform regions in place of non-uniform knot in- type systems from the ML family of functional lan- tervals. When coupled with bounded-curvature mod- guages; (ii) model checking to verify safety properties ifications, these techniques give the first non-uniform exhaustively about aspects of the servers; and (iii) gen- subdivision schemes with bounded curvature. erative meta-programming to express high-level con- I conclude by combining these results to present straints for the domain-specific tasks of packet parsing NURBS-compatible subdivision surfaces: arbitrary- and constructing non-deterministic state machines. Our topology, non-uniform and general-degree surfaces architecture—dubbed MELANGE—is based on Objec- which guarantee high-quality second-order surface tive Caml and contributes two domain-specific lan- properties. guages: (i) the Meta Packet Language (MPL), a data description language used to describe the wire format UCAM-CL-TR-774 of a protocol and output statically type-safe code to handle network traffic using high-level functional data John Wickerson, Mike Dodds, structures; and (ii) the Statecall Policy Language (SPL) Matthew Parkinson: for constructing non-deterministic finite state automata which are embedded into applications and dynamically Explicit stabilisation for modular enforced, or translated into PROMELA and statically model-checked. rely-guarantee reasoning Our research emphasises the importance of deliv- March 2010, 29 pages, PDF ering efficient, portable code which is feasible to de- ploy across the Internet. We implemented two com- Abstract: We propose a new formalisation of stability plex protocols—SSH and DNS—to verify our claims, for Rely-Guarantee, in which an assertion’s stability is and our evaluation shows that they perform faster than encoded into its syntactic form. This allows two ad- their standard counterparts OpenSSH and BIND, in vances in modular reasoning. Firstly, it enables Rely- addition to providing static guarantees against some Guarantee, for the first time, to verify concurrent li- classes of errors that are currently a major source of braries independently of their clients’ environments. security problems. Secondly, in a sequential setting, it allows a module’s internal interference to be hidden while verifying its UCAM-CL-TR-776 clients. We demonstrate our approach by verifying, us- ing RGSep, the Version 7 Unix memory manager, un- Kathryn E. Gray, Alan Mycroft: covering a twenty-year-old bug in the process. System tests from unit tests UCAM-CL-TR-775 March 2010, 27 pages, PDF Anil Madhavapeddy: Abstract: Large programs have bugs; software engineer- Creating high-performance, ing practices reduce the number of bugs in deployed systems by relying on a combination of unit tests, to fil- statically type-safe network ter out bugs in individual procedures, and system tests, applications to identify bugs in an integrated system. Our previous work showed how Floyd-Hoare March 2010, 169 pages, PDF triples, {P}C{Q}, could also be seen as unit tests, i.e. PhD thesis (Robinson College, April 2006)

208 formed a link between verification and test-based val- UCAM-CL-TR-779 idation. A transactional-style implementation allows test post-conditions to refer to values of data structures Eric K. Henderson: both before and after test execution. Here we argue that this style of specifications, with a transactional imple- A text representation language mentation, provide a novel source of system tests. Given a set of unit tests for a system, we can run for contextual and distributional programs in test mode on real data. Based on an anal- processing ysis of the unit tests, we intersperse the program’s exe- cution with the pre- and post-conditions from the test April 2010, 207 pages, PDF suite to expose bugs or incompletenesses in either the PhD thesis (Fitzwilliam College, 2009) program or the test suite itself. We use the results of these tests, as well as branch-trace coverage informa- Abstract: This thesis examines distributional and con- tion, to identify and report anomalies in the running textual aspects of linguistic processing in relation to tra- program. ditional symbolic approaches. Distributional process- ing is more commonly associated with statistical meth- UCAM-CL-TR-777 ods, while an integrated representation of context span- ning document and syntactic structure is lacking in current linguistic representations. This thesis addresses Thomas Dinsdale-Young, Mike Dodds, both issues through a novel symbolic text representa- Philippa Gardner, Matthew Parkinson, tion language. Viktor Vafeiadis: The text representation language encodes informa- tion from all levels of linguistic analysis in a semanti- Concurrent Abstract Predicates cally motivated form. Using object-oriented constructs in a recursive structure that can be derived from the April 2010, 43 pages, PDF syntactic parse, the language provides a common inter- face for symbolic and distributional processing. A key Abstract: Abstraction is key to understanding and rea- feature of the language is a recursive treatment of con- soning about large computer systems. Abstraction is text at all levels of representation. The thesis gives a de- simple to achieve if the relevant data structures are dis- tailed account of the form and syntax of the language, joint, but rather difficult when they are partially shared, as well as a treatment of several important construc- as is the case for concurrent modules. We present a pro- tions. Comparisons are made with other linguistic and gram logic for reasoning abstractly about data struc- semantic representations, and several of the distinguish- tures, that provides a fiction of disjointness and per- ing features are demonstrated through experiments. mits compositional reasoning. The internal details of a The treatment of context in the representation lan- module are completely hidden from the client by con- guage is discussed at length. The recursive structure em- current abstract predicates. We reason about a mod- ployed in the representation is explained and motivated ule’s implementation using separation logic with per- by issues involving document structure. Applications missions, and provide abstract specifications for use by of the contextual representation in symbolic processing client programs using concurrent abstract predicates. are demonstrated through several experiments. We illustrate our abstract reasoning by building two Distributional processing is introduced using tradi- implementations of a lock module on top of hardware tional statistical techniques to measure semantic sim- instructions, and two implementations of a concurrent ilarity. Several extant similarity metrics are evaluated set module on top of the lock module. using a novel evaluation metric involving adjective antonyms. The results provide several insights into the UCAM-CL-TR-778 nature of distributional processing, and this motivates a new approach based on characteristic adjectives. Viktor Vafeiadis: Characteristic adjectives are distributionally derived and semantically differentiated vectors associated with Automatically proving linearizability a node in a semantic taxonomy. They are significantly lower-dimensioned then their undifferentiated source September 2016, 19 pages, PDF vectors, while retaining a strong correlation to their position in the semantic space. Their properties and Abstract: This technical report presents a practical au- derivation are described in detail and an experimental tomatic verification procedure for proving linearizabil- evaluation of their semantic content is presented. ity (i.e., atomicity and functional correctness) of con- Finally, the distributional techniques to derive char- current data structure implementations. The procedure acteristic adjectives are extended to encompass sym- uses a novel instrumentation to verify logically pure ex- bolic processing. Rules involving several types of sym- ecutions, and is evaluated on a number of standard con- bolic patterns are distributionally derived from a source current stack, queue and set algorithms. corpus, and applied to the text representation language.

209 Polysemy is addressed in the derivation by limiting dis- UCAM-CL-TR-782 tributional information to monosemous words. The de- rived rules show a significant improvement at disam- Jonathan M. Hayman: biguating nouns in a test corpus. Petri net semantics UCAM-CL-TR-780 June 2010, 252 pages, PDF Michael Roe: PhD thesis (Darwin College, January 2009) Cryptography and evidence Abstract: Petri nets are a widely-used model for concur- May 2010, 75 pages, PDF rency. By modelling the effect of events on local compo- PhD thesis (Clare College, April 1997) nents of state, they reveal how the events of a process interact with each other, and whether they can occur Abstract: The invention of public-key cryptography led independently of each other by operating on disjoint to the notion that cryptographically protected messages regions of state. could be used as evidence to convince an impartial ad- Despite their popularity, we are lacking systematic judicator that a disputed event had in fact occurred. syntax-driven techniques for defining the semantics of Information stored in a computer is easily modified, programming languages inside Petri nets in an analo- and so records can be falsified or retrospectively mod- gous way that Plotkin’s Structural Operational Seman- ified. Cryptographic protection prevents modification, tics defines a transition system semantics. The first part and it is hoped that this will make cryptographically of this thesis studies a generally-applicable framework protected data acceptable as evidence. This usage of for the definition of the net semantics of a programming cryptography to render an event undeniable has be- language. come known as non-repudiation. This dissertation is an The net semantics is used to study concurrent sepa- enquiry into the fundamental limitations of this appli- ration logic, a Hoare-style logic used to prove partial cation of cryptography, and the disadvantages of the correctness of pointer-manipulating concurrent pro- techniques which are currently in use. In the course of grams. At the core of the logic is the notion of sepa- this investigation I consider the converse problem, of ration of ownership of state, allowing us to infer that ensuring that an instance of communication between proven parallel processes operate on the disjoint re- computer systems leaves behind no unequivocal evi- gions of the state that they are seen to own. In this dence of its having taken place. Features of commu- thesis, a notion of validity of the judgements capturing nications protocols that were seen as defects from the the subtle notion of ownership is given and soundness standpoint of non-repudiation can be seen as benefits of the logic with respect to this model is shown. The from the standpoint of this converse problem, which I model is then used to study the independence of pro- call “plausible deniability”. cesses arising from the separation of ownership. Fol- UCAM-CL-TR-781 lowing from this, a form of refinement is given which is capable of changing the granularity assumed of the Minor E. Gordon: program’s atomic actions. Amongst the many different models for concur- Stage scheduling for CPU-intensive rency, there are several forms of Petri net. Category servers theory has been used in the past to establish connec- tions between them via adjunctions, often coreflections, June 2010, 119 pages, PDF yielding common constructions across the models and PhD thesis (Jesus College, December 2009) relating concepts such as bisimulation. The most gen- Abstract: The increasing prevalence of multicore, mul- eral forms of Petri net have, however, fallen outside this tiprocessor commodity hardware calls for server soft- framework. Essentially, this is due to the most general ware architectures that are cycle-efficient on individ- forms of net having an implicit symmetry in their be- ual cores and can maximize concurrency across an en- haviour that other forms of net cannot directly repre- tire machine. In order to achieve both ends this disser- sent. tation advocates stage architectures that put software The final part of this thesis shows how an abstract concurrency foremost and aggressive CPU scheduling framework for defining symmetry in models can be ap- that exploits the common structure and runtime behav- plied to obtain categories of Petri net with symmetry. ior of CPU-intensive servers. For these servers user-level This is shown to recover, up to symmetry, the univer- scheduling policies that multiplex one kernel thread per sal characterization of unfolding operations on general physical core can outperform those that utilize pools of Petri nets, allowing coreflections up to symmetry be- worker threads per stage on CPU-intensive workloads. tween the category of general Petri nets and other cate- Boosting the hardware efficiency of servers in userspace gories of net. means a single machine can handle more users without tuning, operating system modifications, or better hard- ware.

210 UCAM-CL-TR-783 UCAM-CL-TR-784

Dan O’Keeffe: Ripduman Sohan, Andrew Rice, Distributed complex event detection Andrew W. Moore, Kieran Mansley: for pervasive computing Characterizing 10 Gbps network interface energy consumption July 2010, 170 pages, PDF PhD thesis (St. John’s College, December 2009) July 2010, 10 pages, PDF

Abstract: Pervasive computing is a model of informa- Abstract: Understanding server energy consumption is tion processing that augments computers with sensing fast becoming an area of interest given the increase in capabilities and distributes them into the environment. the per-machine energy footprint of modern servers and Many pervasive computing applications are reactive the increasing number of servers required to satisfy de- in nature, in that they perform actions in response to mand. In this paper we (i) quantify the energy overhead events (i.e. changes in state of the environment). How- of the network subsystem in modern servers by mea- ever, these applications are typically interested in high- suring, reporting and analyzing power consumption in level complex events, in contrast to the low-level prim- six 10 Gbps and four 1 Gbps interconnects at a fine- itive events produced by sensors. The goal of this thesis grained level; (ii) introduce two metrics for calculating is to support the detection of complex events by filter- the energy efficiency of a network interface from the ing, aggregating, and combining primitive events. perspective of network throughput and host CPU us- Supporting complex event detection in pervasive age; (iii) compare the efficiency of multiport 1 Gbps in- computing environments is a challenging problem. Sen- terconnects as an alternative to 10 Gbps interconnects; sors may have limited processing, storage, and commu- and (iv) conclude by offering recommendations for im- nication capabilities. In addition, battery powered sens- proving network energy efficiency for system deploy- ing devices have limited energy resources. Since they ment and network interface designers. are embedded in the environment, recharging may be difficult or impossible. To prolong the lifetime of the UCAM-CL-TR-785 system, it is vital that these energy resources are used efficiently. Further complications arise due to the dis- tributed nature of pervasive computing systems. The Aaron R. Coble: lack of a global clock can make it impossible to or- Anonymity, information, der events from different sources. Events may be de- layed or lost en route to their destination, making it and machine-assisted proof difficult to perform timely and accurate complex event July 2010, 171 pages, PDF detection. Finally, pervasive computing systems may be PhD thesis (King’s College, January 2010) large, both geographically and in terms of the number of sensors. Architectures to support pervasive comput- ing applications should therefore be highly scalable. Abstract: This report demonstrates a technique for We make several contributions in this dissertation. proving the anonymity guarantees of communication Firstly, we present a flexible language for specifying systems, using a mechanised theorem-prover. The ap- complex event patterns. The language provides devel- proach is based on Shannon’s theory of information opers with a variety of parameters to control the detec- and can be used to analyse probabilistic programs. tion process, and is designed for use in an open dis- The information-theoretic metrics that are used for tributed environment. Secondly, we provide the abil- anonymity provide quantitative results, even in the case ity for applications to specify a variety of detection of partial anonymity. Many of the developments in this policies. These policies allow the system to determine text are applicable to information leakage in general, the best way of handling lost and delayed events. Of rather than solely to privacy properties. By developing particular interest is our ‘no false-positive’ detection the framework within a mechanised theorem-prover, all policy. This allows a reduction in detection latency proofs are guaranteed to be logically and mathemati- while ensuring that only correct events are generated cally consistent with respect to a given model. More- for applications sensitive to false positives. Finally, we over, the specification of a system can be parameterised show how complex event detector placement can be and desirable properties of the system can quantify over optimized over a federated event-based middleware. In those parameters; as a result, properties can be proved many cases, detector distribution can reduce unneces- about the system in general, rather than specific in- sary communication with resource constrained sensors. stances. In order to develop the analysis framework de- scribed in this text, the underlying theories of informa- tion, probability, and measure had to be formalised in the theorem-prover; those formalisations are explained in detail. That foundational work is of general interest

211 and not limited to the applications illustrated here. The developed to identify flows by their destination nodes meticulous, extensional approach that has been taken is extended to enable flows to be identified by source- ensures that mathematical consistency is maintained. destination address pairs. Finally, a modification to the A series of examples illustrate how formalised in- link scheduling mechanism is proposed to achieve max- formation theory can be used to analyse and prove min fairness between flows. the information leakage of programs modelled in the theorem-prover. Those examples consider a number of UCAM-CL-TR-787 different threat models and show how they can be char- acterised in the framework proposed. Daniel Bernhardt: Finally, the tools developed are used to prove the anonymity of the dining cryptographers (DC) protocol, Emotion inference from human body thereby demonstrating the use of the framework and motion its applicability to proving privacy properties; the DC protocol is a standard benchmark for new methods of October 2010, 227 pages, PDF analysing anonymity systems. This work includes the PhD thesis (Selwyn College, January 2010) first machine-assisted proof of anonymity of the DC protocol for an unbounded number of cryptographers. Abstract: The human body has evolved to perform so- phisticated tasks from locomotion to the use of tools. UCAM-CL-TR-786 At the same time our body movements can carry infor- mation indicative of our intentions, inter-personal at- titudes and emotional states. Because our body is spe- Arnab Banerjee: cialised to perform a variety of everyday tasks, in most Communication flows in situations emotional effects are only visible through subtle changes in the qualities of movements and ac- power-efficient Networks-on-Chips tions. This dissertation focuses on the automatic analy- sis of emotional effects in everyday actions. August 2010, 107 pages, PDF In the past most efforts to recognise emotions from PhD thesis (Girton College, March 2009) the human body have focused on expressive gestures which are archetypal and exaggerated expressions of Abstract: Networks-on-Chips (NoCs) represent a scal- emotions. While these are easier to recognise by hu- able wiring solution for future chips, with dynamic mans and computational pattern recognisers they very allocation-based networks able to provide good utili- rarely occur in natural scenarios. The principal con- sation of the scarce available resources. This thesis de- tribution of this dissertation is hence the inference of velops power-efficient, dynamic, packet-switched NoCs emotional states from everyday actions such as walk- which can support on-chip communication flows. ing, knocking and throwing. The implementation of the Given the severe power constraint already present system draws inspiration from a variety of disciplines in VLSI, a power efficient NoC design direction is first including psychology, character animation and speech developed. To accurately explore the impact of various recognition. Complex actions are modelled using Hid- design parameters on NoC power dissipation, 4 differ- den Markov Models and motion primitives. The mani- ent router designs are synthesised, placed and routed festation of emotions in everyday actions is very subtle in a 90nm process. This demonstrates that the power and even humans are far from perfect at picking up and demands are dominated by the data-path and not the interpreting the relevant cues because emotional influ- control-path, leading to the key finding that, from the ences are usually minor compared to constraints arising energy perspective, it is justifiable to use more compu- from the action context or differences between individ- tation to optimise communication. uals. A review of existing research shows the near- This dissertation describes a holistic approach ubiquitous nature of stream-like communication flows which models emotional, action and personal influ- in future computing systems, making support for flows ences in order to maximise the discriminability of dif- within NoCs critically important. It is shown that in ferent emotion classes. A pipeline is developed which several situations, current NoCs make highly inefficient incrementally removes the biases introduced by differ- use of network resources in the presence of communi- ent action contexts and individual differences. The re- cation flows. To resolve this problem, a scalable mech- sulting signal is described in terms of posture and dy- anism is developed to enable the identification of flows, namic features and classified into one of several emo- with a flow defined as all packets going to the same tion classes using statistically trained Support Vector destination. The number of virtual-channels that can Machines. The system also goes beyond isolated ex- be used by a single flow is then limited to the minimum pressions and is able to classify natural action se- required, ensuring efficient resource utilisation. quences. I use Level Building to segment action se- The issue of fair resource allocation between flows quences and combine component classifications using is next investigated. The locally fair, packet-based al- an incremental voting scheme which is suitable for on- location strategies of current NoCs are shown not to line applications. The system is comprehensively eval- provide fairness between flows. The mechanism already uated along a number of dimensions using a corpus of

212 motion-captured actions. For isolated actions I evalu- Abstract: We describe a new algorithm for proving tem- ate the generalisation performance to new subjects. For poral properties expressed in LTL of infinite-state pro- action sequences I study the effects of reusing mod- grams. Our approach takes advantage of the fact that els trained on the isolated cases vs adapting models to LTL properties can often be proved more efficiently us- connected samples. The dissertation also evaluates the ing techniques usually associated with the branching- role of modelling the influence of individual user differ- time logic CTL than they can with native LTL algo- ences. I develop and evaluate a regression-based adap- rithms. The caveat is that, in certain instances, nonde- tation scheme. The results bring us an important step terminism in the system’s transition relation can cause closer to recognising emotions from body movements, CTL methods to report counterexamples that are spu- embracing the complexity of body movements in natu- rious with respect to the original LTL formula. To ad- ral scenarios. dress this problem we describe an algorithm that, as it attempts to apply CTL proof methods, finds and UCAM-CL-TR-788 then removes problematic nondeterminism via an anal- ysis on the potentially spurious counterexamples. Prob- Byron Cook, Eric Koskinen, Moshe Vardi: lematic nondeterminism is characterized using decision predicates, and removed using a partial, symbolic deter- Branching-time reasoning for minization procedure which introduces new prophecy variables to predict the future outcome of these choices. programs We demonstrate—using examples taken from the Post- (extended version) greSQL database server, Apache web server, and Win- dows OS kernel—that our method can yield enormous July 2011, 38 pages, PDF performance improvements in comparison to known tools, allowing us to automatically prove properties of Abstract: We describe a reduction from temporal prop- programs where we could not prove them before. erty verification to a program analysis problem. Our reduction is an encoding which, with the use of proce- UCAM-CL-TR-790 dures and nondeterminism, enables existing interpro- cedural program analysis tools to naturally perform Ted Briscoe, Ben Medlock, Øistein Andersen: the reasoning necessary for proving temporal proper- Automated assessment of ESOL free ties (eg. backtracking, eventuality checking, tree coun- terexamples for branching-time properties, abstraction text examinations refinement, etc.). Our reduction is state-based in nature but also forms the basis of an efficient algorithm for November 2010, 31 pages, PDF verifying trace-based properties, when combined with Abstract: In this report, we consider the task of au- an iterative symbolic determinization technique, due to tomated assessment of English as a Second Language Cook and Koskinen. (ESOL) examination scripts written in response to In this extended version, we formalize our encod- prompts eliciting free text answers. We review and crit- ing as a guarded transition system G, parameterized ically evaluate previous work on automated assessment by a finite set of ranking functions and the temporal for essays, especially when applied to ESOL text. We logic property. We establish soundness between a safety formally define the task as discriminative preference property of G and the validity of a branching time tem- ranking and develop a new system trained and tested poral logic property ∀CTL. ∀CTL is a sufficient logic on a corpus of manually-graded scripts. We show ex- for proving properties written in the trace-based Linear perimentally that our best performing system is very Temporal Logic via the iterative algorithm. close to the upper bound for the task, as defined by the Finally using examples drawn from the PostgreSQL agreement between human examiners on the same cor- database server, Apache web server, and Windows OS pus. Finally we argue that our approach, unlike extant kernel, we demonstrate the practical viability of our solutions, is relatively prompt-insensitive and resistant work. to subversion, even when its operating principles are in the public domain. These properties make our ap- UCAM-CL-TR-789 proach significantly more viable for high-stakes assess- ment. Byron Cook, Eric Koskinen: UCAM-CL-TR-791 Making prophecies with decision predicates Andreas Vlachos: Semi-supervised learning for November 2010, 29 pages, PDF biomedical information extraction November 2010, 113 pages, PDF PhD thesis (Peterhouse College, December 2009)

213 Abstract: This thesis explores the application of semi- are not widely used by non specialists, in contrast to supervised learning to biomedical information extrac- computer algebra packages which also deal with the tion. The latter has emerged in recent years as a chal- manipulation of symbolic mathematics. The work de- lenging application domain for natural language pro- scribed in this dissertation addresses one aspect of this cessing techniques. The challenge stems partly from the problem, that of heuristic selection in automated the- lack of appropriate resources that can be used as la- orem provers. In theory such theorem provers should beled training data. Therefore, we choose to focus on be automatic and therefore easy to use; in practice the semi-supervised learning techniques which enable us to heuristics used in the proof search are not universally take advantage of human supervision combined with optimal for all problems so human expertise is required unlabeled data. to determine heuristic choice and to set parameter val- We begin with a short introduction to biomedical ues. information extraction and semi-supervised learning in Modern machine learning has been applied to the Chapter 1. Chapter 2 focuses on the task of biomedi- automation of heuristic selection in a first order logic cal named entity recognition. Using raw abstracts and theorem prover. One objective was to find if there are a dictionary of gene names we develop two systems any features of a proof problem that are both easy for this task. Furthermore, we discuss annotation is- to measure and provide useful information for deter- sues and demonstrate how the performance can be im- mining heuristic choice. Another was to determine and proved using user feedback in realistic conditions. In demonstrate a practical approach to making theorem Chapter 3 we develop two biomedical event extrac- provers truly automatic. tion systems: a rule-based one and a machine learning In the experimental work, heuristic selection based based one. The former needs only an annotated dic- on features of the conjecture to be proved and the tionary and syntactic parsing as input, while the latter associated axioms is shown to do better than any requires partial event annotation additionally. Both sys- single heuristic. Additionally a comparison has been tems achieve performances comparable to systems uti- made between static features, measured prior to the lizing fully annotated training data. Chapter 4 discusses proof search process, and dynamic features that mea- the task of lexical-semantic clustering using Dirichlet sure changes arising in the early stages of proof search. process mixture models. We review the unsupervised Further work was done on determining which features learning method used, which allows the number of clus- are important, demonstrating that good results are ob- ters discovered to be determined by the data. Further- tained with only a few features required. more, we introduce a new clustering evaluation mea- sure that addresses some shortcomings of the existing UCAM-CL-TR-793 measures. Chapter 5 introduces a method of guiding the clustering solution using pairwise links between in- Shazia Afzal: stances. Furthermore, we present a method of select- ing these pairwise links actively in order to decrease the Affect inference in learning amount of supervision required. Finally, Chapter 6 as- sesses the contributions of this thesis and highlights di- environments: a functional view of rections for future work. facial affect analysis using naturalistic UCAM-CL-TR-792 data December 2010, 146 pages, PDF James P. Bridge: PhD thesis (Murray Edwards College, May 2010) Machine learning and automated Abstract: This research takes an application-oriented theorem proving stance on affective computing and addresses the prob- lem of automatic affect inference within learning tech- November 2010, 180 pages, PDF nologies. It draws from the growing understanding of PhD thesis (Corpus Christi College, October 2010) the centrality of emotion in the learning process and Abstract: Computer programs to find formal proofs of the fact that, as yet, this crucial link is not addressed theorems have a history going back nearly half a cen- in the design of learning technologies. This dissertation tury. Originally designed as tools for mathematicians, specifically focuses on examining the utility of facial af- modern applications of automated theorem provers fect analysis to model the affective state of a learner in and proof assistants are much more diverse. In particu- a one-on-one learning setting. lar they are used in formal methods to verify software Although facial affect analysis using posed or acted and hardware designs to prevent costly, or life threat- data has been studied in great detail for a couple of ening, errors being introduced into systems from mi- decades now, research using naturalistic data is still a crochips to controllers for medical equipment or space challenging problem. The challenges are derived from rockets. the complexity in conceptualising affect, the method- Despite this, the high level of human expertise re- ological and technical difficulties in measuring it, and quired in their use means that theorem proving tools the emergent ethical concerns in realising automatic

214 affect inference by computers. However, as the con- structure and collocation errors based on co-occurrence text of this research is derived from, and relates to, a statistics from the BNC, using clustering to deal with real-world application environment, it is based entirely data sparseness. We show that such techniques can de- on naturalistic data. The whole pipeline – of identify- tect, and sometimes even correct, at least certain error ing the requirements, to collection of data, to the de- types as well as or better than human annotators. velopment of an annotation protocol, to labelling of We finally present an annotation experiment in data, and the eventual analyses – both quantitative and which a human annotator corrects and supplements the qualitative; is described in this dissertation. In effect, a automatic annotation, which confirms the high detec- framework for conducting research using natural data tion/correction accuracy of our system and furthermore is set out and the challenges encountered at each stage shows that such a hybrid set-up gives higher-quality identified. annotation with considerably less time and effort ex- Apart from the challenges associated with the per- pended compared to fully manual annotation. ception and measurement of affect, this research em- phasises that there are additional issues that require UCAM-CL-TR-795 due consideration by virtue of the application context. As such, in light of the discussed observations and re- Aurelie Herbelot: sults, this research concludes that we need to under- stand the nature and expression of emotion in the con- Underspecified quantification text of technology use, and pursue creative exploration of what is perhaps a qualitatively different form of emo- February 2011, 163 pages, PDF tion expression and communication. PhD thesis (Trinity Hall, 2010)

UCAM-CL-TR-794 Abstract: Many noun phrases in text are ambiguously quantified: syntax doesn’t explicitly tell us whether they Øistein E. Andersen: refer to a single entity or to several and, in main clauses, what portion of the set denoted by the subject Nbar ac- Grammatical error prediction tually takes part in the event expressed by the verb. For instance, when we utter the sentence ‘Cats are mam- January 2011, 163 pages, PDF mals’, it is only world knowledge that allows our hearer PhD thesis (Girton College, 2010) to infer that we mean ‘All cats are mammals’, and not ‘Some cats are mammals’. This ambiguity effect is in- Abstract: In this thesis, we investigate methods for au- teresting at several levels. Theoretically, it raises cogni- tomatic detection, and to some extent correction, of tive and linguistic questions. To what extent does syn- grammatical errors. The evaluation is based on man- tax help humans resolve the ambiguity? What problem- ual error annotation in the Cambridge Learner Corpus solving skills come into play when syntax is insufficient (CLC), and automatic or semi-automatic annotation of for full resolution? How does ambiguous quantification error corpora is one possible application, but the meth- relate to the phenomenon of genericity, as described by ods are also applicable in other settings, for instance to the linguistic literature? From an engineering point of give learners feedback on their writing or in a proof- view, the resolution of quantificational ambiguity is es- reading tool used to prepare texts for publication. sential to the accuracy of some Natural Language Pro- Apart from the CLC, we use the British National cessing tasks. Corpus (BNC) to get a better model of correct us- We argue that the quantification ambiguity phe- age, WordNet for semantic relations, other machine- nomenon can be described in terms of underspecifica- readable dictionaries for orthography/morphology, and tion and propose a formalisation for what we call ‘un- the Robust Accurate Statistical Parsing (RASP) system derquantified’ subject noun phrases. Our formalisation to parse both the CLC and the BNC and thereby iden- is motivated by inference requirements and covers all tify syntactic relations within the sentence. An ancillary cases of genericity. outcome of this is a syntactically annotated version of Our approach is then empirically validated by hu- the BNC, which we have made publicly available. man annotation experiments. We propose an annota- We present a tool called GenERRate, which can be tion scheme that follows our theoretical claims with used to introduce errors into a corpus of correct text, regard to underquantification. Our annotation results and evaluate to what extent the resulting synthetic error strengthen our claim that all noun phrases can be anal- corpus can complement or replace a real error corpus. ysed in terms of quantification. The produced corpus Different methods for detection and correction are allows us to derive a gold standard for quantification investigated, including: sentence-level binary classifica- resolution experiments and is, as far as we are aware, tion based on machine learning over n-grams of words, the first attempt to analyse the distribution of null n-grams of part-of-speech tags and grammatical rela- quantifiers in English. tions; automatic identification of features which are We then create a baseline system for automatic highly indicative of individual errors; and development quantification resolution, using syntax to provide dis- of classifiers aimed more specifically at given error criminating features for our classification. We show types, for instance concord errors based on syntactic

215 that results are rather poor for certain classes and ar- and significant actual speed-ups (up to around 25 on a gue that some level of pragmatics is needed, in com- 32-effective-core machine). bination with syntax, to perform accurate resolution. We explore the use of memory-based learning as a way UCAM-CL-TR-797 to approximate the problem-solving skills available to humans at the level of pragmatic understanding. Boris Feigin:

UCAM-CL-TR-796 Interpretational overhead in system software Jonathan Mak: April 2011, 116 pages, PDF Facilitating program parallelisation: PhD thesis (Homerton College, September 2010) a profiling-based approach Abstract: Interpreting a program carries a runtime penalty: the interpretational overhead. Traditionally, a March 2011, 120 pages, PDF compiler removes interpretational overhead by sacri- PhD thesis (St. John’s College, November 2010) ficing inessential details of program execution. How- ever, a broad class of system software is based on non- Abstract: The advance of multi-core architectures sig- standard interpretation of machine code or a higher- nals the end of universal speed-up of software over level language. For example, virtual machine monitors time. To continue exploiting hardware developments, emulate privileged instructions; program instrumenta- effort must be invested in producing software that can tion is used to build dynamic call graphs by intercepting be split up to run on multiple cores or processors. function calls and returns; and dynamic software up- Many solutions have been proposed to address this is- dating technology allows program code to be altered at sue, ranging from explicit to implicit parallelism, but runtime. Many of these frameworks are performance- consensus has yet to be reached on the best way to sensitive and several efficiency requirements—both for- tackle such a problem. mal and informal—have been put forward over the In this thesis we propose a profiling-based inter- last four decades. Largely independently, the concept active approach to program parallelisation. Profilers of interpretational overhead received much attention in gather dependence information on a program, which the partial evaluation (“program specialization”) liter- is then used to automatically parallelise the program ature. This dissertation contributes a unifying under- at source-level. The programmer can then examine the standing of efficiency and interpretational overhead in resulting parallel program, and using critical path in- system software. formation from the profiler, identify and refactor par- Starting from the observation that a virtual machine allelism bottlenecks to enable further parallelism. We monitor is a self-interpreter for machine code, our first argue that this is an efficient and effective method of contribution is to reconcile the definition of efficient parallelising general sequential programs. virtualization due to Popek and Goldberg with Jones Our first contribution is a comprehensive analy- optimality, a measure of the strength of program spe- sis of limits of parallelism in several benchmark pro- cializers. We also present a rational reconstruction of grams, performed by constructing Dynamic Depen- hardware virtualization support (“trap-and-emulate”) dence Graphs (DDGs) from execution traces. We show from context-threaded interpretation, a technique for that average available parallelism is often high, but re- implementing fast interpreters due to Berndl et al. alising it would require various changes in compilation, As a form of augmented execution, virtualization language or computation models. As an example, we shares many similarities with program instrumentation. show how using a spaghetti stack structure can lead to Although several low-overhead instrumentation frame- a doubling of potential parallelism. works are available on today’s hardware, there has been The rest of our thesis demonstrates how some of no formal understanding of what it means for instru- this potential parallelism can be realised under the pop- mentation to be efficient. Our second contribution is ular fork-join parallelism model used by Cilk, TBB, a definition of efficiency for program instrumentation OpenMP and others. We present a tool-chain with two in the spirit of Popek and Goldberg’s work. Instru- main components: Embla 2, which uses DDGs from mentation also incurs an implicit overhead because in- profiled dependences to estimate the amount of task- strumentation code needs access to intermediate exe- level parallelism in programs; and Woolifier, a source- cution states and this is antagonistic to optimization. to-source transformer that uses Embla 2’s output to The third contribution is to use partial equivalence parallelise the programs. Using several case studies, relations (PERs) to express the dependence of instru- we demonstrate how this tool-chain greatly facilitates mentation on execution state, enabling an instrumenta- program parallelisation by performing an automatic tion/optimization trade-off. Since program instrumen- best-effort parallelisation and presenting critical paths tation, applied at runtime, constitutes a kind of dy- in a concise graphical form so that the programmer namic software update, we can similarly restrict allow- can quickly locate parallelism bottlenecks, which when able future updates to be consistent with existing op- refactored can lead to even greater potential parallelism timizations. Finally, treating “old” and “new” code in

216 a dynamically-updatable program as being written in UCAM-CL-TR-799 different languages permits a semantic explanation of a safety rule that was originally introduced as a syntactic Thomas Tuerk: check. A separation logic framework for UCAM-CL-TR-798 HOL

Periklis Akritidis: June 2011, 271 pages, PDF PhD thesis (Downing College, December 2010) Practical memory safety for C Abstract: Separation logic is an extension of Hoare June 2011, 136 pages, PDF logic due to O’Hearn and Reynolds. It was designed PhD thesis (Wolfson College, May 2010) for reasoning about mutable data structures. Because separation logic supports local reasoning, it scales bet- Abstract: Copious amounts of high-performance and ter than classical Hoare logic and can easily be used to low-level systems code are written in memory-unsafe reason about concurrency. There are automated sepa- languages such as C and C++. Unfortunately, the lack ration logic tools as well as several formalisations in of memory safety undermines security and reliability; interactive theorem provers. Typically, the automated for example, memory-corruption bugs in programs can separation logic tools are able to reason about shal- breach security, and faults in kernel extensions can low properties of large programs. They usually con- bring down the entire operating system. Memory-safe sider just the shape of data structures, not their data- languages, however, are unlikely to displace C and C++ content. The formalisations inside theorem provers can in the near future; thus, solutions for future and exist- be used to prove interesting, deep properties. However, ing C and C++ code are needed. they typically lack automation. Another shortcoming is Despite considerable prior research, memory-safety that there are a lot of slightly different separation log- problems in C and C++ programs persist because the ics. For each programming language and each interest- existing proposals that are practical enough for pro- ing property a new kind of separation logic seems to be duction use cannot offer adequate protection, while invented. comprehensive proposals are either too slow for practi- In this thesis, a general framework for separation cal use, or break backwards compatibility by requiring logic is developed inside the HOL4 theorem prover. significant porting or generating binary-incompatible This framework is based on Abstract Separation Logic, code. an abstract, high level variant of separation logic. Ab- To enable practical protection against memory- stract Separation Logic is a general separation logic corruption attacks and operating system crashes, I de- such that many other separation logics can be based signed new integrity properties preventing dangerous on it. This framework is instantiatiated in a first step to memory corruption at low cost instead of enforcing support a stack with read and write permissions follow- strict memory safety to catch every memory error at ing ideas of Parkinson, Bornat and Calcagno. Finally, high cost. Then, at the implementation level, I aggres- the framework is further instantiated to build a separa- sively optimised for the common case, and streamlined tion logic tool called Holfoot. It is similar to the tool execution by modifying memory layouts as far as al- Smallfoot, but extends it from reasoning about shape lowed without breaking binary compatibility. properties to fully functional specifications. I developed three compiler-based tools for analysing To my knowledge this work presents the first for- and instrumenting unmodified source code to automat- malisation of Abstract Separation Logic inside a the- ically generate binaries hardened against memory er- orem prover. By building Holfoot on top of this for- rors: BBC and WIT to harden user-space C programs, malisation, I could demonstrate that Abstract Separa- and BGI to harden and to isolate Microsoft Windows tion Logic can be used as a basis for realistic separation kernel extensions. The generated code incurs low per- logic tools. Moreover, this work demonstrates that it is formance overhead and is binary-compatible with unin- feasable to implement such separation logic tools inside strumented code. BBC offers strong protection with a theorem prover. Holfoot is highly automated. It can lower overhead than previously possible for its level of verify Smallfoot examples automatically inside HOL4. protection; WIT further lowers overhead while offering Moreover, Holfoot can use the full power of HOL4. stronger protection than previous solutions of similar This allows Holfoot to verify fully functional specifica- performance; and BGI improves backwards compati- tions. Simple fully functional specifications can be han- bility and performance over previous proposals, mak- dled automatically using HOL4’s tools and libraries or ing kernel extension isolation practical for commodity external SMT solvers. More complicated ones can be systems. handled using interactive proofs inside HOL4. In con- trast, most other separation logic tools can reason just about the shape of data structures. Others reason only about data properties that can be solved using SMT solvers.

217 UCAM-CL-TR-800 used. At the same time, overheads associated with soft- ware transactional memory fail to motivate program- James R. Srinivasan: mers to expend the needed effort to use software trans- actional memory. The only way around the overheads Improving cache utilisation in the case of general unmanaged code is the anticipated availability of hardware support. On the other hand, June 2011, 184 pages, PDF architects are unwilling to devote power and area bud- PhD thesis (Jesus College, April 2011) gets in mainstream microprocessors to hardware trans- actional memory, pointing to transactional memory be- Abstract: Microprocessors have long employed caches ing a “niche” programming construct. A deadlock has to help hide the increasing latency of accessing main thus ensued that is blocking transactional memory use memory. The vast majority of previous research has fo- and experimentation in the mainstream. cussed on increasing cache hit rates to improve cache This dissertation covers the design and construction performance, while lately decreasing power consump- of a software transactional memory runtime system tion has become an equally important issue. This thesis called SLE x86 that can potentially break this dead- examines the lifetime of cache lines in the memory hier- lock by decoupling transactional memory from pro- archy, considering whether they are live (will be refer- grams using it. Unlike most other STM designs, the enced again before eviction) or dead (will not be refer- core design principle is transparency rather than per- enced again before eviction). Using these two states, the formance. SLE x86 operates at the level of x86 ma- cache utilisation (proportion of the cache which will be chine code, thereby becoming immediately applicable referenced again) can be calculated. to binaries for the popular x86 architecture. The only This thesis demonstrates that cache utilisation is requirement is that the binary synchronise using known relatively poor over a wide range of benchmarks and locking constructs or calls such as those in Pthreads or cache configurations. By focussing on techniques to im- OpenMP libraries. SLE x86 provides speculative lock prove cache utilisation, cache hit rates are increased elision (SLE) entirely in software, executing critical sec- while overall power consumption may also be de- tions in the binary using transactional memory. Option- creased. ally, the critical sections can also be executed without Key to improving cache utilisation is an accurate using transactions by acquiring the protecting lock. predictor of the state of a cache line. This thesis The dissertation makes a careful analysis of the im- presents a variety of such predictors, mostly based pact on performance due to the demands of the x86 upon the mature field of branch prediction, and com- memory consistency model and the need to transpar- pares them against previously proposed predictors. The ently instrument x86 machine code. It shows that both most appropriate predictors are then demonstrated in of these problems can be overcome to reach a reason- two applications: Improving victim cache performance able level of performance, where transparent software through filtering, and reducing cache pollution during transactional memory can perform better than a lock. aggressive prefetching SLE x86 can ensure that programs are ready for trans- These applications are primarily concerned with im- actional memory in any form, without being explicitly proving cache performance and are analysed using a de- written for it. tailed microprocessor simulator. Related applications, including decreasing power consumption, are also dis- UCAM-CL-TR-802 cussed, as are the applicability of these techniques to multiprogrammed and multiprocessor systems. Johanna Geiß: UCAM-CL-TR-801 Latent semantic sentence clustering for multi-document summarization Amitabha Roy: July 2011, 156 pages, PDF Software lock elision for x86 machine PhD thesis (St. Edmund’s College, April 2011) code Abstract: This thesis investigates the applicability of La- July 2011, 154 pages, PDF tent Semantic Analysis (LSA) to sentence clustering for PhD thesis (Emmanuel College, April 2011) Multi-Document Summarization (MDS). In contrast to more shallow approaches like measuring similarity of Abstract: More than a decade after becoming a topic of sentences by word overlap in a traditional vector space intense research there is no transactional memory hard- model, LSA takes word usage patterns into account. So ware nor any examples of software transactional mem- far LSA has been successfully applied to different In- ory use outside the research community. Using software formation Retrieval (IR) tasks like information filter- transactional memory in large pieces of software needs ing and document classification (Dumais, 2004). In the copious source code annotations and often means that course of this research, different parameters essential to standard compilers and debuggers can no longer be sentence clustering using a hierarchical agglomerative

218 clustering algorithm (HAC) in general and in combina- of this stirred an unfathomable excitement in her” or tion with LSA in particular are investigated. These pa- “a carelessly leaked report” the system produces inter- rameters include, inter alia, information about the type pretations “All of this provoked an unfathomable ex- of vocabulary, the size of the semantic space and the op- citement in her” and “a carelessly disclosed report” re- timal numbers of dimensions to be used in LSA. These spectively. It runs on unrestricted text and to my knowl- parameters have not previously been studied and eval- edge is the only existing robust metaphor paraphrasing uated in combination with sentence clustering (chapter system. It does not employ any hand-coded knowledge, 4). but instead derives metaphorical interpretations from This thesis also presents the first gold standard for a large text corpus using statistical pattern-processing. sentence clustering in MDS. To be able to evaluate The system was evaluated with the aid of human judges sentence clusterings directly and classify the influence and it operates with the accuracy of 81%. of the different parameters on the quality of sentence The metaphor identification system automatically clustering, an evaluation strategy is developed that in- traces the analogies involved in the production of a cludes gold standard comparison using different eval- particular metaphorical expression in a minimally su- uation measures (chapter 5). Therefore the first com- pervised way. The system generalises over the analo- pound gold standard for sentence clustering was cre- gies by means of verb and noun clustering, i.e. identi- ated. Several human annotators were asked to group fication of groups of similar concepts. This generalisa- similar sentences into clusters following guidelines cre- tion makes it capable of recognising previously unseen ated for this purpose (section 5.4). The evaluation of metaphorical expressions in text, e.g. having once seen the human generated clusterings revealed that the hu- a metaphor ‘stir excitement’ the system concludes that man annotators agreed on clustering sentences above ‘swallow anger’ is also used metaphorically. The system chance. Analysis of the strategies adopted by the human identifies metaphorical expressions with a high preci- annotators revealed two groups – hunters and gather- sion of 79%. ers – who differ clearly in the structure and size of the The logical metonymy processing system produces clusters they created (chapter 6). a list of metonymic interpretations disambiguated with On the basis of the evaluation strategy the param- respect to their word sense. It then automatically or- eters for sentence clustering and LSA are optimized ganises them into a novel class-based model of logical (chapter 7). A final experiment in which the perfor- metonymy inspired by both empirical evidence and lin- mance of LSA in sentence clustering for MDS is com- guistic theory. This model provides more accurate and pared to the simple word matching approach of the tra- generalised information about possible interpretations ditional Vector Space Model (VSM) revealed that LSA of metonymic phrases than previous approaches. produces better quality sentence clusters for MDS than VSM. UCAM-CL-TR-804

UCAM-CL-TR-803 Sean B. Holden: The HasGP user manual Ekaterina V. Shutova: September 2011, 18 pages, PDF Computational approaches to Abstract: HasGP is an experimental library implement- figurative language ing methods for supervised learning using Gaussian process (GP) inference, in both the regression and August 2011, 219 pages, PDF classification settings. It has been developed in the PhD thesis (Pembroke College, March 2011) functional language Haskell as an investigation into whether the well-known advantages of the functional Abstract: The use of figurative language is ubiquitous paradigm can be exploited in the field of machine in natural language text and it is a serious bottleneck in learning, which traditionally has been dominated by automatic text understanding. A system capable of in- the procedural/object-oriented approach, particularly terpreting figurative language would be extremely ben- involving C/C++ and Matlab. HasGP is open-source eficial to a wide range of practical NLP applications. software released under the GPL3 license. This manual The main focus of this thesis is on the phenomenon of provides a short introduction on how install the library, metaphor. I adopt a statistical data-driven approach to and how to apply it to supervised learning problems. It its modelling, and create the first open-domain system also provides some more in-depth information on the for metaphor identification and interpretation in unre- implementation of the library, which is aimed at de- stricted text. In order to verify that similar methods can velopers. In the latter, we also show how some of the be applied to modelling other types of figurative lan- specific functional features of Haskell, in particular the guage, I then extend this work to the task of interpre- ability to treat functions as first-class objects, and the tation of logical metonymy. use of typeclasses and monads, have informed the de- The metaphor interpretation system is capable of sign of the library. This manual applies to HasGP ver- discovering literal meanings of metaphorical expres- sion 0.1, which is the initial release of the library. sions in text. For the metaphors in the examples “All

219 UCAM-CL-TR-805 UCAM-CL-TR-806

Simon Hay: Damien Fay, Jer´ omeˆ Kunegis, Eiko Yoneki: A model personal energy meter On joint diagonalisation for September 2011, 207 pages, PDF dynamic network analysis PhD thesis (Girton College, August 2011) October 2011, 12 pages, PDF Abstract: Every day each of us consumes a signifi- Abstract: Joint diagonalisation (JD) is a technique used cant amount of energy, both directly through transport, to estimate an average eigenspace of a set of matrices. heating and use of appliances, and indirectly from our Whilst it has been used successfully in many areas to needs for the production of food, manufacture of goods track the evolution of systems via their eigenvectors; its and provision of services. application in network analysis is novel. The key focus This dissertation investigates a personal energy me- in this paper is the use of JD on matrices of spanning ter which can record and apportion an individual’s en- trees of a network. This is especially useful in the case of ergy usage in order to supply baseline information and real-world contact networks in which a single underly- incentives for reducing our environmental impact. ing static graph does not exist. The average eigenspace If the energy costs of large shared resources are split may be used to construct a graph which represents the evenly without regard for individual consumption each ‘average spanning tree’ of the network or a representa- person minimises his own losses by taking advantage tion of the most common propagation paths. We then of others. Context awareness offers the potential to examine the distribution of deviations from the aver- change this balance and apportion energy costs to those age and find that this distribution in real-world contact who cause them to be incurred. This dissertation ex- networks is multi-modal; thus indicating several modes plores how sensor systems installed in many buildings in the underlying network. These modes are identified today can be used to apportion energy consumption and are found to correspond to particular times. Thus between users, including an evaluation of a range of JD may be used to decompose the behaviour, in time, of strategies in a case study and elaboration of the over- contact networks and produce average static graphs for riding principles that are generally applicable. It also each time. This may be viewed as a mixture between a shows how second-order estimators combined with lo- dynamic and static graph approach to contact network cation data can provide a proxy for fine-grained sens- analysis. ing. A key ingredient for apportionment mechanisms is data on energy usage. This may come from metering de- UCAM-CL-TR-807 vices or buildings directly, or from profiling devices and using secondary indicators to infer their power state. A Ola Mahmoud: mechanism for profiling devices to determine the en- ergy costs of specific activities, particularly applicable Second-order algebraic theories to shared programmable devices is presented which can October 2011, 133 pages, PDF make this process simpler and more accurate. By com- PhD thesis (Clare Hall, March 2011) bining crowd-sourced building-inventory information and a simple building energy model it is possible to esti- Abstract: Second-order universal algebra and second- mate an individual’s energy use disaggregated by device order equational logic respectively provide a model class with very little direct sensing. theory and a formal deductive system for languages Contextual information provides crucial cues for with variable binding and parameterised metavariables. apportioning the use and energy costs of resources, and This dissertation completes the algebraic foundations one of the most valuable sources from which to infer of second-order languages from the viewpoint of cate- context is location. A key ingredient for a personal en- gorical algebra. ergy meter is a low cost, low infrastructure location In particular, the dissertation introduces the notion system that can be deployed on a truly global scale. of second-order algebraic theory. A main role in the def- This dissertation presents a description and evaluation inition is played by the second-order theory of equal- of the new concept of inquiry-free Bluetooth tracking ity M, representing the most elementary operators and that has the potential to offer indoor location informa- equations present in every second-order language. We tion with significantly less infrastructure and calibra- show that M can be described abstractly via the univer- tion than other systems. sal property of being the free cartesian category on an Finally, a suitable architecture for a personal energy exponentiable object. Thereby, in the tradition of cat- meter on a global scale is demonstrated using a mobile egorical algebra, a second-order algebraic theory con- phone application to aggregate energy feeds based on sists of a cartesian category TH and a strict cartesian the case studies and technologies developed. identity-on-objects functor from M to TH that pre- serves the universal exponentiable object of M.

220 At the syntactic level, we establish the correctness UCAM-CL-TR-809 of our definition by showing a categorical equiva- lence between second-order equational presentations John L. Miller: and second-order algebraic theories. This equivalence, referred to as the Second-Order Syntactic Categori- Distributed virtual environment cal Type Theory Correspondence, involves distilling a notion of syntactic translation between second-order scalability and security equational presentations that corresponds to the canon- October 2011, 98 pages, PDF ical notion of morphism between second-order alge- PhD thesis (Hughes Hall, October 2011) braic theories. Syntactic translations provide a mathe- matical formalisation of notions such as encodings and Abstract: Distributed virtual environments (DVEs) transforms for second-order languages. have been an active area of research and engineering for On top of the aforementioned syntactic correspon- more than 20 years. The most widely deployed DVEs dence, we furthermore establish the Second-Order Se- are network games such as Quake, Halo, and World of mantic Categorical Type Theory Correspondence. This Warcraft (WoW), with millions of users and billions of involves generalising Lawvere’s notion of functorial dollars in annual revenue. Deployed DVEs remain ex- model of algebraic theories to the second-order setting. pensive centralized implementations despite significant By this semantic correspondence, second-order functo- research outlining ways to distribute DVE workloads. rial semantics is shown to correspond to the model the- This dissertation shows previous DVE research eval- ory of second-order universal algebra. uations are inconsistent with deployed DVE needs. As- We finally show that the core of the theory sur- sumptions about avatar movement and proximity – rounding Lawvere theories generalises to the second or- fundamental scale factors – do not match WoW’s work- der as well. Instances of this development are the exis- load, and likely the workload of other deployed DVEs. tence of algebraic functors and monad morphisms in Alternate workload models are explored and prelimi- the second-order universe. Moreover, we define a no- nary conclusions presented. Using realistic workloads tion of translation homomorphism that allows us to es- it is shown that a fully decentralized DVE cannot be tablish a 2-categorical type theory correspondence. deployed to today’s consumers, regardless of its over- head. UCAM-CL-TR-808 Residential broadband speeds are improving, and this limitation will eventually disappear. When it does, Matko Botincan,ˇ Mike Dodds, appropriate security mechanisms will be a fundamental Suresh Jagannathan: requirement for technology adoption. A trusted auditing system (“Carbon”) is presented Resource-sensitive synchronisation which has good security, scalability, and resource char- inference by abduction acteristics for decentralized DVEs. When performing exhaustive auditing, Carbon adds 27% network over- January 2012, 57 pages, PDF head to a decentralized DVE with a WoW-like work- load. This resource consumption can be reduced sig- Abstract: We present an analysis which takes as its nificantly, depending upon the DVE’s risk tolerance. Fi- input a sequential program, augmented with annota- nally, the Pairwise Random Protocol (PRP) is described. tions indicating potential parallelization opportunities, PRP enables adversaries to fairly resolve probabilistic and a sequential proof, written in separation logic, and activities, an ability missing from most decentralized produces a correctly-synchronized parallelized program DVE security proposals. and proof of that program. Unlike previous work, ours Thus, this dissertation’s contribution is to address is not an independence analysis; we insert synchroniza- two of the obstacles for deploying research on decen- tion constructs to preserve relevant dependencies found tralized DVE architectures. First, lack of evidence that in the sequential program that may otherwise be vi- research results apply to existing DVEs. Second, the olated by a naıve¨ translation. Separation logic allows lack of security systems combining appropriate security us to parallelize fine-grained patterns of resource-usage, guarantees with acceptable overhead. moving beyond straightforward points-to analysis. Our analysis works by using the sequential proof UCAM-CL-TR-810 to discover dependencies between different parts of the program. It leverages these discovered dependencies to guide the insertion of synchronization primitives into Nick Barrow-Williams: the parallelized program, and ensure that the resulting parallelized program satisfies the same specification as Proximity Coherence for the original sequential program. Our analysis is built chip-multiprocessors using frame inference and abduction, two techniques supported by an increasing number of separation logic November 2011, 164 pages, PDF tools. PhD thesis (Trinity Hall, January 2011)

221 Abstract: Many-core architectures provide an efficient In this thesis I perform a fusion of TEAPOT and HI- way of harnessing the growing numbers of transistors JACK/NONSTOP techniques on secure integrated cir- available in modern fabrication processes; however, the cuits. An attacker is able to introduce one or more fre- parallel programs run on these platforms are increas- quencies into a cryptographic system with the intention ingly limited by the energy and latency costs of com- of forcing it to misbehave or to radiate secrets. munication. Existing designs provide a functional com- I demonstrate two approaches to this attack: munication layer but do not necessarily implement the To perform the reception, I assess a variety of elec- most efficient solution for chip-multiprocessors, placing tromagnetic sensors to perform EMA. I choose an in- limits on the performance of these complex systems. In ductive hard drive head and a metal foil electric field an era of increasingly power limited silicon design, effi- sensor to measure near-field EM emissions. ciency is now a primary concern that motivates design- The first approach, named the re-emission attack, ers to look again at the challenge of . injects frequencies into the power supply of a device to The first step in the design process is to analyse the cause it to modulate up baseband signals. In this way communication behaviour of parallel benchmark suites I detect data-dependent timing from a ‘secure’ micro- such as Parsec and SPLASH-2. This thesis presents controller. Such up-conversion enables a more compact work detailing the sharing patterns observed when run- and more distant receiving antenna. ning the full benchmarks on a simulated 32-core x86 The second approach involves injecting one or more machine. The results reveal considerable locality of frequencies into the power supply of a random number shared data accesses between threads with consecutive generator that uses jitter of ring oscillators as its ran- operating system assigned thread IDs. This pattern, al- dom number source. I am able to force injection lock- though of little consequence in a multi-node system, ing of the oscillators, greatly diminishing the entropy corresponds to strong physical locality of shared data available. between adjacent cores on a chip-multiprocessor plat- I demonstrate this with the random number gener- form. ators on two commercial devices. I cause a 2004 EMV Traditional cache coherence protocols, although of- banking smartcard to fail statistical test suites by gen- ten used in chip-multiprocessor designs, have been de- erating a periodicity. For a secure 8-bit microcontroller veloped in the context of older multi-node systems. By that has been used in banking ATMs, I am able to re- redesigning coherence protocols to exploit new patterns duce the random number entropy from 232 to 225. This such as the physical locality of shared data, improving enables a 50% probability of a successful attack on the efficiency of communication, specifically in chip- cash withdrawal in 15 attempts. multiprocessors, is possible. This thesis explores such a design – Proximity Coherence – a novel scheme in UCAM-CL-TR-812 which L1 load misses are optimistically forwarded to nearby caches via new dedicated links rather than al- Pedro Brandao:˜ ways being indirected via a directory structure. Abstracting information on body area UCAM-CL-TR-811 networks A. Theodore Markettos: January 2012, 144 pages, PDF PhD thesis (Magdalene College, July 2011) Active electromagnetic attacks on secure hardware Abstract: Healthcare is changing, correction, healthcare is in need of change. The population ageing, the in- December 2011, 217 pages, PDF crease in chronic and heart diseases and just the in- PhD thesis (Clare Hall, March 2010) crease in population size will overwhelm the current hospital-centric healthcare. Abstract: The field of side-channel attacks on crypto- There is a growing interest by individuals to moni- graphic hardware has been extensively studied. In many tor their own physiology. Not only for sport activities, cases it is easier to derive the secret key from these at- but also to control their own diseases. They are chang- tacks than to break the cryptography itself. One such ing from the passive healthcare receiver to a proactive sidechannel attack is the electromagnetic side-channel self-healthcare taker. The focus is shifting from hospital attack, giving rise to electromagnetic analysis (EMA). centred treatment to a patient-centric healthcare moni- EMA, when otherwise known as ‘TEMPEST’ or toring. ‘compromising emanations’, has a long history in the Continuous, everyday, wearable monitoring and ac- military context over almost the whole of the twenti- tuating is part of this change. In this setting, sen- eth century. The US military also mention three related sors that monitor the heart, blood pressure, move- attacks, believed to be: HIJACK (modulation of secret ment, brain activity, dopamine levels, and actuators data onto conducted signals), NONSTOP (modulation that pump insulin, ‘pump’ the heart, deliver drugs to of secret data onto radiated signals) and TEAPOT (in- specific organs, stimulate the brain are needed as perva- tentional malicious emissions). sive components in and on the body. They will tend for

222 people’s need of self-monitoring and facilitate health- Abstract: Forensic investigators sometimes need to ver- care delivery. ify the integrity and processing history of digital pho- These components around a human body that com- tos and videos. The multitude of storage formats and municate to sense and act in a coordinated fashion devices they need to access also presents a challenge for make a Body Area Network (BAN). In most cases, and evidence recovery. This thesis explores how visual data in our view, a central, more powerful component will files can be recovered and analysed in scenarios where act as the coordinator of this network. These networks they have been stored in the JPEG or H.264 (MPEG-4 aim to augment the power to monitor the human body AVC) compression formats. and react to problems discovered with this observation. My techniques make use of low-level details of lossy One key advantage of this system is their overarching compression algorithms in order to tell whether a file view of the whole network. That is, the central com- under consideration might have been tampered with. ponent can have an understanding of all the monitored I also show that limitations of entropy coding some- signals and correlate them to better evaluate and react times allow us to recover intact files from storage de- to problems. This is the focus of our thesis. vices, even in the absence of filesystem and container In this document we argue that this multi-parameter metadata. correlation of the heterogeneous sensed information is I first show that it is possible to embed an impercep- not being handled in BANs. The current view depends tible message within a uniform region of a JPEG im- exclusively on the application that is using the network age such that the message becomes clearly visible when and its understanding of the parameters. This means the image is recompressed at a particular quality fac- that every application will oversee the BAN’s heteroge- tor, providing a visual warning that recompression has neous resources managing them directly without taking taken place. into consideration other applications, their needs and I then use a precise model of the computations in- knowledge. volved in JPEG decompression to build a specialised There are several physiological correlations already compressor, designed to invert the computations of known by the medical field. Correlating blood pressure the decompressor. This recompressor recovers the com- and cross sectional area of blood vessels to calculate pressed bitstreams that produce a given decompression blood velocity, estimating oxygen delivery from cardiac result, and, as a side-effect, indicates any regions of the output and oxygen saturation, are such examples. This input which are inconsistent with JPEG decompression. knowledge should be available in a BAN and shared I demonstrate the algorithm on a large database of im- by the several applications that make use of the net- ages, and show that it can detect modifications to de- work. This architecture implies a central component compressed image regions. that manages the knowledge and the resources. And Finally, I show how to rebuild fragmented com- this is, in our view, missing in BANs. pressed bitstreams, given a syntax description that in- Our proposal is a middleware layer that abstracts cludes information about syntax errors, and demon- the underlying BAN’s resources to the application, pro- strate its applicability to H.264/AVC Baseline profile viding instead an information model to be queried. The video data in memory dumps with randomly shuffled model describes the correlations for producing new in- blocks. formation that the middleware knows about. Naturally, the raw sensed data is also part of the model. The mid- UCAM-CL-TR-814 dleware hides the specificities of the nodes that consti- tute the BAN, by making available their sensed produc- Arjuna Sathiaseelan, Jon Crowcroft: tion. Applications are able to query for information at- taching requirements to these requests. The middleware The free Internet: a distant mirage or is then responsible for satisfying the requests while op- timising the resource usage of the BAN. near reality? Our architecture proposal is divided in two corre- February 2012, 10 pages, PDF sponding layers, one that abstracts the nodes’ hardware (hiding node’s particularities) and the information layer Abstract: Through this short position paper, we hope that describes information available and how it is cor- to convey our thoughts on the need for free Internet related. A prototype implementation of the architecture access and describe possible ways of achieving this – was done to illustrate the concept. hoping this stimulates a useful discussion. UCAM-CL-TR-813 UCAM-CL-TR-815 Andrew B. Lewis: Christian Richardt: Reconstructing compressed photo and video data Colour videos with depth: acquisition, processing and February 2012, 148 pages, PDF PhD thesis (Trinity College, June 2011) evaluation

223 March 2012, 132 pages, PDF now verified under our framework. Secrecy verification PhD thesis (Gonville & Caius College, November under a mixed environment of Multicast and Unicast 2011) was also done for a Byzantine security protocol.

Abstract: The human visual system lets us perceive the UCAM-CL-TR-817 world around us in three dimensions by integrating ev- idence from depth cues into a coherent visual model of the world. The equivalent in computer vision and Joseph Bonneau, Cormac Herley, computer graphics are geometric models, which pro- Paul C. van Oorschot, Frank Stajano: vide a wealth of information about represented objects, such as depth and surface normals. Videos do not con- The quest to replace passwords: tain this information, but only provide per-pixel colour a framework for comparative information. In this dissertation, I hence investigate a combination of videos and geometric models: videos evaluation of Web authentication with per-pixel depth (also known as RGBZ videos). I schemes consider the full life cycle of these videos: from their acquisition, via filtering and processing, to stereoscopic March 2012, 32 pages, PDF display. Abstract: We evaluate two decades of proposals to re- UCAM-CL-TR-816 place text passwords for general-purpose user authen- tication on the web using a broad set of twenty-five us- Jean E. Martina: ability, deployability and security benefits that an ideal scheme might provide. The scope of proposals we sur- Verification of security protocols vey is also extensive, including password management software, federated login protocols, graphical password based on multicast communication schemes, cognitive authentication schemes, one-time March 2012, 150 pages, PDF passwords, hardware tokens, phone-aided schemes and PhD thesis (Clare College, February 2011) biometrics. Our comprehensive approach leads to key insights about the difficulty of replacing passwords. Abstract: Over an insecure network, agents need means Not only does no known scheme come close to pro- to communicate securely. These means are often called viding all desired benefits: none even retains the full set security protocols. Security protocols, although con- of benefits which legacy passwords already provide. In structed through the arrangement of simple security particular, there is a wide range between schemes offer- blocks, normally yield complex goals. They seem sim- ing minor security benefits beyond legacy passwords, ple at a first glance, but hide subtleties that allow them to those offering significant security benefits in return to be exploited. for being more costly to deploy or difficult to use. We One way of trying to systematically capture such conclude that many academic proposals have failed to subtleties is through the use of formal methods. The gain traction because researchers rarely consider a suf- maturity of some methods for protocol verification is a ficiently wide range of real-world constraints. Beyond fact today. But these methods are still not able to cap- our analysis of current schemes, our framework pro- ture the whole set of security protocols being designed. vides an evaluation methodology and benchmark for With the convergence to an online world, new secu- future web authentication proposals. rity goals are proposed and new protocols need to be This report is an extended version of the peer- designed. The evolution of formal verification methods reviewed paper by the same name. In about twice as becomes a necessity to keep pace with this ongoing de- many pages it gives full ratings for 35 authentication velopment. schemes rather than just 9. This thesis covers the Inductive Method and its ex- tensions. The Inductive Method is a formalism to spec- UCAM-CL-TR-818 ify and verify security protocols based on structural in- duction and higher-order logic proofs. This account of Robert N. M. Watson: our extensions enables the Inductive Method to reason about non-Unicast communication and threshold cryp- New approaches to operating system tography. We developed a new set of theories capable of repre- security extensibility senting the entire set of known message casting frame- April 2012, 184 pages, PDF works. Our theories enable the Inductive Method to PhD thesis (Wolfson College, October 2010) reason about a whole new set of protocols. We also specified a basic abstraction of threshold cryptography Abstract: This dissertation proposes new approaches as a way of proving the extensibility of the method to to commodity computer operating system (OS) ac- new cryptographic primitives. We showed the feasibil- cess control extensibility that address historic problems ity of our specifications by revisiting a classic protocol,

224 with concurrency and technology transfer. Access con- come. Even in the optimistic scenario of eliminating trol extensibility addresses a lack of consensus on op- passwords from most of today’s authentication proto- erating system policy model at a time when security re- cols using trusted hardware devices or trusted servers to quirements are in flux: OS vendors, anti-virus compa- perform federated authentication, passwords will per- nies, firewall manufacturers, smart phone developers, sist as a means of “last-mile” authentication between and application writers require new tools to express humans and these trusted single sign-on deputies. policies tailored to their needs. By proposing principled This dissertation studies the difficulty of guessing approaches to access control extensibility, this work al- human-chosen secrets, introducing a sound mathemat- lows OS security to be “designed in” yet remain flexible ical framework modeling human choice as a skewed in the face of diverse and changing requirements. probability distribution. We introduce a new metric, I begin by analysing system call interposition, a alpha-guesswork, which can accurately model the re- popular extension technology used in security research sistance of a distribution against all possible guessing and products, and reveal fundamental and readily ex- attacks. We also study the statistical challenges of esti- ploited concurrency vulnerabilities. Motivated by these mating this metric using empirical data sets which can failures, I propose two security extension models: the be modeled as a large random sample from the under- TrustedBSD Mandatory Access Control (MAC) Frame- lying probability distribution. work, a flexible kernel access control extension frame- This framework is then used to evaluate several work for the FreeBSD kernel, and Capsicum, practical representative data sets from the most important cate- capabilities for UNIX. gories of human-chosen secrets to provide reliable esti- The MAC Framework, a research project I began mates of security against guessing attacks. This includes before starting my PhD, allows policy modules to dy- collecting the largest-ever corpus of user-chosen pass- namically extend the kernel access control policy. The words, with nearly 70 million, the largest list of human framework allows policies to integrate tightly with ker- names ever assembled for research, the largest data sets nel synchronisation, avoiding race conditions inherent of real answers to personal knowledge questions and to system call interposition, as well as offering reduced the first data published about human choice of banking development and technology transfer costs for new se- PINs. This data provides reliable numbers for designing curity policies. Over two chapters, I explore the frame- security systems and highlights universal limitations of work itself, and its transfer to and use in several prod- human-chosen secrets. ucts: the open source FreeBSD operating system, nCir- cle’s enforcement appliances, and Apple’s Mac OS X UCAM-CL-TR-820 and iOS operating systems. Capsicum is a new application-centric capability se- Eiko Yoneki, Amitabha Roy: curity model extending POSIX. Capsicum targets ap- plication writers rather than system designers, reflect- A unified graph query layer for ing a trend towards security-aware applications such as Google’s Chromium web browser, that map distributed multiple databases security policies into often inadequate local primitives. I August 2012, 22 pages, PDF compare Capsicum with other sandboxing techniques, demonstrating improved performance, programmabil- Abstract: There is increasing demand to store and query ity, and security. data with an inherent graph structure. Examples of This dissertation makes original contributions to such data include those from online social networks, challenging research problems in security and operating the semantic web and from navigational queries on spa- system design. Portions of this research have already tial data such as maps. Unfortunately, traditional re- had a significant impact on industry practice. lational databases have fallen short where such graph structured data is concerned. This has led to the devel- UCAM-CL-TR-819 opment of specialised graph databases such as Neo4j. However, traditional databases continue to have a wide Joseph Bonneau: usage base and have desirable properties such as the capacity to support a high volume of transactions Guessing human-chosen secrets while offering ACID semantics. In this paper we ar- May 2012, 161 pages, PDF gue that it is in fact possible to unify different database PhD thesis (Churchill College, May 2012) paradigms together in the case of graph structured data through the use of a common query language and data Abstract: Authenticating humans to computers remains loader that we have named Crackle (a wordplay on a notable weak point in computer security despite Gra[ph]QL). Crackle provides an expressive and pow- decades of effort. Although the security research com- erful query library in Clojure (a functional LISP di- munity has explored dozens of proposals for replacing alect for JVMs). It also provides a data loader that is or strengthening passwords, they appear likely to re- capable of interfacing transparently with various data main entrenched as the standard mechanism of human- sources such as PostgreSQL databases and the Redis computer authentication on the Internet for years to key-value store. Crackle shields programmers from the

225 backend database by allowing them to write queries frame execution in an energy-efficient way while still in Clojure. Additionally, its graph-focused prefetchers guaranteeing hard real-time deadlines. These schedules are capable of closing the hitherto large gap between a determine appropriate values for power-relevant pa- PostgreSQL database and a specialised graph database rameters, such as dynamic voltage–frequency scaling. such as Neo4j from as much 326x (with a SQL query) A key challenge for future work will be unify- to as low as 6x (when using Crackle). We also include ing these diverse approaches into one “Theory of En- a detailed performance analysis that identifies ways ergy” for computing. The progress towards this is sum- to further reduce this gap with Crackle. This brings marised in Chapter 6. The thesis concludes by sketching into question the performance argument for specialised future work towards this Theory of Energy. graph databases such as Neo4j by providing compara- ble performance on supposedly legacy data sources. UCAM-CL-TR-822

UCAM-CL-TR-821 Richard A. Russell: Charles Reams: Planning with preferences using Modelling energy efficiency for maximum satisfiability computation October 2012, 160 pages, PDF PhD thesis (Gonville and Caius College, September October 2012, 135 pages, PDF 2011) PhD thesis (Clare College, October 2012) Abstract: The objective of automated planning is to Abstract: In the last decade, efficient use of energy has synthesise a plan that achieves a set of goals specified by become a topic of global significance, touching almost the user. When achieving every goal is not feasible, the every area of modern life, including computing. From planning system must decide which ones to plan for and mobile to desktop to server, energy efficiency concerns find the lowest cost plan. The system should take as in- are now ubiquitous. However, approaches to the energy put a description of the user’s preferences and the costs problem are often piecemeal and focus on only one area incurred through executing actions. Goal utility depen- for improvement. dencies arise when the utility of achieving a goal de- I argue that the strands of the energy problem are in- pends on the other goals that are achieved with it. This extricably entangled and cannot be solved in isolation. complicates the planning procedure because achieving I offer a high-level view of the problem and, building a new goal can alter the utilities of all the other goals from it, explore a selection of subproblems within the currently achieved. field. I approach these with various levels of formality, In this dissertation we present methods for solv- and demonstrate techniques to make improvements on ing planning problems with goal utility dependencies all levels. The original contributions are as follows: by compiling them to a variant of satisfiability known Chapter 3 frames the energy problem as one of op- as weighted partial maximum satisfiability (WPMax- timisation with constraints, and explores the impact of SAT). An optimal solution to the encoding is found this perspective for current commodity products. This using a general-purpose solver. The encoding is con- includes considerations of the hardware, software and structed such that its optimal solution can be used to operating system. I summarise the current situation in construct a plan that is most preferred amongst other these respects and propose directions in which they plans of length that fit within a prespecified horizon. could be improved to better support energy manage- We evaluate this approach against an integer program- ment. ming based system using benchmark problems taken Chapter 4 presents mathematical techniques to from past international planning competitions. compute energy-optimal schedules for long-running We study how a WPMax-SAT solver might benefit computations. This work reflects the server-domain from incorporating a procedure known as survey prop- concern with energy cost, producing schedules that ex- agation. This is a message passing algorithm that esti- ploit fluctuations in power cost over time to minimise mates the probability that a variable is constrained to expenditure rather than raw energy. This assumes cer- be a particular value in a randomly selected satisfying tain idealised models of power, performance, cost, and assignment. These estimates are used to influence vari- workload, and draws precise formal conclusions from able/value decisions during search for a solution. Sur- them. vey propagation is usually presented with respect to the Chapter 5 considers techniques to implement satisfiability problem, and its generalisation, SP(y), with energy-efficient real-time streaming. Two classes of respect to the maximum satisfiability problem. We ex- problem are considered: first, hard real-time streaming tend the argument that underpins these two algorithms with fixed, predictable frame characteristics; second, to derive a new set of message passing equations for soft real-time streaming with a quality-of-service guar- application to WPMax-SAT problems. We evaluate the antee and probabilistic descriptions of per-frame work- success of this method by applying it to our encodings load. Efficient algorithms are developed for scheduling of planning problems with goal utility dependencies.

226 Our results indicate that planning with preferences November 2012, 202 pages, PDF using WPMax-SAT is competitive and sometimes more PhD thesis (St. John’s College, July 2004) successful than an integer programming approach – solving two to three times more subproblems in some Abstract: As hardware designs grow exponentially domains, while being outperformed by a smaller mar- larger, there is an increasing challenge to use transis- gin in others. In some domains, we also find that us- tor budgets effectively. Without higher-level synthesis ing information provided by survey propagation in a tools, so much effort may be spent on low-level details WPMax-SAT solver to select variable/value pairs for that it becomes impractical to effectively design circuits the earliest decisions can, on average, direct search to of the size that can be fabricated. This possibility of a lower cost solutions than a uniform sampling strategy design gap has been documented for some time now. combined with a popular heuristic. One solution is the use of domain-specific lan- guages. This thesis covers the use of software-like lan- UCAM-CL-TR-823 guages to describe algorithms that are to be imple- mented in hardware. Hardware engineers can use the Amitabha Roy, Karthik Nilakant, tools to improve their productivity and effectiveness in Valentin Dalibard, Eiko Yoneki: this particular domain. Software engineers can also use this approach to benefit from the parallelism available Mitigating I/O latency in SSD-based in modern hardware (such as reconfigurable systems graph traversal and FPGAs), while retaining the convenience of a soft- ware description. November 2012, 27 pages, PDF In this thesis a statically-allocated pure functional language, SASL, is introduced. Static allocation makes Abstract: Mining large graphs has now become an im- the language suited to implementation in fixed hard- portant aspect of many applications. Recent interest in ware resources. The I/O model is based on streams (lin- low cost graph traversal on single machines has lead to ear lazy lists), and implicit parallelism is used in or- the construction of systems that use solid state drives der to maintain a software-like approach. The thesis (SSDs) to store the graph. An SSD can be accessed with contributes constraints which allow the language to be far lower latency than magnetic media, while remain- statically-allocated, and synthesis techniques for SASL ing cheaper than main memory. Unfortunately SSDs are targeting both basic CSP and a graph-based target that slower than main memory and algorithms running on may be compiled to a register-transfer level (RTL) de- such systems are hampered by large IO latencies when scription. accessing the SSD. In this paper we present two novel Further chapters examine the optimisation of the techniques to reduce the impact of SSD IO latency on language, including the use of lenient evaluation to in- semi-external memory graph traversal. We introduce a crease parallelism, the introduction of closures and gen- variant of the Compressed Sparse Row (CSR) format eral lazy evaluation, and the use of non-determinism in that we call Compressed Enumerated Encoded Sparse the language. The extensions are examined in terms of Offset Row (CEESOR). CEESOR is particularly effi- the restrictions required to ensure static allocation, and cient for graphs with hierarchical structure and can re- the techniques required to synthesise them. duce the space required to represent connectivity in- formation by amounts varying from 5% to as much UCAM-CL-TR-825 as 76%. CEESOR allows a larger number of edges to be moved for each unit of IO transfer from the SSD Jonathan Anderson: to main memory and more effective use of operat- ing system caches. Our second contribution is a run- Privacy engineering for social time prefetching technique that exploits the ability of solid state drives to service multiple random access re- networks quests in parallel. We present a novel Run Along SSD December 2012, 255 pages, PDF Prefetcher (RASP). RASP is capable of hiding the ef- PhD thesis (Trinity College, July 2012) fect of IO latency in single threaded graph traversal in breadth-first and shorted path order to the extent that Abstract: In this dissertation, I enumerate several pri- it improves iteration time for large graphs by amounts vacy problems in online social networks (OSNs) and varying from 2.6X-6X. describe a system called Footlights that addresses them. Footlights is a platform for distributed social applica- UCAM-CL-TR-824 tions that allows users to control the sharing of private information. It is designed to compete with the perfor- Simon Frankau: mance of todays centralised OSNs, but it does not trust Hardware synthesis from a centralised infrastructure to enforce security properties. Based on several socio-technical scenarios, I extract stream-processing functional concrete technical problems to be solved and show how language the existing research literature does not solve them.

227 Addressing these problems fully would fundamentally TV channels. Synchronisation and buffering of video change users interactions with OSNs, providing real streams can cause channel change delays of several sec- control over online sharing. onds. I perform an empirical analysis of a particular I also demonstrate that todays OSNs do not provide solution to the channel change delay problem, namely, this control: both user data and the social graph are predictive pre-joining of TV channels. In this scheme vulnerable to practical privacy attacks. each Set Top Box simultaneously joins additional multi- Footlights storage substrate provides private, scal- cast groups (TV channels) along with the one requested able, sharable storage using untrusted servers. Under by the user. If the user switches to any of these chan- realistic assumptions, the direct cost of operating this nels next, switching latency is virtually eliminated, and storage system is less than one US dollar per user-year. user experience is improved. The results show that it is It is the foundation for a practical shared filesystem, a possible to eliminate zapping delay for a significant per- perfectly unobservable communications channel and a centage of channel switching requests with little impact distributed application platform. in access network bandwidth cost. The Footlights application platform allows third- Second, I propose a technique to increase the re- party developers to write social applications without source and energy efficiency of IPTV networks. This direct access to users private data. Applications run in a technique is based on a simple paradigm: avoiding conned environment with a private-by-default security waste. To reduce the inefficiencies of current static mul- model: applications can only access user information ticast distribution schemes, I propose a semi-dynamic with explicit user consent. I demonstrate that practical scheme where only a selection of TV multicast groups applications can be written on this platform. is distributed in the network, instead of all. I perform an The security of Footlights user data is based on empirical evaluation of this method and conclude that public-key cryptography, but users are able to log in its use results in significant bandwidth reductions with- to the system without carrying a private key on a hard- out compromising service performance. I also demon- ware token. Instead, users authenticate to a set of au- strate that these reductions may translate into signifi- thentication agents using a weak secret such as a user- cant energy savings in the future. chosen password or randomly-assigned 4-digit number. Third, to increase energy efficiency further I propose The protocol is designed to be secure even in the face a novel energy and resource friendly protocol for core of malicious authentication agents. optical IPTV networks. The idea is for popular IPTV traffic to optically bypass the network nodes, avoid- UCAM-CL-TR-826 ing electronic processing. I evaluate this proposal em- pirically and conclude that the introduction of optical Fernando M. V. Ramos: switching techniques results in a significant increase in the energy efficiency of IPTV networks. GREEN IPTV: a resource and All the schemes I present in this dissertation are eval- uated by means of trace-driven analyses using a dataset energy efficient network for IPTV from an operational IPTV service provider. Such thor- December 2012, 152 pages, PDF ough and realistic evaluation enables the assessment of the proposed techniques with an increased level of con- PhD thesis (Clare Hall, November 2012) fidence, and is therefore a strength of this dissertation. Abstract: The distribution of television is currently dominated by three technologies: over-the-air broad- UCAM-CL-TR-827 cast, cable, and satellite. The advent of IP networks and the increased availability of broadband access created Omar S. Choudary: a new vehicle for the distribution of TV services. The distribution of digital TV services over IP networks, or The smart card detective: IPTV, offers carriers flexibility and added value in the a hand-held EMV interceptor form of additional services. It causes therefore no sur- prise the rapid roll-out of IPTV services by operators December 2012, 55 pages, PDF worldwide in the past few years. IPTV distribution imposes stringent requirements Abstract: Several vulnerabilities have been found in on both performance and reliability. It is therefore chal- the EMV system (also known as Chip and PIN). Saar lenging for an IPTV operator to guarantee the quality Drimer and Steven Murdoch have successfully imple- of experience expected by its users, and doing so in an mented a relay attack against EMV using a fake termi- efficient manner. In this dissertation I investigate some nal. Recently the same authors have found a method to of the challenges faced by IPTV distribution network successfully complete PIN transactions without actually operators, and I propose novel techniques to address entering the correct PIN. The press has published this these challenges. vulnerability but they reported such a scenario as being First, I address one of the major concerns of IPTV hard to execute in practice because it requires special- network deployment: channel change delay. This is the ized and complex hardware. latency experienced by users when switching between

228 As proposed by Ross Anderson and Mike Bond In the first part of this thesis I explore the capability in 2006, I decided to create a miniature man-in-the- of Time-Division Multiplexed (TDM) wiring to bridge middle device to defend smartcard users against relay the gap between the fine-grain static FPGA wiring and attacks. the bus-based dynamic routing of a NoC. By replacing As a result of my MPhil project work I created a some of the static FPGA wiring with TDM wiring I am hand-held device, called Smart Card Defender (SCD), able to time division multiplex hard routers and make which intercepts the communication between smart- better use of the non-configurable area. The cost of a card and terminal. The device has been built using a low hard network is reduced by moving some of the area cost ATMEL AT90USB1287 microcontroller and other cost from the routers into reusable TDM wiring com- readily available electronic components. The total cost ponents. The TDM wiring improves the interface be- of the SCD has been around £100, but an industrial tween the hard routers and soft IP blocks which leads version could be produced for less than £20. to higher logic density overall. I show that TDM wiring I implemented several applications using the SCD, makes hard routers a flexible and efficient alternative to including the defense against the relay attack as well soft interconnect. as the recently discovered vulnerability to complete a The second part of this thesis looks at the feasibility transaction without using the correct PIN. of replacing all static wiring on the FPGA with TDM All the applications have been successfully tested on wiring. The aim was to increase the routing capacity CAP readers and live terminals. Furthermore, I have of the FPGA whilst decreasing the area used to imple- performed real tests using the SCD at several shops in ment it. An ECAD flow was developed to explore the town. extent to which the amount of wiring can be reduced. From the experiments using the SCD, I have no- The results were then used to design the TDM circuitry. ticed some particularities of the CAP protocol com- My results show that an 80% reduction in the pared to the EMV standard. I have also discovered that amount of wiring is possible though time-division mul- the smartcard does not follow the physical transport tiplexing. This reduction is sufficient to increase the protocol exactly. Such findings are presented in detail, routing capacity of the FPGA whilst maintaining simi- along with a discussion of the results. lar or better logic density. This TDM wiring can be used to implement area and power-efficient hard networks- UCAM-CL-TR-828 on-chip with good flexibility, as well as improving the performance of other hard IP blocks. Rosemary M. Francis: UCAM-CL-TR-829 Exploring networks-on-chip for FPGAs Philip Christopher Paul: January 2013, 121 pages, PDF Microelectronic security measures PhD thesis (Darwin College, July 2009) February 2013, 177 pages, PDF PhD thesis (Pembroke College, January 2009) Abstract: Developments in fabrication processes have shifted the cost ratio between wires and transistors to Abstract: In this dissertation I propose the concept of allow new trade-offs between computation and com- tamper protection grids for microelectronic security de- munication. Rising clock speeds have lead to multi- vices made from organic electronic materials. As secu- cycle cross-chip communication and pipelined buses. It rity devices have become ubiquitous in recent years, is then a small step from pipelining to switching and they are becoming targets for criminal activity. One the development of multi-core networked systems-on- general attack route to breach the security is to carry chip. Modern FPGAs are also now home to complex out physical attack after depackaging a device. Com- systems-on-chip. A change in the way we structure the mercial security devices use a metal wire mesh within computation demands a change in the way we structure the chip to protect against these attacks. However, as a the communication on-chip. microchip is physically robust, the mesh is not affected This thesis looks at Network-on-Chip design for FP- by depackaging. GAs beyond the trade-offs between hard (silicon) and As a better way of protecting security devices soft (configurable) designs. FPGAs are capable of ex- against attacks requiring the chip package to be re- tremely flexible, statically routed bit-based wiring, but moved, I investigate a protection grid that is vulnerable this flexibility comes at a high area, latency and power to damage if the packaging is tampered with. The pro- cost. Soft NoCs are able to maintain this flexibility, but tection grid is connected directly to standard bond pads do not necessarily make good use of the computation- on the microchip, to allow direct electronic measure- communication trade-off. Hard NoCs are more effi- ments, saving the need for complex sensor structures. cient when used, but are forced to operate below ca- That way, a security device can monitor the package pacity by the soft IP cores. It is also difficult to design for integrity, and initiate countermeasures if required. hard NoCs with the flexibility needed without wasting The feasibility of organic tamper protection grids silicon when the network is not used. was evaluated. To establish the viability of the concept,

229 a fabrication method for these devices was developed, science. This thesis focusses on real-time computation the sensitivity to depackaging was assessed, and prac- of large neural networks using the Izhikevich spiking tical implementation issues were evolved. Inkjet print- neuron model. ing was chosen as fabrication route, as devices can be Neural computation has been described as ‘embar- produced at low cost while preserving flexibility of lay- rassingly parallel’ as each neuron can be thought of as out. A solution to the problem of adverse surface inter- an independent system, with behaviour described by a action was found to ensure good print quality on the mathematical model. However, the real challenge lies in hydrophobic chip surface. Standard contacts between modelling neural communication. While the connectiv- chip and grid are non-linear and degrade between mea- ity of neurons has some parallels with that of electrical surements, however it was shown that stable ohmic systems, its high fan-out results in massive data process- contacts are possible using a silver buffer layer. The ing and communication requirements when modelling sensitivity of the grid to reported depackaging meth- neural communication, particularly for real-time com- ods was tested, and improvements to the structure were putations. found to maximise damage to the grid upon tampering It is shown that memory bandwidth is the most with the package. Practical issues such as measurement significant constraint to the scale of real-time neural stability with temperature and age were evaluated, as computation, followed by communication bandwidth, well as a first prototype to assess the achievable mea- which leads to a decision to implement a neural compu- surement accuracy. The evaluation of these practical is- tation system on a platform based on a network of Field sues shows directions for future work that can develop Programmable Gate Arrays (FPGAs), using commercial organic protection grids beyond the proof of concept. off-the-shelf components with some custom supporting Apart from the previously mentioned invasive at- infrastructure. This brings implementation challenges, tacks, there is a second category of attacks, non- particularly lack of on-chip memory, but also many ad- invasive attacks, that do not require the removal of the vantages, particularly high-speed transceivers. An algo- chip packaging. The most prominent non-invasive at- rithm to model neural communication that makes ef- tack is power analysis in which the power consump- ficient use of memory and communication resources is tion of a device is used as oracle to reveal the secret developed and then used to implement a neural compu- key of a security device. Logic gates were designed and tation system on the multi-FPGA platform. fabricated with data-independent power consumption Finding suitable benchmark neural networks for a in each clock cycle. However, it is shown that this is massively parallel neural computation system proves not sufficient to protect the secret key. Despite bal- to be a challenge. A synthetic benchmark that has ancing the discharged capacitances in each clock cycle, biologically-plausible fan-out, spike frequency and the power consumed still depends on the data input. spike volume is proposed and used to evaluate the sys- While the overall charge consumed in each clock cy- tem. It is shown to be capable of computing the activity cle matches to a few percent, differences within a clock of a network of 256k Izhikevich spiking neurons with cycle can easily be measured. It was shown that the a fan-out of 1k in real-time using a network of 4 FPGA dominant cause for this imbalance is early propagation, boards. This compares favourably with previous work, which can be mitigated by ensuring that evaluation with the added advantage of scalability to larger neural in a gate only takes place after all inputs are present. networks using more FPGAs. The second major source of imbalance are mismatched It is concluded that communication must be consid- discharge paths in logic gates, which result in data- ered as a first-class design constraint when implement- dependent evaluation times of a gate. This source of ing massively parallel neural computation systems. imbalance is not as trivial to remove, as it conflicts with balancing the discharged capacitances in each clock cy- UCAM-CL-TR-831 cle. Meredydd Luff: UCAM-CL-TR-830 Communication for programmability Paul J. Fox: and performance on multi-core Massively parallel neural processors computation April 2013, 89 pages, PDF PhD thesis (Gonville & Caius College, November March 2013, 105 pages, PDF 2012) PhD thesis (Jesus College, October 2012) Abstract: The transition to multi-core processors has Abstract: Reverse-engineering the brain is one of the yielded a fundamentally new sort of computer. Soft- US National Academy of Engineering’s ‘Grand Chal- ware can no longer benefit passively from improve- lenges’. The structure of the brain can be examined at ments in processor technology, but must perform its many different levels, spanning many disciplines from computations in parallel if it is to take advantage of low-level biology through psychology and computer the continued increase in processing power. Software

230 development has yet to catch up, and with good rea- the programming model presented tractable. The pro- son: parallel programming is hard, error-prone and of- grammer must find ways to exploit this explicit par- ten unrewarding. allelism provided that scales well with increasing core In this dissertation, I consider the programmability and thread availability. challenges of the multi-core era, and examine three an- A fine-grained computation model allows the pro- gles of attack. grammer to expose a large amount of explicit paral- I begin by reviewing alternative programming lelism and the greater the level of parallelism exposed paradigms which aim to address these changes, and in- the better increasing core counts can be utilised. How- vestigate two popular alternatives with a controlled pi- ever a fine-grained approach implies many interwork- lot experiment. The results are inconclusive, and sub- ing threads and the overhead of synchronising and sequent studies in that field have suffered from similar scheduling these threads can eradicate any scalability weakness. This leads me to conclude that empirical user advantages a fine-grained program may have. studies are poor tools for designing parallel program- Communication is also a key issue in multi-core ar- ming systems. chitecture. Wires do not scale as well as gates, making I then consider one such alternative paradigm, trans- communication relatively more expensive compared actional memory, which has promising usability char- to computation so optimising communication between acteristics but suffers performance overheads so severe cores on chip becomes important. that they mask its benefits. By modelling an ideal inter- This dissertation presents an architecture designed core communication mechanism, I propose using our to enable scalable fine-grained computation that is embarrassment of parallel riches to mitigate these over- communication aware (allowing a programmer to opti- heads. By pairing “helper” processors with application mise for communication). By combining a tagged mem- threads, I offload the overheads of software transac- ory, where each word is augmented with a presence bit tional memory, thereby greatly mitigating the problem signifying whether or not data is present in that word, of serial overhead. with a hardware based scheduler, which allows a thread Finally, I address the mechanics of inter-core com- to wait upon a word becoming present with low over- munication. Due to the use of cache coherence to head. A flexible and scalable architecture well suited preserve the programming model of previous proces- to fine-grained computation can be created, one which sors, explicitly communicating between the cores of enables this without needing the introduction of many any modern multi-core processor is painfully slow. The new architectural features or instructions. Communi- schemes proposed so far to alleviate this problem are cation is made explicit by enforcing that accesses to a complex, insufficiently general, and often introduce given area of memory will always go to the same cache, new resources which cannot be virtualised transpar- removing the need for a cache coherency protocol. ently by a time-sharing operating system. I propose The dissertation begins by reviewing the need for and describe an asynchronous remote store instruc- multi-core architecture and discusses the major issues tion, which is issued by one core and completed asyn- faced in their construction. It moves on to look at fine- chronously by another into its own local cache. I evalu- grained computation in particular. The proposed archi- ate several patterns of parallel communication, and de- tecture, known as Mamba, is then presented in detail termine that the use of remote stores greatly increases with several software techniques suitable for use with the performance of common synchronisation kernels. it introduced. An FPGA implementation of Mamba is I quantify the benefit to the feasibility of fine-grained then evaluated against a similar architecture that lacks parallelism. To finish, I use this mechanism to imple- the extensions Mamba has for assisting in fine-grained ment my parallel STM scheme, and demonstrate that it computation (namely a memory tagged with presence performs well, reducing overheads significantly. bits and a hardware scheduler). Microbenchmarks ex- amining the performance of FIFO based communica- UCAM-CL-TR-832 tion, MCS locks (an efficient spin-lock implementa- tion based around queues) and barriers demonstrate Gregory A. Chadwick: Mamba’s scalability and insensitivity to thread count. A SAT solver implementation demonstrates that these Communication centric, multi-core, benefits have a real impact on an actual application.

fine-grained processor architecture UCAM-CL-TR-833 April 2013, 165 pages, PDF PhD thesis (Fitzwilliam College, September 2012) Alan F. Blackwell, Ignatios Charalampidis:

Abstract: With multi-core architectures now firmly en- Practice-led design and evaluation of trenched in many application areas both computer ar- a live visual constraint language chitects and programmers now face new challenges. Computer architects must increase core count to in- May 2013, 16 pages, PDF crease explicit parallelism available to the programmer in order to provide better performance whilst leaving

231 Abstract: We report an experimental evaluation of of variant programs. We describe the ribbon proof sys- Palimpsest, a novel purely-visual programming lan- tem, prove its soundness and completeness, and out- guage. A working prototype of Palimpsest had been de- line a prototype tool for mechanically checking the di- veloped following a practice-led process, in order to as- agrams it produces. sess whether tools for use in the visual arts can usefully be created by adopting development processes that em- UCAM-CL-TR-835 ulate arts practice. This initial prototype was received more positively by users who have high self-efficacy in Maximilian C. Bolingbroke: both visual arts and computer use. A number of po- tential usability improvements are identified, structured Call-by-need supercompilation according to the Cognitive Dimensions of Notations framework. May 2013, 230 pages, PDF PhD thesis (Robinson College, April 2013) UCAM-CL-TR-834 Abstract: This thesis shows how supercompilation, a John Wickerson: powerful technique for transformation and analysis of functional programs, can be effectively applied to a Concurrent verification for sequential call-by-need language. Our setting will be core calculi programs suitable for use as intermediate languages when com- piling higher-order, lazy functional programming lan- May 2013, 149 pages, PDF guages such as Haskell. PhD thesis (Churchill College, December 2012) We describe a new formulation of supercompilation which is more closely connected to operational seman- Abstract: This dissertation makes two contributions to tics than the standard presentation. As a result of this the field of software verification. The first explains how connection, we are able to exploit a standard Sestoft- verification techniques originally developed for concur- style operational semantics to build a supercompiler rency can be usefully applied to sequential programs. which, for the first time, is able to supercompile a call- The second describes how sequential programs can be by-need language with unrestricted recursive let bind- verified using diagrams that have a parallel nature. ings. The first contribution involves a new treatment We give complete descriptions of all of the (surpris- of stability in verification methods based on rely- ingly tricky) components of the resulting supercompiler, guarantee. When an assertion made in one thread of a showing in detail how standard formulations of super- concurrent system cannot be invalidated by the actions compilation have to be adapted for the call-by-need set- of other threads, that assertion is said to be ‘stable’. ting. Stability is normally enforced through side-conditions We show how the standard technique of generalisa- on rely-guarantee proof rules. This dissertation instead tion can be extended to the call-by-need setting. We also proposes to encode stability information into the syn- describe a novel generalisation scheme which is simpler tactic form of the assertion. This approach, which we to implement than standard generalisation techniques, call explicit stabilisation, brings several benefits. First, and describe a completely new form of generalisation we empower rely-guarantee with the ability to reason which can be used when supercompiling a typed lan- about library code for the first time. Second, when guage to ameliorate the phenomenon of supercompilers the rely-guarantee method is redeployed in a sequential overspecialising functions on their type arguments. setting, explicit stabilisation allows more details of a We also demonstrate a number of non- module’s implementation to be hidden when verifying generalisation-based techniques that can be used clients. Third, explicit stabilisation brings a more nu- to improve the quality of the code generated by the anced understanding of the important issue of stability supercompiler. Firstly, we show how let-speculation in concurrent and sequential verification; such an un- can be used to ameliorate the effects of the work- derstanding grows ever more important as verification duplication checks that are inherent to call-by-need techniques grow ever more complex. supercompilation. Secondly, we demonstrate how the The second contribution is a new method of pre- standard idea of ‘rollback’ in supercompilation can be senting program proofs conducted in separation logic. adapted to our presentation of the supercompilation Building on work by Jules Bean, the ribbon proof is algorithm. a diagrammatic alternative to the standard ‘proof out- We have implemented our supercompiler as an op- line’. By emphasising the structure of a proof, ribbon timisation pass in the Glasgow Haskell Compiler. We proofs are intelligible and hence pedagogically useful. perform a comprehensive evaluation of our implemen- Because they contain less redundancy than proof out- tation on a suite of standard call-by-need benchmarks. lines, and allow each proof step to be checked locally, We improve the runtime of the benchmarks in our suite they are highly scalable; this we illustrate with a rib- by a geometric mean of 42%, and reduce the amount of bon proof of the Version 7 Unix memory manager. memory which the benchmarks allocate by a geometric Where proof outlines are cumbersome to modify, rib- mean of 34%. bon proofs can be visually manoeuvred to yield proofs

232 UCAM-CL-TR-836 UCAM-CL-TR-838

Janina Voigt, Alan Mycroft: Silvia Breu: Aliasing contracts: a dynamic Mining and tracking in evolving approach to alias protection software June 2013, 27 pages, PDF June 2013, 104 pages, PDF PhD thesis (Newnham College, April 2011)

Abstract: Object-oriented programming languages al- Abstract: Every large program contains a small frac- low multiple variables to refer to the same object, a sit- tion of functionality that resists clean encapsulation. uation known as aliasing. Aliasing is a powerful tool For example, code for debugging or locking is hard to which enables sharing of objects across a system. How- keep hidden using object-oriented mechanisms alone. ever, it can cause serious encapsulation breaches if not This problem gave rise to aspect-oriented program- controlled properly; through aliasing, internal parts of ming: such cross-cutting functionality is factored out aggregate objects can be exposed and potentially mod- into so-called aspects and these are woven back into ified by any part of the system. mainline code during compilation. However, for exist- A number of schemes for controlling aliasing have ing software systems to benefit from AOP, the cross- been proposed, including Clarke et al.’s ownership cutting concerns must be identified first (aspect mining) types and Boyland et al.’s capabilities. However, many before the system can be re-factored into an aspect- existing systems lack flexibility and expressiveness, oriented design. making it difficult in practice to program common id- This thesis on mining and tracking cross-cutting ioms or patterns which rely on sharing, such as itera- concerns makes three contributions: firstly, it presents tors. aspect mining as both a theoretical idea and a prac- We introduce aliasing contracts, a dynamic alias tical and scalable application. By analysing where de- protection scheme which is highly flexible and expres- velopers add code to a program, our history-based as- sive. Aliasing contracts allow developers to express as- pect mining (HAM) identifies and ranks cross-cutting sumptions about which parts of a system can access concerns. Its effectiveness and high precision was eval- particular objects. Aliasing contracts attempt to be a uated using industrial-sized open-source projects such universal approach to alias protection; they can be used as ECLIPSE. to encode various existing schemes. Secondly, the thesis takes the work on software evolution one step further. Knowledge about a con- UCAM-CL-TR-837 cern’s implementation can become invalid as the system evolves. We address this problem by defining structural Hamed Haddadi, Richard Mortier, and textual patterns among the elements identified as Derek McAuley, Jon Crowcroft: relevant to a concern’s implementation. The inferred patterns are documented as rules that describe a con- Human-data interaction cern in a formal (intensional) rather than a merely tex- tual (extensional) manner. These rules can then be used June 2013, 9 pages, PDF to track an evolving concern’s implementation in con- junction with the development history. Abstract: The time has come to recognise the emerging Finally, we implemented this technique for Java in topic of Human-Data Interaction (HDI). It arises from an Eclipse plug-in called ISIS4J and evaluated it using a the need, both ethical and practical, to engage users number of concerns. For that we again used the devel- to a much greater degree with the collection, analysis, opment history of an open-source project. The evalua- and trade of their personal data, in addition to provid- tion shows not only the effectiveness of our approach, ing them with an intuitive feedback mechanism. HDI but also to what extent our approach supports the is inherently inter-disciplinary, encapsulating elements tracking of a concern’s implementation despite, for ex- not only of traditional computer science ranging across ample, program code extensions or refactorings. data processing, systems design, visualisation and inter- action design, but also of law, psychology, behavioural UCAM-CL-TR-839 economics, and sociology. In this short paper we elabo- rate the motivation for studying the nature and dynam- Colin Kelly: ics of HDI, and we give some thought to challenges and opportunities in developing approaches to this novel Automatic extraction of property discipline. norm-like data from large text corpora September 2013, 154 pages, PDF PhD thesis (Trinity Hall, September 2012)

233 Abstract: Traditional methods for deriving property- natural language processing based representations of concepts from text have fo- cused on extracting unspecified relationships (e.g., “car September 2013, 169 pages, PDF — petrol”) or only a sub-set of possible relation types, PhD thesis (Churchill College, December 2012) such as hyponymy/hypernymy (e.g., “car is-a vehicle”) or meronymy/metonymy (e.g., “car has wheels”). Abstract: This work investigates minimally-supervised We propose a number of varied approaches towards methods for solving NLP tasks, without requiring ex- the extremely challenging task of automatic, large- plicit annotation or training data. Our motivation is to scale acquisition of unconstrained, human-like prop- create systems that require substantially reduced effort erty norms (in the form “concept relation feature”, e.g., from domain and/or NLP experts, compared to anno- “elephant has trunk”, “scissors used for cutting”, “ba- tating a corresponding dataset, and also offer easier do- nana is yellow”) from large text corpora. We present main adaptation and better generalisation properties. four distinct extraction systems for our task. In our We apply these principles to four separate language first two experiments we manually develop syntactic processing tasks and analyse their performance com- and lexical rules designed to extract property norm-like pared to supervised alternatives. First, we investigate information from corpus text. We explore the impact the task of detecting the scope of speculative language, of corpus choice, investigate the efficacy of reweighting and develop a system that applies manually-defined our output through WordNet-derived semantic clus- rules over dependency graphs. Next, we experiment ters, introduce a novel entropy calculation specific to with distributional similarity measures for detecting our task, and test the usefulness of other classical word- and generating hyponyms, and describe a new measure association metrics. that achieves the highest performance on hyponym gen- In our third experiment we employ semi-supervised eration. We also extend the distributional hypothesis learning to generalise from our findings thus far, view- to larger structures and propose the task of detecting ing our task as one of relation classification in which entailment relations between dependency graph frag- we train a support vector machine on a known set of ments of various types and sizes. Our system achieves property norms. Our feature extraction performance relatively high accuracy by combining distributional is encouraging; however the generated relations are and lexical similarity scores. Finally, we describe a self- restricted to those found in our training set. There- learning framework for improving the accuracy of an fore in our fourth and final experiment we use an im- unlexicalised parser, by calculating relation probabili- proved version of our semi-supervised system to ini- ties using its own dependency output. The method re- tially extract only features for concepts. We then use the quires only a large in-domain text corpus and can there- concepts and extracted features to anchor an uncon- fore be easily applied to different domains and genres. strained relation extraction stage, introducing a novel While fully supervised approaches generally achieve backing-off technique which assigns relations to con- the highest results, our experiments found minimally cept/feature pairs using probabilistic information. supervised methods to be remarkably competitive. By We also develop and implement an array of evalu- moving away from explicit supervision, we aim to bet- ations for our task. In addition to the previously em- ter understand the underlying patterns in the data, and ployed ESSLLI gold standard, we offer five new evalua- to create systems that are not tied to any specific do- tion techniques: fMRI activation prediction, EEG acti- mains, tasks or resources. vation prediction, a conceptual structure statistics eval- uation, a human-generated semantic similarity evalu- UCAM-CL-TR-841 ation and a WordNet semantic similarity comparison. We also comprehensively evaluate our three best sys- Arjuna Sathiaseelan, Dirk Trossen, tems using human annotators. Ioannis Komnios, Joerg Ott, Jon Crowcroft: Throughout our experiments, our various systems’ output is promising but our final system is by far the Information centric delay tolerant best-performing. When evaluated against the ESSLLI gold standard it achieves a precision of 44.1%, com- networking: an internet architecture pared to the 23.9% precision of the current state of for the challenged the art. Furthermore, our final system’s Pearson corre- lation with human- generated semantic similarity mea- September 2013, 11 pages, PDF surements is strong at 0.742, and human judges marked 71.4% of its output as correct/plausible. Abstract: Enabling universal Internet access is one of the key issues that is currently being addressed glob- UCAM-CL-TR-840 ally. However the existing Internet architecture is se- riously challenged to ensure universal service provi- sioning. This technical report puts forth our vision to Marek Rei: make the Internet more accessible by architecting a uni- Minimally supervised versal communication architectural framework com- bining two emerging architecture and connectivity ap- dependency-based methods for proaches: Information Centric Networking (ICN) and

234 Delay/Disruption Tolerant Networking (DTN). Such UCAM-CL-TR-843 an unified architecture will aggressively seek to widen the connectivity options and provide flexible service Robin Message: models beyond what is currently pursued in the field of universal service provisioning. Programming for humans: a new paradigm for domain-specific UCAM-CL-TR-842 languages Helen Yannakoudakis: November 2013, 140 pages, PDF Automated assessment of PhD thesis (Robinson College, March 2013) English-learner writing Abstract: Programming is a difficult, specialist skill. De- spite much research in software engineering, program- October 2013, 151 pages, PDF mers still work like craftsmen or artists, not engineers. PhD thesis (Wolfson College, December 2012) As a result, programs cannot easily be modified, joined together or customised. However, unlike a craft prod- Abstract: In this thesis, we investigate automated as- uct, once a programmer has created their program, it sessment (AA) systems of free text that automatically can replicated infinitely and perfectly. This means that analyse and score the quality of writing of learners programs are often not a good fit for their end-users of English as a second (or other) language. Previ- because this infinite duplication gives their creators an ous research has employed techniques that measure, incentive to create very general programs. in addition to writing competence, the semantic rele- My thesis is that we can create better paradigms, vance of a text written in response to a given prompt. languages and data structuring techniques to enable We argue that an approach which does not rely on end-users to create their own programs. task-dependent components or data, and directly as- The first contribution is a new paradigm for pro- sesses learner English, can produce results as good as gramming languages which explicitly separates control prompt-specific models. Furthermore, it has the advan- and data flow. For example, in a web application, the tage that it may not require re-training or tuning for control level would handle user clicks and database new prompts or assessment tasks. We evaluate the per- writes, while the data level would handle form inputs formance of our models against human scores, man- and database reads. The language is strongly typed, ually annotated in the Cambridge Learner Corpus, a with type reconstruction. We believe this paradigm is subset of which we have released in the public domain particularly suited to end-user programming of interac- to facilitate further research on the task. tive applications. We address AA as a supervised discriminative ma- The second contribution is an implementation of chine learning problem, investigate methods for assess- this paradigm in a specialised visual programming lan- ing different aspects of writing prose, examine their guage for novice programmers to develop web appli- generalisation to different corpora, and present state- cations. We describe our programming environment, of-the-art models. We focus on scoring general lin- which has a novel layout algorithm that maps control guistic competence and discourse coherence and cohe- and data flow onto separate dimensions. We show that sion, and report experiments on detailed analysis of experienced programmers are more productive in this appropriate techniques and feature types derived auto- system than the alternatives. matically from generic text processing tools, on their The third contribution is a novel data structuring relative importance and contribution to performance, technique which infers fuzzy types from example data. and on comparison with different discriminative mod- This inference is theoretically founded on Bayesian els, whilst also experimentally motivating novel fea- statistics. Our inference aids programmers in moving ture types for the task. Using outlier texts, we examine from semi-structured data to typed programs. We dis- and address validity issues of AA systems and, more cuss how this data structuring technique could be vi- specifically, their robustness to subversion by writers sualised and integrated with our visual programming who understand something of their workings. Finally, environment. we present a user interface that visualises and uncovers the ‘marking criteria’ represented in AA models, that UCAM-CL-TR-844 is, textual features identified as highly predictive of a learner’s level of attainment. We demonstrate how the tool can support their linguistic interpretation and en- Wei Ming Khoo: hance hypothesis formation about learner grammars, in addition to informing the development of AA systems Decompilation as search and further improving their performance. November 2013, 119 pages, PDF PhD thesis (Hughes Hall, August 2013)

235 Abstract: Decompilation is the process of converting Abstract: Software is expensive to develop. Much of programs in a low-level representation, such as ma- that expense can be blamed on difficulties in combin- chine code, into high-level programs that are human ing, integrating or re-using separate pieces of software, readable, compilable and semantically equivalent. The and in maintaining such compositions. Conventional current de facto approach to decompilation is largely development tools approach composition in an inher- modelled on compiler theory and only focusses on one ently narrow way. Specifically, they insist on modules or two of these desirable goals at a time. that are plug-compatible, meaning that they must fit This thesis makes the case that decompilation is together down to a very fine level of detail, and that more effectively accomplished through search. It is ob- are homogeneous, meaning that they must be writ- served that software development is seldom a clean ten according to the same conventions and (usually) slate process and much software is available in public in the same programming language. In summary, mod- repositories. To back this claim, evidence is presented ules must have matched interfaces to compose. These from three categories of software development: corpo- inflexibilities, in turn, motivate more software creation rate software development, open source projects and and concomitant expense: they make programming ap- malware creation. Evidence strongly suggests that code proaches based on integration and re-use unduly expen- reuse is prevalent in all categories. sive. This means that reimplementation from scratch is Two approaches to search-based decompilation are often chosen in preference to adaptation of existing im- proposed. The first approach borrow inspiration from plementations. information retrieval, and constitutes the first contri- This dissertation presents several contributions to- bution of this thesis. It uses instruction mnemonics, wards lessening this problem. It centres on the de- control-flow sub-graphs and data constants, which can sign of a new special-purpose programming language, be quickly extracted from a disassembly, and relies on called Cake. This language is specialised to the task of the popular text search engine CLucene. The time taken describing how components having mismatched inter- to analyse a function is small enough to be practical and faces (i.e., not plug-compatible, and perhaps not ho- the technique achieves an F2 measure of above 83.0% mogeneous) may be adapted so that they compose as for two benchmarks. required. It is a language significantly more effective at The second approach and contribution of this thesis capturing relationships between mismatched interfaces is perturbation analysis, which is able to differentiate than general-purpose programming languages. Firstly, between algorithms implementing the same functional- we outline the language’s design, which centres on rec- ity, e.g. bubblesort versus quicksort, and between differ- onciling interface differences in the form high-level cor- ent implementations of the same algorithm, e.g. quick- respondence rules which relate different interfaces. Sec- sort from Wikipedia versus quicksort from Rosetta ondly, since Cake is designed to be a practical tool code. Test-based indexing (TBI) uses random testing which can be a convenient and easily-integrated tool to characterise the input-output behaviour of a func- under existing development practices, we describe an tion; perturbation-based indexing (PBI) is TBI with ad- implementation of Cake in detail and explain how it ditional input-output behaviour obtained through per- achieves this integration. Thirdly, we evaluate Cake on turbation analysis. TBI/PBI achieves an F2 measure of real tasks: by applying it to integration tasks which 88.4% on five benchmarks involving different compil- have already been performed under conventional ap- ers and compiler options. proaches, we draw meaningful comparisons demon- To perform perturbation analysis, function proto- strating a smaller (quantitative) size of required code typing is needed, the standard way comprising live- and lesser (qualitative) complexity of the code that is ness and reaching-definitions analysis. However, it is required. Finally, Cake applies to a wide range of input observed that in practice actual prototypes fall into one components; we sketch extensions to Cake which ren- of a few possible categories, enabling the type system to der it capable of composing components that are het- be simplified considerably. The third and final contribu- erogeneous with respect to a carefully identified set of tion is an approach to prototype recovery that follows stylistic concerns which we describe in detail. the principle of conformant execution, in the form of inlined data source tracking, to infer arrays, pointer-to- UCAM-CL-TR-846 pointers and recursive data structures. Daniel Bates: UCAM-CL-TR-845 Exploiting tightly-coupled cores Stephen Kell: January 2014, 162 pages, PDF PhD thesis (Robinson College, July 2013) Black-box composition of Abstract: As we move steadily through the multicore mismatched software components era, and the number of processing cores on each chip continues to rise, parallel computation becomes in- December 2013, 251 pages, PDF creasingly important. However, parallelising an appli- PhD thesis (Christ’s College, December 2010) cation is often difficult because of dependencies be- tween different regions of code which require cores

236 to communicate. Communication is usually slow com- logic, by authorised third-parties. This paves the way pared to computation, and so restricts the opportunities for policy-driven systems, where policy can operate for profitable parallelisation. In this work, I explore the across infrastructure and applications to realise both opportunities provided when communication between traditional and new functionality. cores has a very low latency and low energy cost. I This report details the SBUS middleware and the observe that there are many different ways in which role of policy enforcement in enabling pervasive, dis- multiple cores can be used to execute a program, al- tributed systems. lowing more parallelism to be exploited in more situa- tions, and also providing energy savings in some cases. UCAM-CL-TR-848 Individual cores can be made very simple and efficient because they do not need to exploit parallelism inter- James G. Jardine: nally. The communication patterns between cores can be updated frequently to reflect the parallelism avail- Automatically generating reading lists able at the time, allowing better utilisation than spe- cialised hardware which is used infrequently. February 2014, 164 pages, PDF In this dissertation I introduce Loki: a homoge- PhD thesis (Robinson College, August 2013) neous, tiled architecture made up of many simple, tightly-coupled cores. I demonstrate the benefits in both Abstract: This thesis addresses the task of automatically performance and energy consumption which can be generating reading lists for novices in a scientific field. achieved with this arrangement and observe that it is Reading lists help novices to get up to speed in a new also likely to have lower design and validation costs field by providing an expert-directed list of papers to and be easier to optimise. I then determine exactly read. Without reading lists, novices must resort to ad- where the performance bottlenecks of the design are, hoc exploratory scientific search, which is an inefficient and where the energy is consumed, and look into some use of time and poses a danger that they might use bi- more-advanced optimisations which can make paral- ased or incorrect material as the foundation for their lelism even more profitable. early learning. The contributions of this thesis are fourfold. The UCAM-CL-TR-847 first contribution is the ThemedPageRank (TPR) algo- rithm for automatically generating reading lists. It com- Jatinder Singh, Jean Bacon: bines Latent Topic Models with Personalised PageRank and Age Adjustment in a novel way to generate read- SBUS: a generic policy-enforcing ing lists that are of better quality than those generated by state-of-the-art search engines. TPR is also used in middleware for open pervasive this thesis to reconstruct the bibliography for scientific systems papers. Although not designed specifically for this task, TPR significantly outperforms a state-of-the-art system February 2014, 20 pages, PDF purpose-built for the task. The second contribution is a gold-standard collection of reading lists against which Abstract: Currently, application components tend to be TPR is evaluated, and against which future algorithms bespoke and closed, running in vertical silos (single ap- can be evaluated. The eight reading lists in the gold- plications/systems). To realise the potential of pervasive standard were produced by experts recruited from two systems, and emerging distributed systems more gen- universities in the United Kingdom. The third contribu- erally, it must be possible to use components system- tion is the Citation Substitution Coefficient (CSC), an wide, perhaps in ways and for purposes not envisaged evaluation metric for evaluating the quality of reading by their designers. It follows that while the infrastruc- lists. CSC is better suited to this task than standard IR ture and resources underlying applications still require metrics such as precision, recall, F-score and mean av- management, so too do the applications themselves, in erage precision because it gives partial credit to recom- terms of how and when they (inter)operate. To achieve mended papers that are close to gold-standard papers such context-dependent, personalised operation we be- in the citation graph. This partial credit results in scores lieve that the application logic embodied in components that have more granularity than those of the standard should be separated from the policy that coordinates IR metrics, allowing the subtle differences in the perfor- them, specifying where and how they should be used. mance of recommendation algorithms to be detected. SBUS is an open, decentralised, application- The final contribution is a light-weight algorithm for independent policy-enforcing middleware, developed Automatic Term Recognition (ATR). As will be seen, towards this aim. To enable the flexible and complex technical terms play an important role in the TPR al- interactions required by pervasive systems, it supports gorithm. This light-weight algorithm extracts technical a wide range of interaction patterns, including event terms from the titles of documents without the need driven operation, request-response, and data (message) for the complex apparatus required by most state-of- streaming, and features a flexible security model. Cru- the-art ATR algorithms. It is also capable of extracting cially, SBUS is dynamically reconfigurable, allowing very long technical terms, unlike many other ATR algo- components to be managed from outside application rithms.

237 Four experiments are presented in this thesis. The 70% of the time for our research and development cy- first experiment evaluates TPR against state-of-the-art cle. search engines in the task of automatically generating CHERI is a hybrid capability-system architecture reading lists that are comparable to expert-generated that combines new processor primitives with the com- gold-standards. The second experiment compares the modity 64-bit RISC ISA enabling software to ef- performance of TPR against a purpose-built state-of- ficiently implement fine-grained memory protection the-art system in the task of automatically reconstruct- and a hardware-software object-capability security ing the reference lists of scientific papers. The third ex- model. These extensions support incrementally adopt- periment involves a user study to explore the ability able, high-performance, formally based, programmer- of novices to build their own reading lists using two friendly underpinnings for fine-grained software de- fundamental components of TPR: automatic technical composition and compartmentalization, motivated by term recognition and topic modelling. A system expos- and capable of enforcing the principle of least privilege. ing only these components is compared against a state- The CHERI system architecture purposefully addresses of-the-art scientific search engine. The final experiment known performance and robustness gaps in commodity is a user study that evaluates the technical terms discov- ISAs that hinder the adoption of more secure program- ered by the ATR algorithm and the latent topics gener- ming models centered around the principle of least priv- ated by TPR. The study enlists thousands of users of ilege. To this end, CHERI blends traditional paged vir- Qiqqa, research management software independently tual memory with a per-address-space capability model written by the author of this thesis. that includes capability registers, capability instruc- tions, and tagged memory that have been added to the UCAM-CL-TR-849 64-bit MIPS ISA via a new capability . CHERI’s hybrid approach, inspired by the Cap- Marcelo Bagnulo Braun, Jon Crowcroft: sicum security model, allows incremental adoption of capability-oriented software design: software imple- SNA: Sourceless Network mentations that are more robust and resilient can be deployed where they are most needed, while leaving Architecture less critical software largely unmodified, but neverthe- March 2014, 12 pages, PDF less suitably constrained to be incapable of having ad- verse effects. For example, we are focusing conver- sion efforts on low-level TCB components of the sys- Abstract: Why are there source addresses in datagrams? tem: separation kernels, hypervisors, operating system What alternative architecture can one conceive to pro- kernels, language runtimes, and userspace TCBs such vide all of the current, and some new functionality, cur- as web browsers. Likewise, we see early-use scenar- rently dependant on a conflicting set of uses for this ios (such as data compression, image processing, and field. We illustrate how this can be achieved by re- video processing) that relate to particularly high-risk interpreting the 32-bit field in IPv4 headers to help the software libraries, which are concentrations of both Internet solve a range of current and future problems. complex and historically vulnerability-prone code com- bined with untrustworthy data sources, while leaving UCAM-CL-TR-850 containing applications unchanged. This report describes the CHERI architecture and Robert N.M. Watson, Peter G. Neumann, design, and provides reference documentation for the Jonathan Woodruff, Jonathan Anderson, CHERI instruction-set architecture (ISA) and potential David Chisnall, Brooks Davis, Ben Laurie, memory models, along with their requirements. It also documents our current thinking on integration of pro- Simon W. Moore, Steven J. Murdoch, gramming languages and operating systems. Our ongo- Michael Roe: ing research includes two prototype processors employ- ing the CHERI ISA, each implemented as an FPGA soft Capability Hardware core specified in the Bluespec hardware description lan- Enhanced RISC Instructions: guage (HDL), for which we have integrated the appli- cation of formal methods to the Bluespec specifications CHERI Instruction-set architecture and the hardware-software implementation. April 2014, 131 pages, PDF UCAM-CL-TR-851 Abstract: This document describes the rapidly maturing design for the Capability Hardware Enhanced RISC In- Robert N.M. Watson, David Chisnall, structions (CHERI) Instruction-Set Architecture (ISA), Brooks Davis, Wojciech Koszek, which is being developed by SRI International and the Simon W. Moore, Steven J. Murdoch, University of Cambridge. The document is intended to capture our evolving architecture, as it is being refined, Peter G. Neumann, Jonathan Woodruff: tested, and formally analyzed. We have now reached

238 Capability Hardware Bluespec Extensible RISC Enhanced RISC Instructions: Implementation: BERI Software CHERI User’s guide reference April 2014, 26 pages, PDF April 2014, 34 pages, PDF

Abstract: The CHERI User’s Guide documents the soft- Abstract: The BERI Software Reference documents ware environment for the Capability Hardware En- how to build and use FreeBSD on the Bluespec Extensi- hanced RISC Instructions (CHERI) prototype devel- ble RISC Implementation (BERI) developed by SRI In- oped by SRI International and the University of Cam- ternational and the University of Cambridge. The refer- bridge. The User’s Guide is targeted at hardware and ence is targeted at hardware and software programmers software developers working with capability-enhanced who will work with BERI or BERI-derived systems. software. It describes the CheriBSD operating system, a version of the FreeBSD operating system that has UCAM-CL-TR-854 been adapted to support userspace capability systems via the CHERI ISA, and the CHERI Clang/LLVM com- Dominic Orchard: piler suite. It also describes the earlier Deimos demon- stration microkernel. Programming contextual

UCAM-CL-TR-852 computations May 2014, 223 pages, PDF Robert N.M. Watson, Jonathan Woodruff, PhD thesis (Jesus College, January 2013) David Chisnall, Brooks Davis, Wojciech Koszek, A. Theodore Markettos, Abstract: Modern computer programs are executed in a variety of different contexts: on servers, handheld de- Simon W. Moore, Steven J. Murdoch, vices, graphics cards, and across distributed environ- Peter G. Neumann, Robert Norton, ments, to name a few. Understanding a program’s con- Michael Roe: textual requirements is therefore vital for its correct ex- ecution. This dissertation studies contextual computa- Bluespec Extensible RISC tions, ranging from application-level notions of context Implementation: BERI Hardware to lower-level notions of context prevalent in common programming tasks. It makes contributions in three ar- reference eas: mathematically structuring contextual computa- April 2014, 76 pages, PDF tions, analysing contextual program properties, and de- signing languages to facilitate contextual programming. Firstly, existing work which mathematically struc- Abstract: The BERI Hardware Reference documents tures contextual computations using comonads (in pro- the Bluespec Extensible RISC Implementation (BERI) gramming and semantics) is analysed and extended. developed by SRI International and the University Comonads are shown to exhibit a shape preservation of Cambridge. The reference is targeted at hardware property which restricts their applicability to a sub- and software developers working with the BERI1 and set of contextual computations. Subsequently, novel BERI2 processor prototypes in simulation and synthe- generalisations of comonads are developed, including sized to FPGA targets. We describe how to use the the notion of an indexed comonad, relaxing shape- BERI1 and BERI2 processors in simulation, the BERI1 preservation restrictions. debug unit, the BERI unit-test suite, how to use BERI Secondly, a general class of static analyses called co- with Altera FPGAs and Terasic DE4 boards, the 64- effect systems is introduced to describe the propagation bit MIPS and CHERI ISAs implemented by the pro- of contextual requirements throughout a program. In- totypes, the BERI1 and BERI2 processor implementa- dexed comonads, with some additional structure, are tions themselves, and the BERI Programmable Inter- shown to provide a semantics for languages whose con- rupt Controller (PIC). textual properties are captured by a coeffect analysis. Finally, language constructs are presented to ease UCAM-CL-TR-853 the programming of contextual computations. The ben- efits of these language features, the mathematical struc- Robert N.M. Watson, David Chisnall, turing, and coeffect systems are demonstrated by a lan- Brooks Davis, Wojciech Koszek, guage for container programming which guarantees op- Simon W. Moore, Steven J. Murdoch, timisations and safety invariants. Peter G. Neumann, Jonathan Woodruff:

239 UCAM-CL-TR-855 This dissertation focuses on the detection of senti- ment towards the citations in a scientific article. The Patrick K.A. Wollner, Isak Herman, detection is performed using the textual information Haikal Pribadi, Leonardo Impett, from the article. I address three sub-tasks and present new large corpora for each of the tasks. Alan F. Blackwell: Firstly, I explore different feature sets for detection Mephistophone of sentiment in explicit citations. For this task, I present a new annotated corpus of more than 8,700 citation June 2014, 8 pages, PDF sentences which have been labelled as positive, nega- tive or objective towards the cited paper. Experiment- Abstract: The scope of this project is the creation of ing with different feature sets, I show the best result of a controller for composition, performance and interac- micro-F score 0.760 is obtained using n-grams of length tion with sound. Interactions can be classified to one and dependency relations. of three types: (i) end-user triggering, controlling, edit- Secondly, I show that the assumption that senti- ing, and manipulation of sounds with varying tempo- ment is limited only to the explicit citation is incor- ral dimensions; (ii) inclusion of multi-sensor feedback rect. I present a citation context corpus where more mechanisms including end-user biological monitoring; than 200,000 sentences from 1,034 paper—reference and (iii) integration of sensed, semi-random, environ- pairs have been annotated for sentiment. These sen- mental factors as control parameters to the output of tences contain 1,741 citations towards 20 cited papers. the system. I show that including the citation context in the analy- The development of the device has been completed sis increases the subjective sentiment by almost 185%. in two stages: (i) conceptual scoping has defined the in- I propose new features which help in extracting the ci- teraction space for the development of this machine; tation context and examine their effect on sentiment (ii) prototype development has resulted in the creation analysis. of a functioning prototype and culminated in a series of Thirdly, I tackle the task of identifying significant live performances. The final stage presupposes a custom citations. I propose features which help discriminate interaction design for each artistic partner, reinforcing these from citations in passing, and show that they pro- the conceptual role of the device as a novel mechanism vide statistically significant improvements over a rule- for personalized, visualizable, tangible interaction with based baseline. sound. UCAM-CL-TR-857 UCAM-CL-TR-856 Heidi Howard: Awais Athar: ARC: Analysis of Raft Consensus Sentiment analysis of scientific July 2014, 69 pages, PDF citations BA dissertation (Pembroke College, May 2014)

June 2014, 114 pages, PDF Abstract: The Paxos algorithm, despite being synony- PhD thesis (Girton College, April 2014) mous with distributed consensus for a decade, is fa- mously difficult to reason about and implement due Abstract: While there has been growing interest in the to its non-intuitive approach and underspecification. field of sentiment analysis for different text genres in In response, this project implemented and evaluated a the past few years, relatively less emphasis has been framework for constructing fault-tolerant applications, placed on extraction of opinions from scientific litera- utilising the recently proposed Raft algorithm for dis- ture, more specifically, citations. Citation sentiment de- tributed consensus. Constructing a simulation frame- tection is an attractive task as it can help researchers in work for our implementation enabled us to evaluate the identifying shortcomings and detecting problems in a protocol on everything from understandability and ef- particular approach, determining the quality of a paper ficiency to correctness and performance in diverse net- for ranking in citation indexes by including negative ci- work environments. We propose a range of optimisa- tations in the weighting scheme, and recognising issues tions to the protocol and released to the community that have not been addressed as well as possible gaps in a testbed for developing further optimisations and in- current research approaches. vestigating optimal protocol parameters for real-world Current approaches assume that the sentiment deployments. present in the citation sentence represents the true sen- timent of the author towards the cited paper and do not take further informal mentions of the citations else- where in the article into account. There have also been no attempts to evaluate citation sentiment on a large corpus.

240 UCAM-CL-TR-858 Abstract: Increasing server utilization in modern data- centers also increases the likelihood of contention on Jonathan D. Woodruff: physical resources and unexpected behavior due to side-effects from interfering applications. Existing re- CHERI: A RISC capability machine source accounting mechanisms are too coarse-grained for allowing services to track the causes of such varia- for practical memory safety tions in their execution. We make the case for measur- July 2014, 112 pages, PDF ing resource consumption at system-call level and out- PhD thesis (Clare Hall, March 2014) line the design of Resourceful, a system that offers ap- plications the ability of querying this data at runtime Abstract: This work presents CHERI, a practical ex- with low overhead, accounting for costs incurred both tension of the 64-bit MIPS instruction set to support synchronously and asynchronously after a given call. capabilities for fine-grained memory protection. Traditional paged memory protection has proved in- UCAM-CL-TR-860 adequate in the face of escalating security threats and proposed solutions include fine-grained protection ta- Steffen Loesch: bles (Mondrian Memory Protection) and hardware fat- pointer protection (Hardbound). These have empha- Program equivalence in functional sised transparent protection for C executables but have metaprogramming via nominal Scott lacked flexibility and practicality. Intel’s recent memory protection extensions (iMPX) attempt to adopt some domains of these ideas and are flexible and optional but lack the strict correctness of these proposals. October 2014, 164 pages, PDF Capability addressing has been the classical solu- PhD thesis (Trinity College, May 2014) tion to efficient and strong memory protection but it has been thought to be incompatible with common in- Abstract: A prominent feature of metaprogramming is struction sets and also with modern program structure to write algorithms in one programming language (the which uses a flat memory space with global pointers. meta-language) over structures that represent the pro- CHERI is a fusion of capabilities with a paged flat grams of another programming language (the object- memory producing a program-managed fat pointer ca- language). Whenever the object-language has binding pability model. This protection mechanism scales from constructs (and most programming languages do), we application sandboxing to efficient byte-level memory run into tedious issues concerning the semantically cor- safety with per-pointer permissions. I present an exten- rect manipulation of binders. sion to the 64-bit MIPS architecture on FPGA that runs In this thesis we study a semantic framework in standard FreeBSD and supports self-segmenting appli- which these issues can be dealt with automatically cations in user space. by the meta-language. Our framework takes the user- Unlike other recent proposals, the CHERI imple- friendly ‘nominal’ approach to metaprogramming in mentation is open-source and of sufficient quality to which bound objects are named. support software development as well as community Specifically, we develop mathematical tools for giv- extension of this work. I compare with published mem- ing logical proofs that two metaprograms (of our ory safety mechanisms and demonstrate competitive framework) are equivalent. We consider two programs performance while providing assurance and greater to be equivalent if they always give the same observable flexibility with simpler hardware requirements. results when they are run as part of any larger codebase. This notion of program equivalence, called contextual equivalence, is examined for an extension of Plotkin’s UCAM-CL-TR-859 archetypal functional programming language PCF with nominal constructs for metaprogramming, called PNA. Lucian Carata, Oliver Chick, James Snee, Historically, PCF and its denotational semantics based Ripduman Sohan, Andrew Rice, on Scott domains were hugely influential in the study Andy Hopper: of contextual equivalence. We mirror Plotkin’s classical results with PNA and a denotational semantics based Resourceful: fine-grained resource on a variant of Scott domains that is modelled within accounting for explaining service the logic of nominal sets. In particular, we prove the following full abstraction result: two PNA programs variability are contextually equivalent if and only if they denote equal elements of the nominal Scott domain model. September 2014, 12 pages, PDF This is the first full abstraction result we know of for languages combining higher-order functions with some form of locally scoped names, which uses a domain theory based on ordinary extensional functions, rather

241 than using the more intensional approach of game se- UCAM-CL-TR-862 mantics. To obtain full abstraction, we need to add two new Henrik Lieng: programming language constructs to PNA, one for ex- istential quantification over names and one for ‘definite Surface modelling for 2D imagery description’ over names. Adding only one of them is in- October 2014, 177 pages, PDF sufficient, as we give proofs that full abstraction fails if PhD thesis (Fitzwilliam College, June 2014) either is left out. Abstract: Vector graphics provides powerful tools for UCAM-CL-TR-861 drawing scalable 2D imagery. With the rise of mobile computers, of different types of displays and image Tadas Baltrusaitis: resolutions, vector graphics is receiving an increasing amount of attention. However, vector graphics is not Automatic facial expression analysis the leading framework for creating and manipulating 2D imagery. The reason for this reluctance of employ- October 2014, 218 pages, PDF ing vector graphical frameworks is that it is difficult to PhD thesis (Fitzwilliam College, March 2014) handle complex behaviour of colour across the 2D do- main. Abstract: Humans spend a large amount of their time A challenging problem within vector graphics is interacting with computers of one type or another. to define smooth colour functions across the image. However, computers are emotionally blind and indif- In previous work, two approaches exist. The first ap- ferent to the affective states of their users. Human- proach, known as diffusion curves, diffuses colours computer interaction which does not consider emo- from a set of input curves and points. The second tions, ignores a whole channel of available information. approach, known as gradient meshes, defines smooth Faces contain a large portion of our emotionally ex- colour functions from control meshes. These two ap- pressive behaviour. We use facial expressions to display proaches are incompatible: diffusion curves do not sup- our emotional states and to manage our interactions. port the local behaviour provided by gradient meshes Furthermore, we express and read emotions in faces ef- and gradient meshes do not support freeform curves as fortlessly. However, automatic understanding of facial input. My research aims to narrow the gap between dif- expressions is a very difficult task computationally, es- fusion curves and gradient meshes. pecially in the presence of highly variable pose, expres- With this aim in mind, I propose solutions to cre- sion and illumination. My work furthers the field of ate control meshes from freeform curves. I demonstrate automatic facial expression tracking by tackling these that these control meshes can be used to render a vector issues, bringing emotionally aware computing closer to primitive similar to diffusion curves using subdivision reality. surfaces. With the use of subdivision surfaces, instead Firstly, I present an in-depth analysis of the Con- of a diffusion process, colour gradients can be locally strained Local Model (CLM) for facial expression and controlled using colour gradient curves associated with head pose tracking. I propose a number of extensions the input curves. that make location of facial features more accurate. The advantage of local control is further explored Secondly, I introduce a 3D Constrained Local in the setting of vector-centric image processing. I Model (CLM-Z) which takes full advantage of depth demonstrate that a certain contrast enhancement pro- information available from various range scanners. file, known as the Cornsweet profile, can be modelled CLM-Z is robust to changes in illumination and shows via surfaces in images. This approach does not pro- better facial tracking performance. duce saturation artefacts related with previous filter- Thirdly, I present the Constrained Local Neural based methods. Additionally, I demonstrate various ap- Field (CLNF), a novel instance of CLM that deals proaches to artistic filtering, where the artist locally with the issues of facial tracking in complex scenes. It models given artistic effects. achieves this through the use of a novel landmark de- Gradient meshes are restricted to rectangular topol- tector and a novel CLM fitting algorithm. CLNF out- ogy of the control meshes. I argue that this restriction performs state-of-the-art models for facial tracking in hinders the applicability of the approach and its po- presence of difficult illumination and varying pose. tential to be used with control meshes extracted from Lastly, I demonstrate how tracked facial expressions freeform curves. To this end, I propose a mesh-based can be used for emotion inference from videos. I also vector primitive that supports arbitrary manifold topol- show how the tools developed for facial tracking can ogy of the control mesh. be applied to emotion inference in music. UCAM-CL-TR-863

Jatinder Singh, Jean Bacon, Jon Crowcroft, Anil Madhavapeddy, Thomas Pasquier, W. Kuan Hon, Christopher Millard:

242 Regional clouds: technical The CHERI system architecture purposefully ad- considerations dresses known performance and robustness gaps in commodity ISAs that hinder the adoption of more se- November 2014, 18 pages, PDF cure programming models centered around the prin- ciple of least privilege. To this end, CHERI blends Abstract: The emergence and rapid uptake of cloud traditional paged virtual memory with a per-address- computing services raise a number of legal challenges. space capability model that includes capability regis- Recently, there have been calls for regional clouds; ters, capability instructions, and tagged memory that where policy makers from various states have proposed have been added to the 64-bit MIPS ISA via a new cloud computing services that are restricted to serving capability coprocessor. CHERI also learns from the C- (only) their particular geographic region. At a technical language fat-pointer literature: CHERI capabilities can level, such rhetoric is rooted in the means for control. describe not only regions of memory, but can also cap- This paper explores the technical considerations un- ture C pointer semantics allowing capabilities to be derpinning a regional cloud, including the current state substituted for pointers in generated code. of cloud provisioning, what can be achieved using exist- CHERI’s hybrid system approach, inspired by the ing technologies, and the potential of ongoing research. Capsicum security model, allows incremental adoption Our discussion covers technology at various system lev- of capability-oriented software design: software imple- els, including network-centric controls, cloud platform mentations that are more robust and resilient can be de- management, and governance mechanisms (including ployed where they are most needed, while leaving less encryption and information flow control) for cloud critical software largely unmodified, but nevertheless providers, applications, tenants, and end-users. suitably constrained to be incapable of having adverse effects. For example, we are focusing conversion ef- UCAM-CL-TR-864 forts on low-level TCB components of the system: sep- aration kernels, hypervisors, operating system kernels, Robert N. M. Watson, Peter G. Neumann, language runtimes, and userspace TCBs such as web Jonathan Woodruff, Jonathan Anderson, browsers. Likewise, we see early-use scenarios (such David Chisnall, Brooks Davis, Ben Laurie, as data compression, protocol parsing, image process- ing, and video processing) that relate to particularly Simon W. Moore, Steven J. Murdoch, high-risk software libraries, which are concentrations Michael Roe: of both complex and historically vulnerability-prone code combined with untrustworthy data sources, while Capability Hardware leaving containing applications unchanged. Enhanced RISC Instructions: This report describes the CHERI Instruction-Set Ar- chitecture (ISA) and design, and provides reference doc- CHERI Instruction-set architecture umentation and potential memory models, along with December 2014, 142 pages, PDF their requirements. It also briefly addresses the CHERI system hardware-software architecture, documenting Abstract: This technical report describes CHERI ISAv3, our current thinking on integrating programming lan- the third version of the Capability Hardware Enhanced guages and operating systems with the CHERI hard- RISC Instructions (CHERI) Instruction-Set Architec- ware. ture (ISA). CHERI is being developed by SRI Inter- national and the University of Cambridge. This de- UCAM-CL-TR-865 sign captures four years of research, development, re- finement, formal analysis, and testing, and is a sub- stantial enhancement to the ISA version described in Christopher S.F. Smowton: UCAM-CL-TR-850. Key improvements lie in tighter I/O Optimisation and elimination via C-language integration, and more mature support for software object-capability models; these changes result partial evaluation from experience gained in adapting substantial soft- December 2014, 129 pages, PDF ware stacks to run on prototype hardware. PhD thesis (Churchill College, November 2014) The CHERI instruction set is based on a hybrid capability-system architecture that adds new capability- system primitives to a commodity 64-bit RISC ISA en- Abstract: Computer programs commonly repeat work. abling software to efficiently implement fine-grained Short programs go through the same initialisation se- memory protection and a hardware-software object- quence each time they are run, and long-running servers capability security model. These extensions support may be given a sequence of similar or identical requests. incrementally adoptable, high-performance, formally In both cases, there is an opportunity to save time by re- based, programmer-friendly underpinnings for fine- using previously computed results; however, program- grained software decomposition and compartmental- mers often do not exploit that opportunity because to ization, motivated by and capable of enforcing the prin- do so would cost development time and increase code ciple of least privilege. complexity.

243 Partial evaluation is a semi-automatic technique for and PATRIC by 2 times to 4 times. Our approach high- specialising programs or parts thereof to perform bet- lights the importance of I/O considerations in a dis- ter in particular circumstances, and can reduce repeated tributed environment, which has received less attention work by generating a program variant that is spe- in the graph processing literature. cialised for use in frequently-occurring circumstances. However, existing partial evaluators are limited in both UCAM-CL-TR-867 their depth of analysis and their support for real-world programs, making them ineffective at specialising prac- Nikolai Sultana: tical software. In this dissertation, I present a new, more accurate Higher-order proof translation partial evaluation system that can specialise programs, written in low-level languages including C and C++, April 2015, 158 pages, PDF that interact with the operating system to read exter- PhD thesis (Trinity College, April 2014) nal data. It is capable of specialising programs that are challenging to analyse, including those which use arbi- Abstract: The case for interfacing logic tools together trarily deep pointer indirection, unsafe type casts, and has been made countless times in the literature, but it multi-threading. I use this partial evaluator to specialise is still an important research question. There are vari- programs with respect to files that they read from disk, ous logics and respective tools for carrying out formal or data they consume from the network, producing spe- developments, but practitioners still lament the diffi- cialised variants that perform better when that external culty of reliably exchanging mathematical data between data is as expected, but which continue to function like tools. the original program when it is not. To demonstrate the Writing proof-translation tools is hard. The prob- system’s practical utility, I evaluate the system special- lem has both a theoretical side (to ensure that the trans- ising real-world software, and show that it can achieve lation is adequate) and a practical side (to ensure that significant runtime improvements with little manual as- the translation is feasible and usable). Moreover, the sistance. source and target proof formats might be less docu- mented than desired (or even necessary), and this adds a UCAM-CL-TR-866 dash of reverse-engineering to what should be a system integration task. Ilias Giechaskiel, George Panagopoulos, This dissertation studies proof translation for higher-order logic. We will look at the qualitative bene- Eiko Yoneki: fits of locating the translation close to the source (where PDTL: Parallel and distributed the proof is generated), the target (where the proof is consumed), and in between (as an independent tool triangle listing for massive graphs from the proof producer and consumer). Two ideas are proposed to alleviate the difficulty April 2015, 14 pages, PDF of building proof translation tools. The first is a proof translation framework that is structured as a compiler. Abstract: This paper presents the first distributed tri- Its target is specified as an abstract machine, which cap- angle listing algorithm with provable CPU, I/O, Mem- tures the essential features of its implementations. This ory, and Network bounds. Finding all triangles (3- framework is designed to be performant and extensible. cliques) in a graph has numerous applications for den- Second, we study proof transformations that convert sity and connectivity metrics. The majority of existing refutation proofs from a broad class of consistency- algorithms for massive graphs are sequential processing preserving calculi (such as those used by many proof- and distributed versions of algorithms do not guaran- finding tools) into proofs in validity-preserving calculi tee their CPU, I/O, Memory or Network requirements. (the kind used by many proof-checking tools). The ba- Our Parallel and Distributed Triangle Listing (PDTL) sic method is very simple, and involves applying a single framework focuses on efficient external-memory access transformation uniformly to all of the source calculi’s in distributed environments instead of fitting subgraphs inferences, rather than applying ad hoc (rule specific) into memory. It works by performing efficient orienta- inference interpretations. tion and load-balancing steps, and replicating graphs across machines by using an extended version of Hu UCAM-CL-TR-868 et al.’s Massive Graph Triangulation algorithm. As a result, PDTL suits a variety of computational environ- ments, from single-core machines to high-end clusters. Robert N. M. Watson, Jonathan Woodruff, PDTL computes the exact triangle count on graphs David Chisnall, Brooks Davis, of over 6 billion edges and 1 billion vertices (e.g. Ya- Wojciech Koszek, A. Theodore Markettos, hoo graphs), outperforming and using fewer resources Simon W. Moore, Steven J. Murdoch, than the state-of-the-art systems PowerGraph, OPT, Peter G. Neumann, Robert Norton, Michael Roe:

244 Bluespec Extensible RISC they exhibit poor performance when implementing se- Implementation: BERI Hardware quential, control-flow intensive code. This thesis studies the problem of improving sequential code performance reference in spatial hardware without sacrificing its inherent effi- ciency advantage. April 2015, 82 pages, PDF I propose (a) switching from a statically scheduled to a dynamically scheduled, dataflow execution model, Abstract: The BERI Hardware Reference describes the and (b) utilizing a newly developed compiler intermedi- Bluespec Extensible RISC Implementation (BERI) pro- ate representation (IR) designed to expose ILP in spa- toype developed by SRI International and the Univer- tial hardware, even in the presence of complex con- sity of Cambridge. The reference is targeted at hard- trol flow. I describe this new IR – the Value State ware and software developers working with the BERI1 Flow Graph (VSFG) – and how it statically exposes ILP and BERI2 processor prototypes in simulation and syn- from control-flow intensive code by enabling control- thesized to FPGA targets. We describe how to use the dependence analysis, execution along multiple flows of BERI1 and BERI2 processors in simulation, the BERI1 control, as well as aggressive control-flow speculation. debug unit, the BERI unit-test suite; how to use BERI I also present a High-Level Synthesis (HLS) toolchain, with Altera FPGAs and Terasic DE4 boards, the 64- that compiles unmodified high-level language code to bit MIPS and CHERI ISAs implemented by the pro- dataflow custom hardware, via the LLVM compiler in- totypes, the BERI1 and BERI2 processor implementa- frastructure. tions themselves, and the BERI Programmable Inter- I show that for control-flow intensive code, VSFG- rupt Controller (PIC). based custom hardware performance approaches, or even exceeds the performance of a complex superscalar UCAM-CL-TR-869 processor, while consuming only 1/4x the energy of an efficient in-order processor, and 1/8x that of a com- Robert N. M. Watson, David Chisnall, plex out-of-order processor. I also present a discussion Brooks Davis, Wojciech Koszek, of compile-time optimizations that may be attempted to further improve both efficiency and performance for Simon W. Moore, Steven J. Murdoch, VSFG-based hardware, including using alias analysis to Peter G. Neumann, Jonathan Woodruff: statically partition and parallelize memory operations. This work demonstrates that it is possible to use Bluespec Extensible RISC custom and/or reconfigurable hardware in heteroge- Implementation: BERI Software neous systems to improve the efficiency of frequently executed sequential code, without compromising per- reference formance relative to an energy inefficient out-of-order April 2015, 27 pages, PDF .

Abstract: The BERI Software Reference documents UCAM-CL-TR-871 how to build and use the FreeBSD operating system on the Bluespec Extensible RISC Implementation (BERI) Peter R. Calvert: developed by SRI International and the University of Cambridge. The reference is targeted at hardware and Architecture-neutral parallelism via software programmers who will work with BERI or the Join Calculus BERI-derived systems. July 2015, 150 pages, PDF UCAM-CL-TR-870 PhD thesis (Trinity College, September 2014)

Ali Mustafa Zaidi: Abstract: Ever since the UNCOL efforts in the 1960s, compilers have sought to use both source-language- Accelerating control-flow intensive neutral and architecture-neutral intermediate represen- tations. The advent of web applets led to the JVM code in spatial hardware where such a representation was also used for distri- May 2015, 170 pages, PDF bution. This trend has continued and now many main- PhD thesis (St. Edmund’s College, February 2014) stream applications are distributed using the JVM or .NET formats. These languages can be efficiently run Abstract: Designers are increasingly utilizing spatial on a target architecture (e.g. using JIT techniques). (e.g. custom and reconfigurable) architectures to im- However, such intermediate languages have been pre- prove both efficiency and performance in increasingly dominantly sequential, supporting only rudimentary heterogeneous systems-on-chip. Unfortunately, while concurrency primitives such as threads. This thesis pro- such architectures can provide orders of magnitude bet- poses a parallel intermediate representation with anal- ter efficiency and performance on numeric applications, ogous goals. The specific contributions made in this

245 work are based around a join calculus abstract machine by reducing the user interaction required during inter- (JCAM). These can be broadly categorised into three active proofs: many goals will be proved by automatic sections. provers. The first contribution is the definition of the abstract For such an integration to be effective, we must machine itself. The standard join calculus is modified to bridge the many differences between a typical interac- prevent implicit sharing of data as this is undesirable in tive theorem prover and a resolution theorem prover. non-shared memory architectures. It is then condensed Examples of the differences are higher order versus first into three primitive operations that can be targeted by order; typed versus untyped. optimisations and analyses. I claim that these three sim- Through experiments, we have designed and im- ple operations capture all the common styles of con- plemented a practical method to convert Isabelle’s for- currency and parallelism used in current programming malisms (ZF and HOL) into untyped first-order clauses. languages. Isabelle/ZF’s formulae that are not first-order need to be The work goes on to show how the JCAM inter- reformulated to first-order formulae before clause nor- mediate representation can be implemented on shared- mal form transformation. For Isabelle/HOL, a sound memory multi-core machines with acceptable over- modelling of its type system is designed first before heads. This process illustrates some key program prop- translating its formulae into first-order clauses with its erties that can be exploited to give significant benefits type information encoded. This method of formaliza- in certain scenarios. tion makes it possible to have Isabelle integrated with Finally, conventional control-flow analyses are resolutions. adapted to the join calculus to allow the properties A large set of axioms is usually required to support required for optimising compilation to be inferred. interactive proofs but can easily overwhelm an auto- Along with the prototype compiler, this illustrates the matic prover. We have experimented with various meth- JCAM’s capabilities as a universal representation for ods to solve this problem, including using different set- parallelism. tings of an automatic prover and automatically elimi- nating irrelevant axioms. UCAM-CL-TR-872 The invocation of background automatic provers should be invisible to users, hence we have also de- Jia Meng: signed and implemented an automatic calling proce- dure, which extracts all necessary information and The integration of higher order sends it to an automatic prover at an appropriate point during an Isabelle proof. interactive proof with first order Finally, the results and knowledge gained from this automatic theorem proving research are generally applicable and can be applied to future integration of any other interactive and au- July 2015, 144 pages, PDF tomatic theorem provers. PhD thesis (Churchill College, April 2005) UCAM-CL-TR-873 Abstract: Interactive and automatic theorem proving are the two most widely used computer-assisted the- Khilan Gudka, Robert N.M. Watson, orem proving methods. Interactive proof tools such as HOL, Isabelle and PVS have been highly success- Jonathan Anderson, David Chisnall, ful. They support expressive formalisms and have been Brooks Davis, Ben Laurie, Ilias Marinos, used for verifying hardware, software, protocols, and Peter G. Neumann, Alex Richardson: so forth. Unfortunately interactive proof requires much effort from a skilled user. Many other tools are com- Clean application pletely automatic, such as Vampire, SPASS and Otter. compartmentalization with SOAAP However, they cannot be used to verify large systems because their logic is inexpressive. This dissertation fo- (extended version) cuses on how to combine these two types of theorem August 2015, 35 pages, PDF proving to obtain the advantages of each of them. This research is carried out by investigating the integration of Isabelle with Vampire and SPASS. Abstract: Application compartmentalization, a vulner- Isabelle is an interactive theorem prover and it sup- ability mitigation technique employed in programs such ports a multiplicity of logics, such as ZF and HOL. as OpenSSH and the Chrome web browser, decom- Vampire and SPASS are first order untyped resolution poses software into sandboxed components to limit provers. The objective of this research is to design an privileges leaked or otherwise available to attackers. effective method to support higher order interactive However, compartmentalizing applications – and main- proof with any first order resolution prover. This inte- taining that compartmentalization – is hindered by gration can simplify the formal verification procedure ad hoc methodologies and significantly increased pro- gramming effort. In practice, programmers stumble

246 through (rather than overtly reason about) compart- higher theme relevance using the first AR system as mentalization spaces of possible decompositions, un- compared with an equivalent non-AR natural play set- knowingly trading off correctness, security, complexity, ting. Typically developing children aged 4-6, using the and performance. second AR system, demonstrated improved social sym- We present a new conceptual framework embodied bolic play in terms of comprehending emotional states in an LLVM-based tool: the Security-Oriented Analy- of pretend roles, and constructing joint pretense on sis of Application Programs (SOAAP) that allows pro- symbolic transformations using specially designed AR grammers to reason about compartmentalization us- scaffoldings. ing source-code annotations (compartmentalization hy- potheses). We demonstrate considerable benefit when UCAM-CL-TR-875 creating new compartmentalizations for complex appli- cations, and analyze existing compartmentalized appli- Theodosia Togia: cations to discover design faults and maintenance issues arising from application evolution. The language of collaborative tagging This technical report is an extended version of the similarly named conference paper presented at the 2015 September 2015, 203 pages, PDF ACM Conference on Computer and Communications PhD thesis (Trinity Hall, September 2015) Security (CCS). Abstract: Collaborative tagging is the process whereby UCAM-CL-TR-874 people attach keywords, known as tags, to digital re- sources, such as text and images, in order to render Zhen Bai: them retrievable in the future. This thesis investigates how tags submitted by users in collaborative tagging Augmented Reality interfaces for systems function as descriptors of a resource’s perceived content. Using computational and theoretical tools, I symbolic play in early childhood compare collaborative tagging with natural language September 2015, 292 pages, PDF description in order to determine whether or to what extent the former behaves as the latter. PhD thesis (Jesus College, September 2014) I start the investigation by collecting a corpus of tagged images and exploring the relationship between Abstract: Augmented Reality (AR) is an umbrella term a resource and a tag using theories from different dis- for technologies that superimpose virtual contents onto ciplines, such as Library Science, Semiotics and Infor- the physical world. There is an emerging research focus mation Retrieval. Then, I study the lexical characteris- on AR applications to improve quality of life for special tics of individual tags, suggesting that tags behave as user groups with diverse levels of age, skill, disabilities natural language words. The next step is to examine and knowledge. how tags combine when annotating a resource. It will Symbolic play is an early childhood activity that re- be shown that similar combinatory constraints hold for quires children to interpret elements of the real world in tags assigned to a resource and for words as used in a non-literal way. Much research effort has been spent coherent text. This realisation will lead to the ques- to enhance symbolic play due to its close link with crit- tion of whether the similar combinatory patterns be- ical development such as symbolic thought, creativity tween tags and words are due to implicit semantic re- and social understanding. lations between the tags. To provide an answer, I con- In this thesis, I identified an analogy between the duct an experiment asking humans to submit both tags dual representational characteristics of AR and sym- and textual descriptions for a set of images, construct- bolic play. This led me to explore to what extent AR can ing a parallel a corpus of more than one thousand tags- promote cognitive and social development in symbolic text annotations. Analysis of this parallel corpus pro- play for young children with and without autism spec- vides evidence that a large number of tag pairs are con- trum condition (ASC). To address this research goal, I nected via implicit semantic relations, whose nature is developed a progressive AR design approach that re- described. Finally, I investigate whether it is possible to quires progressive levels of mental effort to conceive automatically identify the semantically related tag pairs symbolic thought during play. I investigated the us- and make explicit their relationship, even in the absence ability of AR displays with the magic mirror metaphor of supporting image-specific text. I construct and eval- to support physical object manipulation. Based on the uate a proof-of-concept system to demonstrate that this progressive AR design approach and preparatory us- task is attainable. ability investigation, I designed an AR system to en- hance solitary symbolic play, and another AR system to enhance social symbolic play. The effectiveness of each UCAM-CL-TR-876 system was rigorously evaluated with reference to psy- chology literature. Robert N. M. Watson, Peter G. Neumann, Empirical results show that children with ASC 4-7 Jonathan Woodruff, Michael Roe, years old produced more solitary symbolic play with Jonathan Anderson, David Chisnall,

247 Brooks Davis, Alexandre Joannou, browsers. Likewise, we see early-use scenarios (such Ben Laurie, Simon W. Moore, as data compression, protocol parsing, image process- Steven J. Murdoch, Robert Norton, ing, and video processing) that relate to particularly high-risk software libraries, which are concentrations Stacey Son: of both complex and historically vulnerability-prone Capability Hardware code combined with untrustworthy data sources, while leaving containing applications unchanged. Enhanced RISC Instructions: This report describes the CHERI Instruction-Set Ar- CHERI Instruction-Set Architecture chitecture (ISA) and design, and provides reference doc- umentation and potential memory models, along with September 2015, 198 pages, PDF their requirements. It also briefly addresses the CHERI system hardware-software architecture, documenting Abstract: This technical report describes CHERI ISAv4, our current thinking on integrating programming lan- the fourth version of the Capability Hardware En- guages and operating systems with the CHERI hard- hanced RISC Instructions (CHERI) Instruction-Set Ar- ware. chitecture (ISA). CHERI is being developed by SRI In- ternational and the University of Cambridge. This de- UCAM-CL-TR-877 sign captures four years of research, development, re- finement, formal analysis, and testing, and is a sub- stantial enhancement to the ISA version described in Robert N. M. Watson, David Chisnall, UCAM-CL-TR-850. Key improvements lie in tighter Brooks Davis, Wojciech Koszek, C-language integration, and more mature support for Simon W. Moore, Steven J. Murdoch, software object-capability models; these changes result Peter G. Neumann, Jonathan Woodruff: from experience gained in adapting substantial soft- ware stacks to run on prototype hardware. Capability Hardware The CHERI instruction set is based on a hybrid Enhanced RISC Instructions: capability-system architecture that adds new capability- system primitives to a commodity 64-bit RISC ISA en- CHERI Programmer’s Guide abling software to efficiently implement fine-grained memory protection and a hardware-software object- September 2015, 58 pages, PDF capability security model. These extensions support incrementally adoptable, high-performance, formally Abstract: This work presents CHERI, a practical ex- based, programmer-friendly underpinnings for fine- tension of the 64-bit MIPS instruction set to support grained software decomposition and compartmental- capabilities for fine-grained memory protection. ization, motivated by and capable of enforcing the prin- Traditional paged memory protection has proved in- ciple of least privilege. adequate in the face of escalating security threats and The CHERI system architecture purposefully ad- proposed solutions include fine-grained protection ta- dresses known performance and robustness gaps in bles (Mondrian Memory Protection) and hardware fat- commodity ISAs that hinder the adoption of more se- pointer protection (Hardbound). These have empha- cure programming models centered around the prin- sised transparent protection for C executables but have ciple of least privilege. To this end, CHERI blends lacked flexibility and practicality. Intel’s recent memory traditional paged virtual memory with a per-address- protection extensions (iMPX) attempt to adopt some space capability model that includes capability regis- of these ideas and are flexible and optional but lack the ters, capability instructions, and tagged memory that strict correctness of these proposals. have been added to the 64-bit MIPS ISA via a new Capability addressing has been the classical solu- capability coprocessor. CHERI also learns from the C- tion to efficient and strong memory protection but it language fat-pointer literature: CHERI capabilities can has been thought to be incompatible with common in- describe not only regions of memory, but can also cap- struction sets and also with modern program structure ture C pointer semantics allowing capabilities to be which uses a flat memory space with global pointers. substituted for pointers in generated code. CHERI is a fusion of capabilities with a paged flat CHERI’s hybrid system approach, inspired by the memory producing a program-managed fat pointer ca- Capsicum security model, allows incremental adoption pability model. This protection mechanism scales from of capability-oriented software design: software imple- application sandboxing to efficient byte-level memory mentations that are more robust and resilient can be de- safety with per-pointer permissions. I present an exten- ployed where they are most needed, while leaving less sion to the 64-bit MIPS architecture on FPGA that runs critical software largely unmodified, but nevertheless standard FreeBSD and supports self-segmenting appli- suitably constrained to be incapable of having adverse cations in user space. effects. For example, we are focusing conversion ef- Unlike other recent proposals, the CHERI imple- forts on low-level TCB components of the system: sep- mentation is open-source and of sufficient quality to aration kernels, hypervisors, operating system kernels, support software development as well as community language runtimes, and userspace TCBs such as web

248 extension of this work. I compare with published mem- on template attacks. I show that, in some cases, by esti- ory safety mechanisms and demonstrate competitive mating the covariance matrix only from these main fac- performance while providing assurance and greater tors, we can improve the template attack. Furthermore, flexibility with simpler hardware requirements. I show how to use factor analysis in order to gener- ate arbitrary correlation matrices for the simulation of UCAM-CL-TR-878 leakage traces that are similar to the real leakage. Finally, I show how to implement PCA and LDA Marios O. Choudary: efficiently with the stochastic model presented by Schindler et al. in 2005, resulting in the most effective Efficient multivariate statistical kind of profiled attack. Using these implementations, I demonstrate a profiled attack on a 16-bit target. techniques for extracting secrets from electronic devices UCAM-CL-TR-879

September 2015, 164 pages, PDF Ramana Kumar: PhD thesis (Darwin College, July 2014) Self-compilation and self-verification Abstract: In 2002, Suresh Chari, Rao Josyula and Pankaj Rohatgi presented a very powerful method, February 2016, 148 pages, PDF known as the ‘Template Attack’, to infer secret values PhD thesis (Peterhouse College, May 2015) processed by a microcontroller, by analysing its power- supply current, generally known as its ‘side-channel Abstract: This dissertation presents two pieces of work, leakage’. This attack uses a profiling step to compute one building on the other, that advance the state of the parameters of a multivariate normal distribution the art of formal verification. The focus, in both cases, from the leakage of a training device, and an attack is on proving end-to-end correctness for realistic im- step in which these parameters are used to infer a se- plementations of computer software. The first piece cret value (e.g. cryptographic key) from the leakage of a is a verified compiler for a stateful higher-order func- target device. This has important implications for many tional programming language, CakeML, which is pack- industries, such as pay-TV or banking, that use a micro- aged into a verified read-eval-print loop (REPL). The controller executing a cryptographic algorithm to au- second piece is a verified theorem-prover kernel for thenticate their customers. higher-order logic (HOL), designed to run in the ver- In this thesis, I describe efficient implementations ified REPL. of this template attack, that can push its limits fur- Self-compilation is the key idea behind the verifi- ther, by using efficient multivariate statistical analysis cation of the CakeML REPL, in particular, the new techniques. Firstly, I show that, using a linear discrim- technique of proof-grounded bootstrapping of a ver- inant score, we can avoid some numerical obstacles, ified compiler. The verified compiler is bootstrapped and use a large number of leakage samples to improve within the theorem prover used for its verification, and the attack, while also drastically decreasing its compu- then packaged into a REPL. The result is an implemen- tation time. I evaluate my implementations on an 8- tation of the REPL in machine code, verified against bit microcontroller, using different compression meth- machine-code semantics. All the end-to-end correctness ods, including Principal Component Analysis (PCA) theorems linking this low-level implementation to its and Fisher’s Linear Discriminant Analysis (LDA), and desired semantics are proved within the logic of the I provide guidance for the choice of attack algorithm. theorem prover. Therefore the trusted computing base My results show that we can determine almost perfectly (TCB) of the final implementation is smaller than for an 8-bit target value, even when this value is manipu- any previously verified compiler. lated by a single LOAD instruction. Just as self-compilation is a benchmark by which Secondly, I show that variability caused by the use to judge a compiler, I propose self-verification as a of either different devices or different acquisition cam- benchmark for theorem provers, and present a method paigns can have a strong impact on the performance by which a theorem prover could verify its own im- of these attacks. Using four different Atmel XMEGA plementation. By applying proof-grounded compilation 256 A3U 8-bit devices, I explore several variants of the (i.e., proof-grounded bootstrapping applied to some- template attack to compensate for this variability, and thing other than a compiler) to an implementation of I show that, by adapting PCA and LDA to this context, a theorem prover, we obtain a theorem prover whose we can reduce the entropy of an unknown 8-bit value machine-code implementation is verified. To connect to below 1.5 bits, even when using one device for pro- this result back to the semantics of the logic of the the- filing and another one for the attack. orem prover, we need to formalise that semantics and Then, using factor analysis, I identify the main fac- prove a refinement theorem. I present some advances tors that contribute to the correlation between leakage in the techniques that can be used to formalise HOL samples, and analyse the influence of this correlation within itself, as well as demonstrating that the theo- rem prover, and its correctness proof, can be pushed through the verified compiler.

249 My thesis is that verification of a realistic implemen- Thirdly, we propose a static analysis which can ver- tation can be produced mostly automatically from a ify simple aliasing contracts at compile time, includ- verified high-level implementation, via the use of ver- ing those contracts which model ownership types. Con- ified compilation. I present a verified compiler and tracts which can be verified in this way can subse- explain how it was bootstrapped to achieve a small quently be removed from the program before it is exe- TCB, and then explain how verified compilation can cuted. We show that such a combination of static and be used on a larger application, in particular, a theorem dynamic checking significantly improves the run-time prover for higher-order logic. The application has two performance of aliasing contracts. parts, one domain-specific and the other generic. For the domain-specific part, I formalise the semantics of UCAM-CL-TR-881 higher-order logic and prove its inference system sound. For the generic part, I apply proof-grounded compila- Juan M. Tirado, Ovidiu Serban, Qiang Guo, tion to produce the verified implementation. Eiko Yoneki: UCAM-CL-TR-880 Web data knowledge extraction Janina Voigt: March 2016, 60 pages, PDF Access contracts: a dynamic Abstract: A constantly growing amount of information approach to object-oriented access is available through the web. Unfortunately, extract- ing useful content from this massive amount of data protection still remains an open issue. The lack of standard data models and structures forces developers to create ad- February 2016, 171 pages, PDF hoc solutions from scratch. The advice of an expert is PhD thesis (Trinity College, May 2014) still needed in many situations where developers do not have the correct background knowledge. This forces Abstract: In object-oriented (OO) programming, vari- developers to spend time acquiring the necessary back- ables do not contain objects directly but addresses of ground from the expert. In other directions, there are objects on the heap. Thus, several variables can point promising solutions employing machine learning tech- to the same object; we call this aliasing. niques. However, increasing accuracy requires an in- Aliasing is a central feature of OO programming crease in system complexity that cannot be endured in that enables efficient sharing of objects across a system. many projects. This is essential for the implementation of many pro- In this work, we approach the web knowledge ex- gramming idioms, such as iterators. On the other hand, traction problem using an expert centric methodology. aliasing reduces modularity and encapsulation, making This methodology defines a set of configurable, ex- programs difficult to understand, debug and maintain. tendible and independent components that permit the Much research has been done on controlling alias- reutilisation of large pieces of code among projects. ing. Alias protection schemes (such as Clarke et al.’s Our methodology differs from similar solutions in its influential ownership types) limit which references can expert-driven design. This design makes it possible for exist, thus guaranteeing the protection of encapsu- a subject specialist to drive the knowledge extraction lated objects. Unfortunately, existing schemes are sig- for a given set of documents. Additionally, we propose nificantly restrictive and consequently have not been the utilization of machine assisted solutions that guide widely adopted by software developers. the expert during this process. To demonstrate the ca- This thesis makes three contributions to the area of pabilities of our methodology, we present a real use alias protection. Firstly, it proposes aliasing contracts, a case scenario in which public procurement data is ex- novel, dynamically-checked alias protection scheme for tracted from the web-based repositories of several pub- object-oriented programming languages. Aliasing con- lic institutions across Europe. We provide insightful de- tracts are highly flexible and expressive, addressing the tails about the challenges we had to deal with in this limitations of existing work. We show that they can be case and additional discussions about how to apply our used to model many existing alias protection schemes, methodology. providing a unifying approach to alias protection. Secondly, we develop a prototype implementation UCAM-CL-TR-882 of aliasing contracts in Java and use it to quantify the run-time performance of aliasing contracts. Since aliasing contracts are checked dynamically, they incur Niall Murphy: run-time performance overheads; however, our perfor- Discovering and exploiting mance evaluation shows that using aliasing contracts for testing and debugging is nevertheless feasible. parallelism in DOACROSS loops March 2016, 129 pages, PDF PhD thesis (Darwin College, September 2015)

250 Abstract: Although multicore processors have been the truth assignment that minimises the total cost of un- norm for a decade, programmers still struggle to write satisfied soft clauses while satisfying all hard clauses. parallel general-purpose applications, resulting in un- We use fixed points of the new set of message pass- derutilised on-chip resources. Automatic parallelisation ing equations in a decimation procedure to reduce the is a promising approach to improving the performance size of WPMax-SAT problems. We evaluate this strat- of such applications without burdening the program- egy on randomly generated WPMax-SAT problems and mer. I explore various techniques for automatically ex- find that message passing frequently converges to non- tracting parallelism which span the spectrum from con- trivial fixed points, and in many cases decimation re- servative parallelisation, where transformations must sults in simplified problems for which local search be proven correct by the compiler, to optimistic paral- solvers are able to find truth assignments of comparable lelisation, where allows the com- cost faster than without decimation. piler to generate potentially unsafe code, with runtime supports to ensure correct execution. UCAM-CL-TR-884 Firstly I present a limit study of conservative par- allelisation. I use a novel runtime profiling technique Zongyan Huang: to find all data dependences which occur during execu- tion and build an oracle data dependence graph. This Machine learning and computer oracle is used as input to the HELIX compiler which algebra automatically generates parallelised code. In this way, the compiler is no longer limited by the inadequacies of April 2016, 113 pages, PDF compile-time dependence analysis and the performance PhD thesis (Lucy Cavendish College, August 2015) of the generated code represents the upper limit of what can be achieved by HELIX-style parallelisation. I show Abstract: Computer algebra is a fundamental research that, despite shortcomings in the compile-time analysis, field of computer science, and computer algebra sys- the oracle-parallelised code is no better than that ordi- tems are used in a wide range of problems, often leading narily produced by HELIX. to significant savings of both time and effort. However, Secondly I present a limit study of optimistic par- many of these systems offer different heuristics, deci- allelisation. I implement a dataflow timing model that sion procedures, and parameter settings to tackle any allows each instruction to execute as early as possible in given problem, and users need to manually select them an idealistic, zero-overhead machine, thus giving a the- in order to use the system. oretical limit to the parallelism which can be exploited. In this context, the algorithm selection problem is The study shows that considerable extra parallelism is the problem of selecting the most efficient setting of the available which, due to its dynamic nature, cannot be computer algebra system when faced with a particular exploited by HELIX, even with the oracle dependence problem. These choices can dramatically affect the effi- analysis. ciency, or even the feasibility of finding a solution. Of- Finally I demonstrate the design of a practical par- ten we have to rely on human expertise to pick a suit- allelisation system which combines the best aspects able choice as there are no fixed rules that determine of both the conservative and optimistic parallelisation the best approach, and even for experts, the relation- styles. I use runtime profiling to detect which HELIX- ship between the problem at hand and the choice of an identified dependences cause frequent conflicts and syn- algorithm is far from obvious. chronise these while allowing other code to run specu- Machine learning techniques have been widely ap- latively. This judicious speculation model achieves su- plied in fields where decisions are to be made without perior performance to HELIX and approaches the the- the presence of a human expert, such as in web search, oretical limit in many cases. text categorization, or recommender systems. My hy- pothesis is that machine learning can also be applied UCAM-CL-TR-883 to help solve the algorithm selection problem for com- puter algebra systems. In this thesis, we perform several experiments to de- Richard Russell, Sean B. Holden: termine the effectiveness of machine learning (specifi- Survey propagation applied cally using support vector machines) for the problem of algorithm selection in three instances of computer to weighted partial maximum algebra applications over real closed fields. Our three satisfiability applications are: (i) choosing decision procedures and time limits in MetiTarski; (ii) choosing a heuristic for March 2016, 15 pages, PDF CAD variable ordering; (iii) predicting the usefulness of Grobner¨ basis preconditioning. The results show that Abstract: We adapt the survey propagation method machine learning can effectively be applied to these ap- for application to weighted partial maximum satisfi- plications, with the machine learned choices being su- ability (WPMax-SAT) problems consisting of a mix- perior to both choosing a single fixed individual algo- ture of hard and soft clauses. The aim is to find the rithm, as well as to random choice.

251 UCAM-CL-TR-885 features achieves good accuracy and precision and out- performs the state-of-the-art approaches. We conclude Sean B. Holden: that the features derived from the semantic representa- tions encode important properties of the combinations HasGP: A Haskell library for that help distinguish the correct combinations from the incorrect ones. Gaussian process inference The approach presented in this work can naturally April 2016, 6 pages, PDF be extended to other types of content word combina- tions. Future research should also investigate how the Abstract: HasGP is a library providing supervised error correction component for content word combina- learning algorithms for Gaussian process (GP) regres- tions could be implemented. sion and classification. While only one of many GP li- braries available, it differs in that it represents an ongo- UCAM-CL-TR-887 ing exploration of how machine learning research and Robert M. Norton: deployment might benefit by moving away from the imperative/object-oriented style of implementation and Hardware support for instead employing the functional programming (FP) paradigm. HasGP is implemented in Haskell and is compartmentalisation available under the GPL3 open source license. May 2016, 86 pages, PDF PhD thesis (Clare Hall, September 2015) UCAM-CL-TR-886 Abstract: Compartmentalisation is a technique to re- duce the impact of security bugs by enforcing the ‘prin- Ekaterina Kochmar: ciple of least privilege’ within applications. Splitting programs into separate components that each operate Error detection in content word with minimal access to resources means that a vulnera- combinations bility in one part is prevented from affecting the whole. However, the performance costs and development ef- May 2016, 170 pages, PDF fort of doing this have so far prevented widespread de- PhD thesis (St. John’s College, December 2014) ployment of compartmentalisation, despite the increas- ingly apparent need for better computer security. A ma- Abstract: This thesis addresses the task of error jor obstacle to deployment is that existing compart- detection in the choice of content words focusing mentalisation techniques rely either on virtual mem- on adjective–noun and verb–object combinations. We ory hardware or pure software to enforce separation, show that error detection in content words is an under- both of which have severe performance implications explored area in research on learner language since and complicate the task of developing compartmen- (i) most previous approaches to error detection and talised applications. correction have focused on other error types, and (ii) CHERI (Capability Hardware Enhanced RISC In- the approaches that have previously addressed errors structions) is a research project which aims to improve in content words have not performed error detection computer security by allowing software to precisely ex- proper. We show why this task is challenging for the press its memory access requirements using hardware existing algorithms and propose a novel approach to support for bounded, unforgeable pointers known as error detection in content words. capabilities. One consequence of this approach is that We note that since content words express meaning, a single virtual address space can be divided into many an error detection algorithm should take the semantic independent compartments, with very efficient transi- properties of the words into account. We use a compo- tions and data sharing between them. sitional distributional semantic framework in which we This dissertation analyses the compartmentalisation represent content words using their distributions in na- features of the CHERI Instruction Set Architecture tive English, while the meaning of the combinations is (ISA). It includes: a summary of the CHERI ISA, par- represented using models of compositional semantics. ticularly its compartmentalisation features; a descrip- We present a number of measures that describe differ- tion of a multithreaded CHERI CPU which runs the ent properties of the modelled representations and can FreeBSD Operating System; the results of benchmarks reliably distinguish between the representations of the that compare the characteristics of hardware supported correct and incorrect content word combinations. Fi- compartmentalisation with traditional techniques; and nally, we cast the task of error detection as a binary an evaluation of proposed optimisations to the CHERI classification problem and implement a machine learn- ISA to further improve domain crossing efficiency. ing classifier that uses the output of the semantic mea- I find that the CHERI ISA provides extremely effi- sures as features. cient, practical support for compartmentalisation and The results of our experiments confirm that an error that there are opportunities for further optimisation if detection algorithm that uses semantically motivated even lower overhead is required in the future.

252 UCAM-CL-TR-888 architecture incorporating the energy consumption of machines in the datacentre and the network. We fur- Sherif Akoush, Ripduman Sohan, ther correlate this energy consumption with renewable Andy Hopper: energy available at different locations around the globe. Given this model we present two simulation-driven case Recomputation-based data reliability studies based on data from Google and Facebook pro- duction clusters. for MapReduce using lineage Generally we provide insights on the trade-offs asso- May 2016, 19 pages, PDF ciated with this off-grid architecture. For example, we show that an optimised configuration consisting of ten distributed datacentres results in a 2% increase in job Abstract: Ensuring block-level reliability of MapRe- completion time at the cost of a 50% increase in the duce datasets is expensive due to the spatial overheads number of machines required. of replicating or erasure coding data. As the amount of data processed with MapReduce continues to increase, this cost will increase proportionally. In this paper we UCAM-CL-TR-890 introduce Recomputation-Based Reliability in MapRe- duce (RMR), a system for mitigating the cost of main- Alistair G. Stead: taining reliable MapReduce datasets. RMR leverages record-level lineage of the relationships between input Using multiple representations and output records in the job for the purposes of sup- to develop notational expertise in porting block-level recovery. We show that collecting this lineage imposes low temporal overhead. We fur- programming ther show that the collected lineage is a fraction of the June 2016, 301 pages, PDF size of the output dataset for many MapReduce jobs. PhD thesis (Girton College, May 2015) Finally, we show that lineage can be used to determin- istically reproduce any block in the output. We quanti- Abstract: The development of expertise with notations tatively demonstrate that, by ensuring the reliability of is an important skill for both creators and users of the lineage rather than the output, we can achieve data new technology in the future. In particular, the develop- reliability guarantees with a small storage requirement. ment of Notational Expertise (NE) is becoming valued in schools, where changes in curricula recommend that UCAM-CL-TR-889 students of all ages use a range of programming rep- resentations to develop competency that can be used to Sherif Akoush, Ripduman Sohan, ultimately create and manipulate abstract text notation. Andrew Rice, Andy Hopper: Educational programming environments making use of multiple external representations (MERs) that replicate Evaluating the viability of remote the transitions occurring in schools within a single sys- tem present a promising area of research. They can renewable energy in datacentre provide support for scaffolding knowledge using low- computing abstraction representations, knowledge transfer, and addressing barriers faced during representation transi- May 2016, 26 pages, PDF tion. This thesis identifies analogies between the use of Abstract: We investigate the feasibility of loosely- notation in mathematics education and programming coupled distributed datacentre architectures colocated to construct the Modes of Representational Abstrac- with and powered by renewable energy sources and tion (MoRA) framework, which supports the identi- interconnected using high-bandwidth low-latency data fication of representation transition strategies. These links. The design of these architectures advocates (i) strategies were used to develop an educational pro- variable machine availability: the number of machines gramming environment, DrawBridge. Studies of the us- accessible at a particular site at any given time is pro- age of DrawBridge highlighted the need for assessment portional to the amount of renewable energy available mechanisms to measure NE. Empirical evaluation in and (ii) workload deferment and migration: if there is a range of classrooms found that the MoRA frame- insufficient site capacity, workloads are either halted or work provided useful insights and that low-abstraction shifted to transient energy-rich locations. representations provided a great source of motivation. While these architectures are attractive from an en- Comparisons of assessments found that a novel assess- vironmental perspective, their feasibility depends on (i) ment type, Adapted Parsons Problems, produced high the requirement for additional hardware, (ii) the associ- student participation while still correlating with code- ated service interruptions, and (iii) the data and energy writing scores. Results strongly suggest that game-like overhead of workload migration. features can encourage the use of abstract notation and In this work we attempt to broadly quantify these increase students’ acquisition of NE. Finally, findings overheads. We define a model of the basic design of the show that students in higher year groups benefitted

253 more from using DrawBridge than students in lower from the C-language fat-pointer literature: its capabili- year groups. ties describe fine-grained regions of memory and can be substituted for data or code pointers in generated code, UCAM-CL-TR-891 protecting data and also providing Control-Flow In- tegrity (CFI). Strong monotonicity properties allow the Robert N. M. Watson, Peter G. Neumann, CHERI capability model to express a variety of protec- tion properties, from valid C-language pointer prove- Jonathan Woodruff, Michael Roe, nance and C-language bounds checking to implement- Jonathan Anderson, David Chisnall, ing the isolation and controlled communication struc- Brooks Davis, Alexandre Joannou, tures required for compartmentalization. Ben Laurie, Simon W. Moore, CHERI’s hybrid system approach, inspired by the Steven J. Murdoch, Robert Norton, Capsicum security model, allows incremental adoption of capability-oriented software design: software imple- Stacey Son, Hongyan Xia: mentations that are more robust and resilient can be de- Capability Hardware ployed where they are most needed, while leaving less critical software largely unmodified, but nevertheless Enhanced RISC Instructions: suitably constrained to be incapable of having adverse CHERI Instruction-Set Architecture effects. For example, we are focusing conversion ef- forts on low-level TCB components of the system: sep- (Version 5) aration kernels, hypervisors, operating-system kernels, language runtimes, and userspace TCBs such as web June 2016, 242 pages, PDF browsers. Likewise, we see early-use scenarios (such as data compression, protocol parsing, image process- Abstract: This technical report describes CHERI ISAv5, ing, and video processing) that relate to particularly the fifth version of the Capability Hardware Enhanced high-risk software libraries, which are concentrations RISC Instructions (CHERI) Instruction-Set Architec- of both complex and historically vulnerability-prone ture (ISA) being developed by SRI International and the code combined with untrustworthy data sources, while University of Cambridge. This design captures six years leaving containing applications unchanged. of research, development, refinement, formal analysis, and testing, and is a substantial enhancement to the UCAM-CL-TR-892 ISA versions described in earlier technical reports. This version introduces the CHERI-128 “compressed” ca- pability format, adds further capability instructions to A. Daniel Hall: improve code generation, and rationalizes a number Pipelined image processing for of ISA design choices (such as system permissions) as we have come to better understand mappings from pattern recognition C programming-language and MMU-based operating- system models into CHERI. It also contains improve- July 2016, 121 pages, PDF ments to descriptions, explanations, and rationale. PhD thesis (Queen’s College, October 1991) The CHERI instruction set is based on a hybrid capability-system architecture that adds new capability- Abstract: Image processing for pattern recognition system primitives to a commodity 64-bit RISC ISA en- is both computationally intensive and algorithmically abling software to efficiently implement fine-grained complex. The objective of the research presented here memory protection and a hardware-software object- was to produce a fast inexpensive for capability security model. These extensions support pattern recognition. This objective has been achieved incrementally adoptable, high-performance, formally by separating the computationally intensive pixel pro- based, programmer-friendly underpinnings for fine- cessing tasks from the algorithmically complex feature grained software decomposition and compartmental- processing tasks. ization, motivated by and capable of enforcing the prin- The context for this work is explored in terms of ciple of least privilege. Fine-grained memory protec- image processor architecture, intermediate-level image tion also provides direct mitigation of many widely de- processing tasks and pattern recognition. ployed exploit techniques. A new language to describe pipelined neighbour- The CHERI system architecture purposefully ad- hood operations on binary images (‘PiNOLa’: Pipelined dresses known performance and robustness gaps in Neighbourhood Operator Language) is presented. commodity ISAs that hinder the adoption of more se- PiNOLa was implemented in Modula-2 to provide cure programming models centered around the prin- an interactive simulation system (‘PiNOSim’: Pipelined ciple of least privilege. To this end, CHERI blends Neighbourhood Operator Simulator). Experiments us- traditional paged virtual memory with a per-address- ing PiNOSim were conducted and a design for a topo- space capability model that includes capability regis- logical feature extractor was produced. ters, capability instructions, and tagged memory that A novel algorithm for connected component la- have been added to the 64-bit MIPS ISA. CHERI learns belling in hardware is presented. This algorithm was

254 included in the PiNOSim program to enable the compo- UCAM-CL-TR-894 nent labelling of features extracted using the language. The component labelling algorithm can be used with Christopher Bryant, Mariano Felice: the topological feature extractor mentioned above. The result is a method of converting a binary raster scan Issues in preprocessing current into a stream of topological features grouped by con- nected object. datasets for grammatical error To test the potential performance of a system based correction on these ideas, some hardware (‘GRIPPR’: Generic Real-time Image Processor for Pattern Recognition) September 2016, 15 pages, PDF was designed. This machine was implemented using standard components linked to a PC based trans- Abstract: In this report, we describe some of the is- puter board. To demonstrate an application of GRIPPR sues encountered when preprocessing two of the largest an Optical Character Recognition (OCR) system is datasets for Grammatical Error Correction (GEC); presented. Finally, results demonstrating a continuous namely the public FCE corpus and NUCLE (along with throughput of 1500 characters/second are given. associated CoNLL test sets). In particular, we show that it is not straightforward to convert character level UCAM-CL-TR-893 annotations to token level annotations and that sen- tence segmentation is more complex when annotations change sentence boundaries. These become even more Thomas F. J.-M. Pasquier: complicated when multiple annotators are involved. Towards practical information flow We subsequently describe how we handle such cases and consider the pros and cons of different methods. control and audit July 2016, 153 pages, PDF UCAM-CL-TR-895 PhD thesis (Jesus College, January 2016) Mariano Felice: Abstract: In recent years, pressure from the general public and from policy makers has been for more and Artificial error generation for better control over personal data in cloud computing translation-based grammatical error environments. Regulations put responsibilities on cloud tenants to ensure that proper measures are effected by correction their cloud provider. But there is currently no satisfac- October 2016, 155 pages, PDF tory mechanism to achieve this, leaving tenants open to PhD thesis (Hughes Hall, October 2016) potentially costly lawsuits. Decentralised Information Flow Control (IFC) at Abstract: Automated grammatical error correction for system level is a data-centric Mandatory Access Con- language learners has attracted a lot of attention in re- trol scheme that guarantees non-interference across se- cent years, especially after a number of shared tasks curity contexts, based on lattices defined by secrecy and that have encouraged research in the area. Treating integrity properties. Every data flow is continuously the problem as a translation task from ‘incorrect’ into monitored to guarantee the enforcement of decentrally ‘correct’ English using statistical machine translation specified policies. Applications running above IFC en- has emerged as a state-of-the-art approach but it re- forcement need not be trusted and can interact. IFC quires vast amounts of corrected parallel data to pro- constraints can be used to ensure that proper work- duce useful results. Because manual annotation of in- flows are followed, as defined by regulations or con- correct text is laborious and expensive, we can gen- tracts. For example, to ensure that end users’ personal erate artificial error-annotated data by injecting errors data are anonymised before being disclosed to third deliberately into correct text and thus produce larger parties. amounts of parallel data with much less effort. Information captured during IFC enforcement al- In this work, we review previous work on artificial lows a directed graph representing whole-system data error generation and investigate new approaches using exchange to be generated. The coupling of policy random and probabilistic methods for constrained and enforcement and audit data capture allows system general error correction. Our methods use error statis- “noise” to be removed from audit data, and only infor- tics from a reference corpus of learner writing to gener- mation relevant to the policies in place to be recorded. ate errors in native text that look realistic and plausible It is possible to query these graphs to demonstrate that in context. We investigate a number of aspects that can the system behaved according to regulation. For exam- play a part in the error generation process, such as the ple, to demonstrate from run-time data that there is no origin of the native texts, the amount of context used path without anonymisation between an end-user and to find suitable insertion points, the type of information a third party. encoded by the error patterns and the output error dis- tribution. In addition, we explore the use of linguistic

255 information for characterising errors and train systems of structural information leakage vs. utility preserva- using different combinations of real and artificial data. tion. We study the trade-off of anonymity vs. utility Results of our experiments show that the use of ar- for six popular anonymization schemes including those tificial errors can improve system performance when promising k-anonymity. Our analysis shows that none they are used in combination with real learner errors, of the schemes are fit for the purpose. in line with previous research. These improvements are Finally, we present an end-to-end social graph de- observed for both constrained and general correction, anonymization attack which uses the proposed ma- for which probabilistic methods produce the best re- chine learning techniques to recover node mappings sults. We also demonstrate that systems trained on a across intersecting graphs. Our attack enhances the combination of real and artificial errors can beat other state of art in graph de-anonymization by demonstrat- highly-engineered systems and be more robust, show- ing better performance than all the other attacks in- ing that performance can be improved by focusing on cluding those that use seed knowledge. The attack is the data rather than tuning system parameters. seedless and heuristic free, which demonstrates the su- Part of our work is also devoted to the proposal of periority of machine learning techniques as compared the I-measure, a new evaluation scheme that scores cor- to hand-selected parametric attacks. rections in terms of improvement on the original text and solves known issues with existing evaluation mea- UCAM-CL-TR-897 sures. Sheharbano Khattak: UCAM-CL-TR-896 Characterization of Internet Kumar Sharad: censorship from multiple perspectives Learning to de-anonymize social January 2017, 170 pages, PDF networks PhD thesis (Robinson College, January 2017) Abstract: Internet censorship is rampant, both under December 2016, 158 pages, PDF the support of nation states and private actors, with PhD thesis (Churchill College, November 2016) important socio-economic and policy implications. Yet many issues around Internet censorship remain poorly Abstract: Releasing anonymized social network data understood because of the lack of adequate approaches for analysis has been a popular idea among data to measure the phenomenon at scale. This thesis aims providers. Despite evidence to the contrary the be- to help fill this gap by developing three methodologies lief that anonymization will solve the privacy prob- to derive censorship ground truths, that are then ap- lem in practice refuses to die. This dissertation con- plied to real-world datasets to study the effects of In- tributes to the field of social graph de-anonymization ternet censorship. These measurements are given foun- by demonstrating that even automated models can dation in a comprehensive taxonomy that captures the be quite successful in breaching the privacy of such mechanics, scope, and dynamics of Internet censorship, datasets. We propose novel machine-learning based complemented by a framework that is employed to sys- techniques to learn the identities of nodes in social tematize over 70 censorship resistance systems. graphs, thereby automating manual, heuristic-based at- The first part of this dissertation analyzes “user-side tacks. Our work extends the vast literature of social censorship”, where a device near the user, such as the graph de-anonymization attacks by systematizing them. local ISP or the national backbone, blocks the user’s We present a random-forests based classifier which online communication. This study provides quanti- uses structural node features based on neighborhood fied insights into how censorship affects users, content degree distribution to predict their similarity. Using providers, and Internet Service Providers (ISPs); as seen these simple and efficient features we design versatile through the lens of traffic datasets captured at an ISP and expressive learning models which can learn the in Pakistan over a period of three years, beginning in de-anonymization task just from a few examples. Our 2011. evaluation establishes their efficacy in transforming de- The second part of this dissertation moves to anonymization to a learning problem. The learning is “publisher-side censorship”. This is a new kind of transferable in that the model can be trained to attack blocking where the user’s request arrives at the Web one graph when trained on another. publisher, but the publisher (or something working on Moving on, we demonstrate the versatility and its behalf) refuses to respond based on some property greater applicability of the proposed model by using of the user. Publisher-side censorship is explored in two it to solve the long-standing problem of benchmark- contexts. The first is in the context of an anonymity ing social graph anonymization schemes. Our frame- network, Tor, involving a systematic enumeration and work bridges a fundamental research gap by making characterization of websites that treat Tor users differ- cheap, quick and automated analysis of anonymiza- ently from other users. tion schemes possible, without even requiring their full Continuing on the topic of publisher-side blocking, description. The benchmark is based on comparison the second case study examines the Web’s differential

256 treatment of users of adblocking software. The rising Adding attribute-based access control makes the system popularity of adblockers in recent years poses a seri- much less fragile while it still retains the essential flexi- ous threat to the online advertising industry, prompting bility provided by SDN. Lastly, I propose a hierarchical publishers to actively detect users of adblockers and architecture which, with SDN, can isolate security com- subsequently block them or otherwise coerce them to promises even when some devices are physically com- disable the adblocker. This study presents a first charac- promised. This is achieved by using access control to terization of such practices across the Alexa Top 5,000 both enable network access and deny unexpected con- websites. nections. This dissertation demonstrates how the censor’s blocking choices can leave behind a detectable pattern UCAM-CL-TR-899 in network communications, that can be leveraged to establish exact mechanisms of censorship. This knowl- Douwe Kiela: edge facilitates the characterization of censorship from different perspectives; uncovering entities involved in Deep embodiment: grounding censorship, its targets, and the effects of such prac- tices on stakeholders. More broadly, this study comple- semantics in perceptual modalities ments efforts to illuminate the nature, scale, and effects February 2017, 128 pages, PDF of opaque filtering practices; equipping policy-makers PhD thesis (Darwin College, July 2016) with the knowledge necessary to systematically and ef- fectively respond to Internet censorship. Abstract: Multi-modal distributional semantic models address the fact that text-based semantic models, which UCAM-CL-TR-898 represent word meanings as a distribution over other words, suffer from the grounding problem. This thesis Dongting Yu: advances the field of multi-modal semantics in two di- rections. First, it shows that transferred convolutional Access control for network neural network representations outperform the tradi- management tional bag of visual words method for obtaining vi- sual features. It is then shown that these representations January 2017, 108 pages, PDF may be applied successfully to various natural language PhD thesis (Robinson College, May 2016) processing tasks. Second, it performs the first ever ex- periments with grounding in the non-visual modalities Abstract: Network management inherently involves hu- of auditory and olfactory perception using raw data. man input. From expressing business logic and network Deep learning, a natural fit for deriving grounded rep- policy to the low level commands to networking de- resentations, is used to obtain the highest-quality rep- vices, at least some tasks are done manually by oper- resentations compared to more traditional approaches. ators. These tasks are a source of error whose conse- Multi-modal representation learning leads to improve- quences can be severe, since operators have high levels ments over language-only models in a variety of tasks. of access, and can bring down a whole network if they If we want to move towards human-level artificial intel- configure it improperly. ligence, we will need to build multi-modal models that Software-Defined Networking (SDN) is a new net- represent the full complexity of human meaning, in- work technology that brings even more flexibility (and cluding its grounding in our various perceptual modal- risk) to network operations. Operators can now easily ities. get third-party apps to run in their networks, or even host tenants and give them some control over their por- UCAM-CL-TR-900 tion of the network. However security has not caught up, and it is easy for these third parties to access net- work resources without permission. Valentin Dalibard: Access control is a mature concept; it has been stud- A framework to build bespoke ied for decades. In this dissertation I examine how ac- cess control can be used to solve the above network auto-tuners with structured Bayesian management problems. I look at the Border Gateway optimisation Protocol (BGP) from an operations perspective and propose a mandatory access control model using role- February 2017, 182 pages, PDF based policies to separate long-term invariants from PhD thesis (St. John’s College, January 2017) day-to-day configurations. As a result the former would not be accidentally violated when configuring the latter, Abstract: Due to their complexity, modern computer as this is a significant source of BGP misconfigurations systems expose many configuration parameters which today. Then, for SDN, I propose to add access control users must manually tune to maximise the performance to controllers so that virtual controllers and applica- of their applications. To relieve users of this burden, tions that run within them cannot have unlimited ac- auto-tuning has emerged as an alternative in which a cess to the network infrastructure, as they do currently. black-box optimiser iteratively evaluates configurations

257 to find efficient ones. A popular auto-tuning technique and maintain. Today, signal fingerprinting-based in- is Bayesian optimisation, which uses the results to in- door positioning techniques, which use existing wire- crementally build a probabilistic model of the impact less infrastructure, are arguably the most prevalent. of the parameters on performance. This allows the op- The fingerprinting-based positioning system matches timisation to quickly focus on efficient regions of the the current signal observations (fingerprints) at a de- configuration space. Unfortunately, for many computer vice to position it on a pre-defined fingerprint map. The systems, either the configuration space is too large to map is created via some form of survey. However, a ma- develop a good model, or the time to evaluate perfor- jor deterrent of these systems is the initial creation and mance is too long to be executed many times. subsequent maintenance of the signal maps. The com- In this dissertation, I argue that by extracting a small monly used map building method is the so-called man- amount of domain specific knowledge about a system, ual survey, during which a surveyor visits each point it is possible to build a bespoke auto-tuner with signif- on a regular grid and measures the signal fingerprints icantly better performance than its off-the-shelf coun- there. This traditional method is laborious and not con- terparts. This could be performed, for example, by a sidered scalable. An emerging alternative to manual system engineer who has a good understanding of the survey is the path survey, in which a surveyor moves underlying system behaviour and wants to provide per- continuously through the environment and signal mea- formance portability. This dissertation presents BOAT, surements are taken by the surveying device along the a framework to build BespOke Auto-Tuners. BOAT of- path. A path survey is intuitively better than a manual fers a novel set of abstractions designed to make the survey, at least in terms of speed. But, path surveys have exposition of domain knowledge easy and intuitive. not been well-studied yet. First, I introduce Structured Bayesian Optimisation This thesis assessed the path survey quantitatively (SBO), an extension of the Bayesian optimisation algo- and rigorously, demonstrated that path survey can ap- rithm. SBO can leverage a bespoke probabilistic model proach the manual survey in terms of accuracy if cer- of the system’s behaviour, provided by the system engi- tain guidelines are followed. Automated survey systems neer, to rapidly converge to high performance configu- have been proposed and a commodity smart-phone is rations. The model can benefit from observing many the only survey device required. The proposed systems runtime measurements per evaluation of the system, achieve sub-metre accuracy in recovering the survey akin to the use of profilers. trajectory both with and without environmental infor- Second, I present Probabilistic-C++ a lightweight, mation (floor plans), and have been found to outper- high performance probabilistic programming library. It form the state-of-the-art in terms of robustness and allows users to declare a probabilistic models of their scalability. system’s behaviour and expose it to an SBO. Proba- This thesis concludes that path survey can be bilistic programming is a recent tool from the Machine streamlined by the proposed systems to replace the la- Learning community making the declaration of struc- borious manual survey. The proposed systems can pro- tured probabilistic models intuitive. mote the deployment of indoor positioning system in Third, I present a new optimisation scheduling ab- large-scale and complicated environments, especially straction which offers a structured way to express op- in dynamic environments where frequent re-survey is timisations which themselves execute other optimisa- needed. tions. For example, this is useful to express Bayesian optimisations, which each iteration execute a numeri- UCAM-CL-TR-902 cal optimisation. Furthermore, it allows users to eas- ily implement decompositions which exploit the loose Raoul-Gabriel Urma: coupling of subsets of the configuration parameters to optimise them almost independently. Programming language evolution

UCAM-CL-TR-901 February 2017, 129 pages, PDF PhD thesis (Hughes Hall, September 2015) Chao Gao: Abstract: Programming languages are the way develop- Signal maps for smartphone ers communicate with computers—just like natural lan- guages let us communicate with one another. In both localisation cases multiple languages have evolved. However, the February 2017, 127 pages, PDF programming language ecosystem changes at a much higher rate compared to natural languages. In fact, pro- PhD thesis (King’s College, August 2016) gramming languages need to constantly evolve in re- sponse to user needs, hardware advances and research Abstract: Indoor positioning has been an active re- developments or they are otherwise displaced by new- search area for 20 years. Systems based on dedicated comers. As a result, existing code written by developers infrastructure such as ultrasound or ultra-wideband may stop working with a newer language version. Con- (UWB) radio can provide centimetre-accuracy. But they sequently, developers need to “search” (analyse) and are generally prohibitively expensive to build, deploy

258 “replace” (refactor) code in their code bases to support to bounded degree, extending known results. We also new language versions. show that checking whether a given graph has elimina- Traditionally, tools have focused on the replace as- tion distance k to a minor-closed class C is FPT, and, pect (refactoring) to support developers evolving their moreover, if we are given a finite set of minors charac- code bases. This dissertation argues that developers terising C, that there is an explicit FPT algorithm for also need machine support focused on the search as- this. pect. We establish an algorithmic meta-theorem for sev- This dissertation starts by characterising factors eral distance parameters, by showing that all graph driving programming language evolution based on ex- problems that are both slicewise nowhere dense and ternal versus internal forces. Next, it introduces a clas- slicewise first-order definable are FPT. sification of changes introduced by language designers Lastly, several fixed-parameter tractability results that affect developers. It then contributes three tech- are established for two graph problems that have natu- niques to support developers in analysing their code ral distance parameterizations. bases. First, we show a source code query system based on UCAM-CL-TR-904 graphs that express code queries at a mixture of syntax- tree, type, control-flow graph and data-flow levels. We Zheng Yuan: demonstrate how this system can support developers and language designers in locating various code pat- Grammatical error correction in terns relevant in evolution. Second, we design an optional run-time type sys- non-native English tem for Python, that lets developers manually specify March 2017, 145 pages, PDF contracts to identify semantic incompatibilities between PhD thesis (St. Edmund’s College, September 2016) Python 2 and Python 3. Third, recognising that existing codebases do not Abstract: Grammatical error correction (GEC) is the have such contracts, we describe a dynamic analysis to task of automatically correcting grammatical errors in automatically generate them. written text. Previous research has mainly focussed on individual error types and current commercial proof- UCAM-CL-TR-903 reading tools only target limited error types. As sen- tences produced by learners may contain multiple er- Jannis Bulian: rors of different types, a practical error correction sys- tem should be able to detect and correct all errors. Parameterized complexity of In this thesis, we investigate GEC for learners of distances to sparse graph classes English as a Second Language (ESL). Specifically, we treat GEC as a translation task from incorrect into cor- February 2017, 133 pages, PDF rect English, explore new models for developing end- PhD thesis (Clare College, February 2016) to-end GEC systems for all error types, study system performance for each error type, and examine model Abstract: This dissertation offers contributions to the generalisation to different corpora. First, we apply Sta- area of parameterized complexity theory, which studies tistical Machine Translation (SMT) to GEC and prove the complexity of computational problems in a mul- that it can form the basis of a competitive all-errors tivariate framework. We demonstrate that for graph GEC system. We implement an SMT-based GEC sys- problems, many popular parameters can be understood tem which contributes to our winning system submitted as distances that measure how far a graph is from to a shared task in 2014. Next, we propose a ranking belonging to a class of sparse graphs. We introduce model to re-rank correction candidates generated by an the term distance parameter for such parameters and SMT-based GEC system. This model introduces new demonstrate their value in several ways. linguistic information and we show that it improves The parameter tree-depth is uncovered as a distance correction quality. Finally, we present the first study us- parameter, and we establish several fixed-parameter ing Neural Machine Translation (NMT) for GEC. We tractability and hardness results for problems param- demonstrate that NMT can be successfully applied to eterized by tree-depth. GEC and help capture new errors missed by an SMT- We introduce a new distance parameter elimination based GEC system. distance to a class C. The parameter measures distance While we focus on GEC for English, the methods in a way that naturally generalises the notion of vertex presented in this thesis can be easily applied to any lan- deletion by allowing deletions from every component guage. in each deletion step. We show that tree-depth is a spe- cial case of this new parameter, introduce several char- acterisations of elimination distance, and discuss appli- cations. In particular we demonstrate that Graph Iso- morphism is FPT parameterized by elimination distance

259 UCAM-CL-TR-905 The key point made by this thesis is the realization that an execution environment or a context is funda- William Sonnex: mental for writing modern applications and that pro- gramming languages should provide abstractions for Fixed point promotion: programming with context and verifying how it is ac- cessed. taking the induction out of We identify a number of program properties that automated induction were not connected before, but model some notion of context. Our examples include tracking different exe- March 2017, 170 pages, PDF cution platforms (and their versions) in cross-platform PhD thesis (Trinity College, September 2015) development, resources available in different execution environments (e.g. GPS sensor on a phone and database Abstract: This thesis describes the implementation of on the server), but also more traditional notions such as Elea: the first automated theorem prover for proper- variable usage (e.g. in liveness analysis and linear log- ties of observational approximation between terms in ics) or past values in stream-based dataflow program- a functional programming language. A term approx- ming. Our first contribution is the discovery of the con- imates another if no program context can tell them nection between the above examples and their novel apart, except that the approximating term can be less presentation in the form of calculi (coeffect systems). defined than the approximated term. Elea can prove The presented type systems and formal semantics high- terms equivalent by proving approximation in both di- light the relationship between different notions of con- rections. text. The language Elea proves approximations over is Our second contribution is the definition of two uni- pure, call-by-name, and with non-strict data-types, a fied coeffect calculi that capture the common structure subset of the Haskell language. In a test set of es- of the examples. In particular, our flat coeffect calcu- tablished properties from the literature, Elea performs lus models languages with contextual properties of the comparably well to the current state of the art in au- execution environment and our structural coeffect cal- tomated equivalence proof, but where these provers as- culus models languages where the contextual properties sume all terms are total, Elea does not. are attached to the variable usage. We define the seman- Elea uses a novel method to prove approximations, tics of the calculi in terms of category theoretical struc- fixed-point promotion, a method which does not suffer ture of an indexed comonad (based on dualisation of from some of the weaknesses of cyclic proof techniques the well-known monad structure), use it to define oper- such as induction or coinduction. Fixed-point promo- ational semantics and prove type safety of the calculi. tion utilises an unfold-fold style term rewriting system, Our third contribution is a novel presentation of our similar to supercompilation, which uses multiple novel work in the form of web-based interactive essay. This term rewriting steps in order to simulate the lemma dis- provides a simple implementation of three context- covery techniques of automated cyclic provers. aware programming languages and lets the reader write Elea is proven sound using denotational semantics, and run simple context-aware programs, but also ex- including a novel method for verifying an unfold-fold plore the theory behind the implementation including style rewrite, a method I have called truncation fusion. the typing derivation and semantics.

UCAM-CL-TR-906 UCAM-CL-TR-907

Tomas Petricek: Robert N. M. Watson, Peter G. Neumann, Context-aware programming Jonathan Woodruff, Michael Roe, Jonathan Anderson, John Baldwin, languages David Chisnall, Brooks Davis, March 2017, 218 pages, PDF Alexandre Joannou, Ben Laurie, PhD thesis (Clare Hall, March 2017) Simon W. Moore, Steven J. Murdoch, Robert Norton, Stacey Son, Hongyan Xia: Abstract: The development of programming languages needs to reflect important changes in the way programs Capability Hardware execute. In recent years, this has included the develop- ment of parallel programming models (in reaction to Enhanced RISC Instructions: the multi-core revolution) or improvements in data ac- CHERI Instruction-Set Architecture cess technologies. This thesis is a response to another such revolution – the diversification of devices and sys- (Version 6) tems where programs run. April 2017, 307 pages, PDF

260 Abstract: This technical report describes CHERI ISAv6, low-level software Trusted Computing Bases (TCBs) the sixth version of the Capability Hardware Enhanced such as separation kernels, hypervisors, and operating- RISC Instructions (CHERI) Instruction-Set Architec- system kernels, as well as userspace TCBs such as lan- ture (ISA) being developed by SRI International and the guage runtimes and web browsers. Likewise, we see University of Cambridge. This design captures seven early-use scenarios (such as data compression, proto- years of research, development, experimentation, re- col parsing, and image processing) that relate to par- finement, formal analysis, and validation through hard- ticularly high-risk software libraries, which are concen- ware and software implementation. CHERI ISAv6 is a trations of both complex and historically vulnerability- substantial enhancement to prior ISA versions: it intro- prone code exposed to untrustworthy data sources, duces support for kernel-mode compartmentalization, while leaving containing applications unchanged. jump-based rather than exception-based domain tran- sition, architecture-abstracted and efficient tag restora- UCAM-CL-TR-908 tion, and more efficient generated code. A new chapter addresses potential applications of the CHERI model to Raphael¨ L. Proust: the RISC-V and x86-64 ISAs, previously described rel- ative only to the 64-bit MIPS ISA. CHERI ISAv6 better ASAP: As Static As Possible memory explains our design rationale and research methodol- ogy. management CHERI is a hybrid capability-system architecture July 2017, 147 pages, PDF that adds new capability-system primitives to a com- PhD thesis (Magdalene College, July 2016) modity 64-bit RISC ISA enabling software to effi- ciently implement fine-grained memory protection and Abstract: Today, there are various ways to manage the scalable software compartmentalization. Design goals memory of computer programs: garbage collectors of have included incremental adoptability within current all kinds, reference counters, regions, linear types – ISAs and software stacks, low performance overhead each with benefits and drawbacks, each fit for specific for memory protection, significant performance im- settings, each appropriate to different problems, each provements for software compartmentalization, formal with their own trade-offs. grounding, and programmer-friendly underpinnings. Despite the plethora of techniques available, sys- Throughout, we have focused on providing strong and tem programming (device drivers, networking libraries, efficient architectural foundations for the principles of cryptography applications, etc.) is still mostly done in least privilege and intentional use in the execution of C, even though memory management in C is notori- software at multiple levels of abstraction, preventing ously unsafe. As a result, serious bugs are continuously and mitigating vulnerabilities. discovered in system software. The CHERI system architecture purposefully ad- In this dissertation, we study memory management dresses known performance and robustness gaps in strategies with a view to fitness for system program- commodity ISAs that hinder the adoption of more se- ming. cure programming models centered around the princi- First, we establish a framework to study mem- ple of least privilege. To this end, CHERI blends tradi- ory management strategies. Often perceived as distinct tional paged virtual memory with an in-address-space categories, we argue that memory management ap- capability model that includes capability registers, proaches are actually part of a single design space. To capability instructions, and tagged memory. CHERI this end, we establish a precise and powerful lexicon to builds on C-language fat-pointer literature: its capabil- describe memory management strategies of any kind. ities describe fine-grained regions of memory and can Using our newly established vocabulary, we further ar- be substituted for data or code pointers in generated gue that this design space has not been exhaustively ex- code, protecting data and also improving control-flow plored. We argue that one of the unexplored portion of robustness. Strong capability integrity and monotonic- this space, the static-automatic gap, contributes to the ity properties allow the CHERI model to express a va- persistence of C in system programming. riety of protection properties, from enforcing valid C- Second, we develop ASAP: a new memory manage- language pointer provenance and bounds checking to ment technique that fits in the static-automatic gap. implementing the isolation and controlled communica- ASAP is fully automatic (not even annotations are re- tion structures required for software compartmental- quired) and makes heavy use of static analysis. At com- ization. pile time it inserts, in the original program, code that CHERI’s hybrid capability-system approach, in- deallocates memory blocks as they becomes useless. We spired by the Capsicum security model, allows incre- then show how ASAP interacts with various, advanced mental adoption of capability-oriented design: software language features. Specifically, we extend ASAP to sup- implementations that are more robust and resilient can port polymorphism and mutability. be deployed where they are most needed, while leav- Third, we compare ASAP with existing approaches. ing less critical software largely unmodified, but never- One of the points of comparison we use is the be- theless suitably constrained to be incapable of having havioural suitability to system programming. We also adverse effects. Potential deployment scenarios include explore how the ideas from ASAP can be combined

261 with other memory management strategies. We then can have privacy implications if the previous owner’s show how ASAP handles programs satisfying the linear personal data is not properly erased. So I study the ef- or region constraints. Finally, we explore the insights fectiveness of the built-in sanitisation features in An- gained whilst developing and studying ASAP. droid smartphones, lifting the curtains on their prob- lems and their root causes. UCAM-CL-TR-909 UCAM-CL-TR-910 Laurent Simon: William Denman: Exploring new attack vectors for the exploitation of smartphones Automated verification of continuous and hybrid dynamical systems July 2017, 167 pages, PDF PhD thesis (Homerton College, April 2016) July 2017, 178 pages, PDF PhD thesis (Clare College, September 2014) Abstract: Smartphones have evolved from simple candy-bar devices into powerful miniature computing Abstract: The standard method used for verifying the platforms. Today’s smartphones are complex multi- behaviour of a dynamical system is simulation. But tenant platforms: users, OS providers, manufacturers, simulation can check only a finite number of operat- carriers, and app developers have to co-exist on a sin- ing conditions and system parameters, leading to a po- gle device. As with other computing platforms, smart- tentially incomplete verification result. This disserta- phone security research has dedicated a lot of effort, tion presents several automated theorem proving based first, into the detection and prevention of ill-intentioned methods that can, in contrast to simulation, completely software; second, into the detection and mitigation of guarantee the safety of a dynamical system model. operating system vulnerabilities; and third, into the de- To completely verify a purely continuous dynamical tection and mitigation of vulnerabilities in applications. system requires proving a universally quantified first or- In this thesis, I take a different approach. I explore der conjecture, which represents all possible trajectories and study attack vectors that are specific to smart- of the system. Such a closed form solution may contain phones; that is, attack vectors that do not exist on other transcendental functions, rendering the problem unde- computing platforms because they are the result of cidable in the general case. The automated theorem these phones’ intrinsic characteristics. One such char- prover MetiTarski can be used to solve such a prob- acteristic is the sheer number of sensors and peripher- lem by reducing it to one over the real closed fields. als, such as an accelerometer, a gyroscope and a built-in The main issue is the doubly exponential complexity camera. Their number keeps increasing with new usage of the back-end decision procedures that it depends on. scenarios, e.g. for health or navigation. So I show how This dissertation proposes several techniques that make to abuse the camera and microphone to infer a smart- the required conjectures easier for MetiTarski to prove. phone’s motion during user input. I then correlate mo- The techniques are shown to be effective at reducing tion characteristics to the keyboard digits touched by the amount of time required to prove high dimensional a user so as to infer PINs. This can work even if the problems and are further demonstrated on a flight col- input is protected through a Trusted Execution Envi- lision avoidance case study. ronment (TEE), the industry’s preferred answer to the For hybrid systems, which contain both continuous trusted path problem. and discrete behaviours, a different approach is pro- Another characteristic is their form factor, such as posed. In this case, qualitative reasoning is used to ab- their small touch screen. New input methods have been stract the continuous state space into a set of discrete devised to make user input easier, such as “gesture cells. Then, standard discrete state formal verification typing”. So I study a new side channel that exploits tools are used to verify properties over the abstrac- hardware and software interrupt counters to infer what tion. MetiTarski is employed to determine the feasibil- users type using this widely adopted input method. ity of the cells and the transitions between them. As Another inherent trait is that users carry smart- these checks are reduced to proving inequalities over phones everywhere. This increases the risk of theft or the theory of the reals, it facilitates the analysis of non- loss. In fact, in 2013 alone, 3.1M devices were stolen polynomial hybrid systems that contain transcendental in the USA, and 120,000 in London. So I study the ef- functions in their vector fields, invariants and guards. fectiveness of anti-theft software for the Android plat- This qualitative abstraction framework has been imple- form, and demonstrate a wide variety of vulnerabilities. mented in the QUANTUM tool and is demonstrated on Yet another characteristic of the smartphone ecosys- several hybrid system benchmark problems. tem if the pace at which new devices are released: users tend to replace their phone about every 2 years, com- pared to 4.5 years for their personal computers. For al- ready 60% of users today, the purchase of a new smart- phone is partly funded by selling the previous one. This

262 UCAM-CL-TR-911 graph-to-string SCFG is extracted from the parallel cor- pus and used in decoding to transform an input DMRS Dominic Orchard, Mistral Contrastin, graph into a target string either for machine translation Matthew Danish, Andrew Rice: or for realization. I demonstrate the potential of the approach for Proofs for ‘Verifying Spatial large-scale machine translation by evaluating it on the WMT15 English-German translation task. Although Properties of Array Computations’ the approach does not improve on a state-of-the-art September 2017, 8 pages, PDF Hiero implementation, a manual investigation reveals some strengths and future directions for improvement. Abstract: This technical report provides accompanying In addition to machine translation, I apply the ap- proofs for the paper: Verifying Spatial Properties of Ar- proach to the MRS realization task. The approach pro- ray Computations. We show three properties of the lat- duces realizations of high quality, but its main strength tice model of the stencil specification language. 1) that lies in its robustness. Unlike the established MRS re- it is sound with respect to the equational theory of re- alization approach using the ERG, the approach pro- gion specifications; 2) that is it sound with respect to the posed in this thesis is able to realize representations theory of region approximation; 3) that the inference that do not correspond perfectly to ERG semantic out- algorithm is sound. We further derive useful identities put, which will naturally occur in practical realization on the specification language and properties of Union tasks. I demonstrate this in three contexts, by realiz- Normal Form—the data structure used to implement ing representations derived from sentence compression, the model. Core definitions from the paper are restated from robust parsing, and from the transfer-phase of an here to make the overall report more self contained. existing MT system. In summary, the main contributions of this thesis UCAM-CL-TR-913 are a novel architecture combining a statistical machine translation approach with a deep hand-built grammar Matic Horvat: and a demonstration of its practical usefulness as a large-scale machine translation system and a robust re- Hierarchical statistical semantic alization alternative to the established MRS realization translation and realization approach. October 2017, 215 pages, PDF UCAM-CL-TR-914 PhD thesis (Churchill College, March 2017)

Abstract: Statistical machine translation (SMT) ap- Diana Andreea Popescu, Noa Zilberman, proaches extract translation knowledge automatically Andrew W. Moore: from parallel corpora. They additionally take advan- tage of monolingual text for target-side language mod- Characterizing the impact of elling. Syntax-based SMT approaches also incorpo- network latency on cloud-based rate knowledge of source and/or target syntax by tak- ing advantage of monolingual grammars induced from applications’ performance treebanks, and semantics-based SMT approaches use November 2017, 20 pages, PDF knowledge of source and/or target semantics in various forms. However, there has been very little research on Abstract: Businesses and individuals run increasing incorporating the considerable monolingual knowledge numbers of applications in the cloud. The performance encoded in deep, hand-built grammars into statistical of an application running in the cloud depends on the machine translation. Since deep grammars can produce data center conditions and upon the resources commit- semantic representations, such an approach could be ted to an application. Small network delays may lead used for realization as well as MT. to a significant performance degradation, which affects In this thesis I present a hybrid approach combining both the user’s cost and the service provider’s resource some of the knowledge in a deep hand-built grammar, usage, power consumption and data center efficiency. In the English Resource Grammar (ERG), with a statis- this work, we quantify the effect of network latency on tical machine translation approach. The ERG is used several typical cloud workloads, varying in complex- to parse the source sentences to obtain Dependency ity and use cases. Our results show that different ap- Minimal Recursion Semantics (DMRS) representations. plications are affected by network latency to differing DMRS representations are subsequently transformed to amounts. These insights into the effect of network la- a form more appropriate for SMT, giving a parallel cor- tency on different applications have ramifications for pus with transformed DMRS on the source side and workload placement and physical host sharing when aligned strings on the target side. The SMT approach trying to reach performance targets. is based on hierarchical phrase-based translation (Hi- ero). I adapt the Hiero synchronous context-free gram- mar (SCFG) to comprise graph-to-string rules. DMRS

263 UCAM-CL-TR-915 Abstract: Concurrency is often an optimisation, rather than intrinsic to the functional behaviour of a pro- Andrew Caines, Diane Nicholls, gram, i.e., a concurrent program is often intended to Paula Buttery: achieve the same effect of a simpler sequential coun- terpart, just faster. Error-free concurrent programming Annotating errors and disfluencies in remains a tricky problem, beyond the capabilities of most programmers. Consequently, an attractive alter- transcriptions of speech native to manually developing a concurrent program is December 2017, 10 pages, PDF to automatically synthesise one. This dissertation presents two novel formal verification-based methods for safely transforming a Abstract: This document presents our guidelines for the sequential program into a concurrent one. The first annotation of errors and disfluencies in transcriptions method — an instance of proof-directed synthesis — of speech. There is a well-established precedent for an- takes as the input a sequential program and its safety notating errors in written texts but the same is not proof, as well as annotations on where to parallelise, true of speech transcriptions. We describe our coding and produces a correctly-synchronised parallelised pro- scheme, discuss examples and difficult cases, and intro- gram, along with a proof of that program. The method duce new codes to deal with features characteristic of uses the sequential proof to guide the insertion of syn- speech. chronisation barriers to ensure that the parallelised pro- gram has the same behaviour as the original sequen- UCAM-CL-TR-916 tial version. The sequential proof, written in separation logic, need only represent shape properties, meaning we Robert N. M. Watson, Jonathan Woodruff, can parallelise complex heap-manipulating programs Michael Roe, Simon W. Moore, without verifying every aspect of their behaviour. Peter G. Neumann: The second method proposes specification-directed synthesis: given a sequential program, we extract a Capability Hardware Enhanced rich, stateful specification compactly summarising pro- gram behaviour, and use that specification for paral- RISC Instructions (CHERI): lelisation. At the heart of the method is a learning Notes on the Meltdown and algorithm which combines dynamic and static analy- sis. In particular, dynamic symbolic execution and the Spectre Attacks computational learning technique grammar induction February 2018, 16 pages, PDF are used to conjecture input-output specifications, and counterexample-guided abstraction refinement to con- firm or refute the equivalence between the conjectured Abstract: In this report, we consider the potential im- specification and the original program. Once equiva- pact of recently announced Meltdown and Spectre mi- lence checking succeeds, from the inferred specifica- croarchitectural side-channel attacks arising out of su- tions we synthesise code that executes speculatively in perscalar (out-of-order) execution on Capability Hard- parallel — enabling automated parallelisation of irreg- ware Enhanced RISC Instructions (CHERI) computer ular loops that are not necessary polyhedral, disjoint or architecture. We observe that CHERI’s in-hardware with a static pipeline structure. permissions and bounds checking may be an effective form of mitigation for one variant of these attacks, in which speculated instructions can bypass software UCAM-CL-TR-918 bounds checking. As with MMU-based techniques, CHERI remains vulnerable to side-channel leakage Gregory Y. Tsipenyuk: arising from speculative execution across compartment boundaries, leading us to propose a software-managed Evaluation of decentralized email compartment ID to mitigate these vulnerabilities for architecture and social network other variants as well. analysis based on email attachment UCAM-CL-TR-917 sharing March 2018, 153 pages, PDF Matko Botincan:ˇ PhD thesis (Sidney Sussex College, August 2017) Formal verification-driven Abstract: Present day e-mail is provided by centralized parallelisation synthesis services running in the cloud. The services transparently March 2018, 163 pages, PDF connect users behind middleboxes and provide backup, PhD thesis (Trinity College, September 2013) redundancy, and high availability at the expense of user privacy. In present day mobile environments, users can

264 access and modify e-mail from multiple devices with After deliberation, all submissions were accepted to the updates reconciled on the central server. Prioritizing up- workshop. dates is difficult and may be undesirable. Moreover, legacy email protocols do not provide optimal e-mail UCAM-CL-TR-920 synchronization and access. Recent phenomena of the Internet of Things (IoT) will see the number of inter- Advait Sarkar: connected devices grow to 27 billion by 2021. In the first part of my dissertation I am proposing a decen- Interactive analytical modelling tralized email architecture which takes advantage of user’s a IoT devices to maintain a complete email his- May 2018, 142 pages, PDF tory. This addresses the e-mail reconciliation issue and PhD thesis (Emmanuel College, December 2016) places data under user control. I replace legacy email protocols with a synchronization protocol to achieve Abstract: This dissertation addresses the problem of de- eventual consistency of email and optimize bandwidth signing tools for non-expert end-users performing ana- and energy usage. The architecture is evaluated on a lytical modelling, the activity of data analytics through Raspberry Pi computer. machine learning. The research questions are, firstly, There is an extensive body of research on Social can tools be built for analytical modelling? Secondly, Network Analysis (SNA) based on email archives. Typ- can these tools be made useful for non-experts? ically, the analyzed network reflects either communica- Two case studies are made of building and applying tion between users or a relationship between the e-mail machine learning models, firstly to analyse time series and the information found in the e-mail’s header and data, and secondly to analyse data in spreadsheets. Re- the body. This approach discards either all or some spectively, two prototypes are presented, Gatherminer email attachments that cannot be converted to text; and BrainCel. It is shown how it is possible to visualise for instance, images. Yet attachments may use up to general tasks (e.g., prediction, validation, explanation) 90% of an e-mail archive size. In the second part of in these contexts, illustrating how these prototypes em- my dissertation I suggest extracting the network from body the research hypotheses, and confirmed through e-mail attachments shared between users. I hypothesize experimental evaluation that the prototypes do indeed that the network extracted from shared e-mail attach- have the desirable properties of facilitating analytical ments might provide more insight into the social struc- modelling and being accessible to non-experts. ture of the email archive. I evaluate communication and These prototypes and their evaluations exemplify shared e-mail attachments networks by analyzing com- three theoretical contributions: (a) visual analytics can mon centrality measures and classification and cluster- be viewed as an instance of end-user programming, ing algorithms. I further demonstrate how the analysis (b) interactive machine learning can be viewed as di- of the shared attachments network can be used to opti- alogue, and (c) analytical modelling can be viewed as mize the proposed decentralized e-mail architecture. constructivist learning. Four principles for the design of analytical modelling systems are derived: begin the ab- UCAM-CL-TR-919 straction gradient at zero, abstract complex processes through heuristic automation, build expertise through Nada Amin, Franc¸ois-Rene´ Rideau: iteration on multiple representations, and support dia- logue through metamodels. Proceedings of the 2017 Scheme and Functional Programming Workshop UCAM-CL-TR-921 March 2018, 50 pages, PDF Toby Moncaster: Oxford, UK – 3 September 2017 Optimising data centre operation by Abstract: This report aggregates the papers presented removing the transport bottleneck at the eigtheenth annual Scheme and Functional Pro- gramming Workshop, hosted on September 3rd, 2017 June 2018, 130 pages, PDF in Oxford, UK and co-located with the twenty-second PhD thesis (Wolfson College, February 2018) International Conference on Functional Programming. The Scheme and Functional Programming Work- Abstract: Data centres lie at the heart of almost every shop is held every year to provide an opportunity for service on the Internet. Data centres are used to pro- researchers and practitioners using Scheme and related vide search results, to power social media, to store and functional programming languages like Racket, Clo- index email, to host “cloud” applications, for online jure, and Lisp, to share research findings and discuss retail and to provide a myriad of other web services. the future of the Scheme programming language. Consequently the more efficient they can be made the Two full papers and three lightning talks were sub- better for all of us. The power of modern data centres is mitted to the workshop, and each submission was re- in combining commodity off-the-shelf server hardware viewed by three members of the program committee.

265 and network equipment to provide what Google’s Bar- UCAM-CL-TR-923 rosso and Holzle¨ describe as “warehouse scale” com- puters. Sam Ainsworth: Data centres rely on TCP, a transport protocol that was originally designed for use in the Internet. Prefetching for complex memory Like other such protocols, TCP has been optimised to maximise throughput, usually by filling up queues at access patterns the bottleneck. However, for most applications within July 2018, 146 pages, PDF a data centre network latency is more critical than PhD thesis (Churchill College, February 2018) throughput. Consequently the choice of transport pro- tocol becomes a bottleneck for performance. My the- Abstract: Modern-day workloads, particularly those in sis is that the solution to this is to move away from big data, are heavily memory-latency bound. This is be- the use of one-size-fits-all transport protocols towards cause of both irregular memory accesses, which have ones that have been designed to reduce latency across no discernible pattern in their memory addresses, and the data centre and which can dynamically respond to large data sets that cannot fit in any cache. However, the needs of the applications. this need not be a barrier to high performance. With This dissertation focuses on optimising the trans- some data structure knowledge it is typically possible port layer in data centre networks. In particular I to bring data into the fast on-chip memory caches early, address the question of whether any single transport so that it is already available by the time it needs to be mechanism can be flexible enough to cater to the needs accessed. This thesis makes three contributions. I first of all data centre traffic. I show that one leading pro- contribute an automated software prefetching compiler tocol (DCTCP) has been heavily optimised for cer- technique to insert high-performance prefetches into tain network conditions. I then explore approaches program code to bring data into the cache early, achiev- that seek to minimise latency for applications that care ing 1.3x geometric mean speedup on the most complex about it while still allowing throughput-intensive appli- processors, and 2.7x on the simplest. I also provide an cations to receive a good level of service. My key con- analysis of when and why this is likely to be successful, tributions to this are Silo and Trevi. which data structures to target, and how to schedule Trevi is a novel transport system for storage traffic software prefetches well. that utilises fountain coding to maximise throughput Then I introduce a hardware solution, the con- and minimise latency while being agnostic to drop, thus figurable graph prefetcher. This uses the example of allowing storage traffic to be pushed out of the way breadth-first search on graph workloads to motivate when latency sensitive traffic is present in the network. how a hardware prefetcher armed with data-structure Silo is an admission control system that is designed to knowledge can avoid the instruction overheads, in- give tenants of a multi-tenant data centre guaranteed flexibility and limited latency tolerance of software low latency network performance. Both of these were prefetching. The configurable graph prefetcher sits at developed in collaboration with others. the L1 cache and observes memory accesses, which can be configured by a programmer to be aware of a lim- UCAM-CL-TR-922 ited number of different data access patterns, achieving 2.3x geometric mean speedup on graph workloads on Frank Stajano, Graham Rymer, an out-of-order core. My final contribution extends the Michelle Houghton: hardware used for the configurable graph prefetcher to make an event-triggered programmable prefetcher, us- Raising a new generation of ing a set of a set of very small micro-controller-sized cyber defenders programmable prefetch units (PPUs) to cover a wide set of workloads. I do this by developing a highly par- June 2018, 307 pages, PDF allel programming model that can be used to issue prefetches, thus allowing high-throughput prefetching Abstract: To address the skills gap in cyber security, in with low power and area overheads of only around the 2015–16 academic year we launched two compe- 3%, and a 3x geometric mean speedup for a variety of titions for university students: the national (UK-wide) memory-bound applications. To facilitate its use, I then Inter-ACE and, in collaboration with MIT, the interna- develop compiler techniques to help automate the pro- tional Cambridge2Cambridge. After running the com- cess of targeting the programmable prefetcher. These petitions for three years and growing them in several provide a variety of tradeoffs from easiest to use to best dimensions (including duration, budget, gender bal- performance. ance, number of participants, number of universities and number of countries), we distill our experience into a write-up of what we achieved and specific items of UCAM-CL-TR-924 advice for our successors, discussing problems encoun- tered and possible solutions in a variety of areas and George Neville-Neil, Jonathan Anderson, suggesting future directions for further growth. Graeme Jenkinson, Brian Kidney,

266 Domagoj Stolfa, Arun Thomas, personal data ownership, transparency, and value dis- Robert N. M. Watson: tribution. On the other hand, this puts the burden of managing and protecting user data on apps and ad- OpenDTrace Specification version 1.0 driven entities (e.g., an ad-network) at a cost of trust and regulatory accountability. In such a context, data August 2018, 235 pages, PDF holders (e.g., apps) may take advantage of the individ- uals’ inability to fully comprehend and anticipate the Abstract: OpenDTrace is a dynamic tracing facility of- potential uses of their private information with detri- fering full-system instrumentation, a high degree of mental effects for aggregate social welfare. In this pa- flexibility, and portable semantics across a range of op- per, we investigate the problem of the existence and erating systems. Originally designed and implemented design of efficient ecosystems (modeled as markets in by Sun Microsystems (now Oracle), user-facing aspects this paper) that aim to achieve a maximum social wel- of OpenDTrace, such as the D language and command- fare state among competing data holders by preserving line tools, are well defined and documented. However, the heterogeneous privacy preservation constraints up OpenDTraces internal formats the DTrace Intermediate to certain compromise levels, induced by their clients, Format (DIF), DTrace Object Format (DOF) and Com- and at the same time satisfying requirements of agencies pact C Trace Format (CTF) have primarily been doc- (e.g., advertisers) that collect and trade client data for umented through source-code comments rather than a the purpose of targeted advertising, assuming the po- structured specification. This technical report specifies tential practical inevitability of some amount inappro- these formats in order to better support the develop- priate data leakage on behalf of the data holders. Using ment of more comprehensive tests, new underlying ex- concepts from supply-function economics, we propose ecution substrates (such as just-in-time compilation), the first mathematically rigorous and provably optimal and future extensions. We not only cover the data struc- privacy market design paradigm that always results in tures present in OpenDTrace but also include a com- unique equilibrium (i.e, stable) market states that can plete reference of all the low level instructions that are be either economically efficient or inefficient, depending used by the byte code interpreter, all the built in global on whether privacy trading markets are monopolistic variables and subroutines. Our goal with this report is or oligopolistic in nature. Subsequently, we character- to provide not only a list of what is present in the code ize in closed form, the efficiency gap (if any) at market at any point in time, the what, but also explanations of equilibrium. how the system works as a whole, the how, and motiva- tions for various design decisions that have been made UCAM-CL-TR-926 along the way, the why. Throughout this report we use the name OpenDTrace to refer to the open-source project but retain the name DTrace when referring to Ranjan Pal, Konstantinos Psounis, data structures such as the DTrace Intermediate For- Abhishek Kumar, Jon Crowcroft, mat. OpenDTrace builds upon the foundations of the Pan Hui, Leana Golubchik, John Kelly, original DTrace code but provides new features, which Aritra Chatterjee, Sasu Tarkoma: were not present in the original. This document acts as a single source of truth for the current state of OpenD- Are cyber-blackouts in Trace as it is currently implemented and deployed. service networks likely?: UCAM-CL-TR-925 implications for cyber risk management Ranjan Pal, Jon Crowcroft, Abhishek Kumar, October 2018, 32 pages, PDF Pan Hui, Hamed Haddadi, Swades De, Irene Ng, Sasu Tarkoma, Richard Mortier: Abstract: Service liability interconnections among net- Privacy markets in the Apps and worked IT and IoT driven service organizations cre- ate potential channels for cascading service disruptions IoT age due to modern cybercrimes such as DDoS, APT, and ransomware attacks. The very recent Mirai DDoS and September 2018, 45 pages, PDF WannaCry ransomware attacks serve as famous exam- ples of cyber-incidents that have caused catastrophic Abstract: In the era of the mobile apps and IoT, huge service disruptions worth billions of dollars across or- quantities of data about individuals and their activi- ganizations around the globe. A natural question that ties offer a wave of opportunities for economic and arises in this context is “what is the likelihood of a societal value creation. However, the current personal cyber-blackout?”, where the latter term is defined as: data ecosystem is fragmented and inefficient. On one “the probability that all (or a major subset of) organi- hand, end-users are not able to control access (either zations in a service chain become dysfunctional in a cer- technologically, by policy, or psychologically) to their tain manner due to a cyber-attack at some or all points personal data which results in issues related to privacy, in the chain”.

267 The answer to this question has major implications coloring, temporal memory safety, and 64-bit capabili- to risk management businesses such as cyber-insurance ties for 32-bit architectures. when it comes to designing policies by risk-averse in- CHERI is a hybrid capability-system architecture surers for providing coverage to clients in the after- that adds new capability-system primitives to commod- math of such catastrophic network events. In this pa- ity 64-bit RISC ISAs, enabling software to efficiently per, we investigate this question in general as a function implement fine-grained memory protection and scal- of service chain networks and different loss distribution able software compartmentalization. Design goals in- types. We show somewhat surprisingly (and discuss po- clude incremental adoptability within current ISAs and tential practical implications) that following a cyber- software stacks, low performance overhead for mem- attack, the probability of a cyber-blackout and the in- ory protection, significant performance improvements crease in total service-related monetary losses across all for software compartmentalization, formal grounding, organizations, due to the effect of (a) network inter- and programmer-friendly underpinnings. We have fo- connections, and (b) a wide range of loss distributions, cused on providing strong, non-probabilistic, efficient are mostly very small, regardless of the network struc- architectural foundations for the principles of least ture – the primary rationale behind the results being privilege and intentional use in the execution of soft- attributed to degrees of heterogeneity in wealth base ware at multiple levels of abstraction, preventing and among organizations, and Increasing Failure Rate (IFR) mitigating vulnerabilities. property of loss distributions. The CHERI system architecture purposefully ad- dresses known performance and robustness gaps in UCAM-CL-TR-927 commodity ISAs that hinder the adoption of more se- cure programming models centered around the prin- Robert N. M. Watson, Peter G. Neumann, ciple of least privilege. To this end, CHERI blends traditional paged virtual memory with an in-address- Jonathan Woodruff, Michael Roe, space capability model that includes capability reg- Hesham Almatary, Jonathan Anderson, isters, capability instructions, and tagged memory. John Baldwin, David Chisnall, CHERI builds on the C-language fat-pointer litera- Brooks Davis, Nathaniel Wesley Filardo, ture: its capabilities can describe fine-grained regions Alexandre Joannou, Ben Laurie, of memory, and can be substituted for data or code pointers in generated code, protecting data and also im- A. Theodore Markettos, Simon W. Moore, proving control-flow robustness. Strong capability in- Steven J. Murdoch, Kyndylan Nienhuis, tegrity and monotonicity properties allow the CHERI Robert Norton, Alex Richardson, model to express a variety of protection properties, Peter Rugg, Peter Sewell, Stacey Son, from enforcing valid C-language pointer provenance and bounds checking to implementing the isolation and Hongyan Xia: controlled communication structures required for soft- Capability Hardware ware compartmentalization. CHERI’s hybrid capability-system approach, in- Enhanced RISC Instructions: spired by the Capsicum security model, allows incre- CHERI Instruction-Set Architecture mental adoption of capability-oriented design: software implementations that are more robust and resilient can (Version 7) be deployed where they are most needed, while leav- ing less critical software largely unmodified, but never- June 2019, 496 pages, PDF theless suitably constrained to be incapable of having adverse effects. Potential deployment scenarios include Abstract: This technical report describes CHERI ISAv7, low-level software Trusted Computing Bases (TCBs) the seventh version of the Capability Hardware En- such as separation kernels, hypervisors, and operating- hanced RISC Instructions (CHERI) Instruction-Set Ar- system kernels, as well as userspace TCBs such as lan- chitecture (ISA) being developed by SRI International guage runtimes and web browsers. We also see po- and the University of Cambridge. This design cap- tential early-use scenarios around particularly high-risk tures nine years of research, development, experi- software libraries (such as data compression, protocol mentation, refinement, formal analysis, and valida- parsing, and image processing), which are concentra- tion through hardware and software implementation. tions of both complex and historically vulnerability- CHERI ISAv7 is a substantial enhancement to prior prone code exposed to untrustworthy data sources, ISA versions. We differentiate an architecture-neutral while leaving containing applications unchanged. protection model vs. architecture-specific instantia- tions in 64-bit MIPS, 64-bit RISC-V, and x86-64. We have defined a new CHERI Concentrate compression UCAM-CL-TR-928 model. CHERI-RISC-V is more substantially elabo- rated. A new compartment-ID register assists in re- Noa Zilberman, Łukasz Dudziak, sisting microarchitectural side-channel attacks. Exper- Matthew Jadczak, Thomas Parks, imental features include linear capabilities, capability

268 Alessandro Rietmann, Vadim Safronov, providers can cut transaction fees. Moreover, by de- Daniel Zuo: centralising payment verification that can be performed offline, we increase system resilience, and seamlessly Cut-through network switches: maintain offline operations until a system is back on- architecture, design and line. We also use tamper-resistant hardware to tackle usability issues, by minimising cognitive overhead and implementation helping users to correctly handle critical data, minimis- ing the risks of data theft and tampering. November 2018, 18 pages, PDF We apply our research towards extending financial inclusion efforts, since the issues discussed above must Abstract: Cut-through switches are increasingly used be solved to extend mobile payments to the poorest de- within data-centres and high-performance networked mographics. More research is needed to integrate on- systems. Despite their popularity, little is known of line payments, offline payments, and delay-tolerant net- the architecture of cut-through switches used in to- working. This research extends and enhances not only day’s networks. In this paper we introduce three dif- payment systems, but other electronically-enabled ser- ferent cut-through switch architectures, designed over vices from pay-as-you-go solar panels to agricultural the NetFPGA platform. Beyond exploring architectural subsidies and payments from aid donors. We hope that and design considerations, we compare and contrast this thesis is helpful for researchers, protocol designers, the different architectures, providing insights into real- and policy makers interested in creating resilient pay- world switch design. Last, we provide an evaluation of ment systems by assisting them in financial inclusion one successfully implemented cut-through switch de- efforts. sign, providing constant switching latency regardless of packet size and cross-traffic, without compromising UCAM-CL-TR-930 throughput.

UCAM-CL-TR-929 Lucian Carata: Provenance-based computing Khaled Baqer: December 2018, 132 pages, PDF Resilient payment systems PhD thesis (Wolfson College, July 2016)

November 2018, 115 pages, PDF Abstract: Relying on computing systems that become PhD thesis (St. Edmund’s College, October 2018) increasingly complex is difficult: with many factors po- tentially affecting the result of a computation or its Abstract: There have been decades of attempts to properties, understanding where problems appear and evolve or revolutionise the traditional financial system, fixing them is a challenging proposition. Typically, the but not all such efforts have been transformative or process of finding solutions is driven by trial and error even successful. From Chaum’s proposals in the 1980s or by experience-based insights. for private payment systems to micropayments, previ- In this dissertation, I examine the idea of using ous attempts failed to take off for a variety of reasons, provenance metadata (the set of elements that have including non-existing markets, or issues pertaining to contributed to the existence of a piece of data, together usability, scalability and performance, resilience against with their relationships) instead. I show that consider- failure, and complexity of protocols. ing provenance a primitive of computation enables the Towards creating more resilient payment systems, exploration of system behaviour, targeting both retro- we investigated issues related to security engineering in spective analysis (root cause analysis, performance tun- general, and payment systems in particular. We iden- ing) and hypothetical scenarios (what-if questions). In tified that network coverage, central points of fail- this context, provenance can be used as part of feed- ure, and attacks may cripple system performance. The back loops, with a double purpose: building software premise of our research is that offline capabilities are that is able to adapt for meeting certain quality and per- required to produce resilience in critical systems. formance targets (semi-automated tuning) and enabling We focus on issues related to network problems and human operators to exert high-level runtime control attacks, system resilience, and scalability by introduc- with limited previous knowledge of a system’s internal ing the ability to process payments offline without re- architecture. lying on the availability of network coverage; a lack of My contributions towards this goal are threefold: network coverage renders some payment services unus- providing low-level mechanisms for meaningful prove- able for their customers. Decentralising payment verifi- nance collection considering OS-level resource multi- cation, and outsourcing some operations to users, al- plexing, proving that such provenance data can be used leviates the burden of contacting centralised systems in inferences about application behaviour and general- to process every transaction. Our secondary goal is to ising this to a set of primitives necessary for fine-grained minimise the cost of providing payment systems, so provenance disclosure in a wider context.

269 To derive such primitives in a bottom-up manner, I in this dissertation to understand the effect of faults on first present Resourceful, a framework that enables cap- different circuits. It performs digital logic based simula- turing OS-level measurements in the context of appli- tions, trading off analogue accuracy with speed, while cation activities. It is the contextualisation that allows still being able to support most fault models. A 32-bit tying the measurements to provenance in a meaningful addition takes under 15 micro-seconds, while simulat- way, and I look at a number of use-cases in understand- ing more than 1500 transistors. It can also be integrated ing application performance. This also provides a good into an architectural simulator, which added a perfor- setup for evaluating the impact and overheads of fine- mance overhead of 10 to 26 percent to a simulation. grained provenance collection. The results obtained show that single faults cause an I then show that the collected data enables new ways error in an adder in less than 10 percent of the inputs. of understanding performance variation by attributing PreFix brings together the fault models created us- it to specific components within a system. The resulting ing FaultSim and the design directions found using RE- set of tools, Soroban, gives developers and operation PAIR. PreFix performs re-execution of instructions on engineers a principled way of examining the impact of a remote core, which pick up instructions to execute various configuration, OS and virtualization parame- using a global instruction buffer. Error prediction and ters on application behaviour. detection are used to reduce the number of re-executed Finally, I consider how this supports the idea that instructions. PreFix has an area overhead of 3.5 per- provenance should be disclosed at application level and cent in the setup used, and the performance overhead discuss why such disclosure is necessary for enabling is within 5 percent of a fault-free case. This dissertation the use of collected metadata efficiently and at a gran- shows that faults in processors can be tolerated without ularity which is meaningful in relation to application explicitly switching off any component, and minimal semantics. redundancy is sufficient to achieve the same.

UCAM-CL-TR-931 UCAM-CL-TR-932

Jyothish Soman: Brooks Davis, Robert N. M. Watson, A Performance-efficient and practical Alexander Richardson, Peter G. Neumann, Simon W. Moore, John Baldwin, processor error recovery framework David Chisnall, Jessica Clarke, January 2019, 91 pages, PDF Nathaniel Wesley Filardo, PhD thesis (Wolfson College, July 2017) Khilan Gudka, Alexandre Joannou, Ben Laurie, A. Theodore Markettos, Abstract: Continued reduction in the size of a transis- J. Edward Maste, Alfredo Mazzinghi, tor has affected the reliability of processors built using them. This is primarily due to factors such as inaccura- Edward Tomasz Napierala, cies while manufacturing, as well as non-ideal operat- Robert M. Norton, Michael Roe, ing conditions, causing transistors to slow down consis- Peter Sewell, Stacey Son, Jonathan Woodruff: tently, eventually leading to permanent breakdown and erroneous operation of the processor. Permanent tran- CheriABI: Enforcing valid pointer sistor breakdown, or faults, can occur at any point in provenance and minimizing pointer time in the processor’s lifetime. Errors are the discrep- ancies in the output of faulty circuits. This dissertation privilege in the POSIX C run-time shows that the components containing faults can con- environment tinue operating if the errors caused by them are within certain bounds. Further, the lifetime of a processor can April 2019, 40 pages, PDF be increased by adding supportive structures that start working once the processor develops these hard errors. Abstract: The CHERI architecture allows pointers to This dissertation has three major contributions, be implemented as capabilities (rather than integer vir- namely REPAIR, FaultSim and PreFix. REPAIR is a tual addresses) in a manner that is compatible with, and fault tolerant system with minimal changes to the strengthens, the semantics of the C language. In addi- processor design. It uses an external Instruction Re- tion to the spatial protections offered by conventional (IRU) to perform operations, which the fat pointers, CHERI capabilities offer strong integrity, faulty processor might have erroneously executed. In- enforced provenance validity, and access monotonicity. structions that are found to use faulty hardware are The stronger guarantees of these architectural capa- then re-executed on the IRU. REPAIR shows that the bilities must be reconciled with the real-world behav- performance overhead of such targeted re-execution is ior of operating systems, run-time environments, and low for a limited number of faults. applications. When the process model, user-kernel in- FaultSim is a fast fault-simulator capable of simulat- teractions, dynamic linking, and memory management ing large circuits at the transistor level. It is developed are all considered, we observe that simple derivation of

270 architectural capabilities is insufficient to describe ap- We discovered a number of vulnerabilities in the propriate access to memory. We bridge this conceptual PCIe protocol itself, and with the way that the de- gap with a notional abstract capability that describes fence mechanisms it provides are used by modern the accesses that should be allowed at a given point in OSs. The principal defence mechanism provided is the execution, whether in the kernel or userspace. Input/Output (IOMMU). To investigate this notion at scale, we describe the This remaps the address space used by peripherals in first adaptation of a full C-language operating system 4KiB chunks, and can prevent access to areas of ad- (FreeBSD) with an enterprise database (PostgreSQL) dress space that a peripheral should not be able to ac- for complete spatial and referential memory safety. cess. We found that, contrary to belief in the security We show that awareness of abstract capabilities, cou- community, the IOMMUs in modern systems were not pled with CHERI architectural capabilities, can pro- designed to protect against attacks from malicious pe- vide more complete protection, strong compatibility, ripherals, but to allow virtual machines direct access to and acceptable performance overhead compared with real hardware. the pre-CHERI baseline and software-only approaches. We discovered that use of the IOMMU is patchy Our observations also have potentially significant im- even in modern operating systems. Windows effectively plications for other mitigation techniques. does not use the IOMMU at all; macOS opens win- dows that are shared by all devices; Linux and FreeBSD UCAM-CL-TR-933 map windows into host memory separately for each de- vice, but only if poorly documented boot flags are used. Noa Zilberman: These OSs make no effort to ensure that only data that should be visible to the devices is in the mapped win- An Evaluation of NDP performance dows. We created novel attacks that subverted control flow January 2019, 19 pages, PDF and read private data against systems running macOS, Linux and FreeBSD with the highest level of relevant Abstract: NDP is a novel data centre transport archi- protection enabled. These represent the first use of the tecture that claims to achieve near-optimal completion relevant exploits in each case. times for short transfers and high flow throughput in In the final part of this thesis, we evaluate the suit- a wide range of scenarios. This work presents a per- ability of a number of proposed general purpose and formance evaluation of NDP, both on the simulation specific mitigations against DMA attacks, and make a and the hardware level. We show that NDP’s imple- number of recommendations about future directions in mentation achieves lower switch throughput than sim- IOMMU software and hardware. ple TCP, and that the simulated performance is highly dependent on the selected parameters. UCAM-CL-TR-935 UCAM-CL-TR-934 Heidi Howard: Colin L. Rothwell: Distributed consensus revised Exploitation from malicious PCI April 2019, 151 pages, PDF Express peripherals PhD thesis (Pembroke College, September 2018)

February 2019, 108 pages, PDF Abstract: We depend upon distributed systems in ev- ery aspect of life. Distributed consensus, the ability to Abstract: The thesis of this dissertation is that, despite reach agreement in the face of failures and asynchrony, widespread belief in the security community, systems is a fundamental and powerful primitive for construct- are still vulnerable to attacks from malicious peripher- ing reliable distributed systems from unreliable compo- als delivered over the PCI Express (PCIe) protocol. Ma- nents. licious peripherals can be plugged directly into internal For over two decades, the Paxos algorithm has PCIe slots, or connected via an external Thunderbolt been synonymous with distributed consensus. Paxos is connection. widely deployed in production systems, yet it is poorly To prove this thesis, we designed and built a new understood and it proves to be heavyweight, unscalable PCIe attack platform. We discovered that a simple plat- and unreliable in practice. As such, Paxos has been the form was insufficient to carry out complex attacks, subject of extensive research to better understand the so created the first PCIe attack platform that runs a algorithm, to optimise its performance and to mitigate full, conventional OS. To allows us to conduct attacks its limitations. against higher-level OS functionality built on PCIe, we In this thesis, we re-examine the foundations of how made the attack platform emulate in detail the be- Paxos solves distributed consensus. Our hypothesis is haviour of an Intel 82574L Network Interface Con- that these limitations are not inherent to the problem troller (NIC), by using a device model extracted from of consensus but instead specific to the approach of the QEMU emulator.

271 Paxos. The surprising result of our analysis is a sub- implementation and evaluation. I find that validity-tag stantial weakening to the requirements of this widely traffic is reduced for all applications and scales with tag studied algorithm. Building on this insight, we are able use. For legacy applications that do not use tags, there to prove an extensive generalisation over the Paxos al- is near zero overhead. gorithm. Removing these costs through the use of the pro- Our revised understanding of distributed consensus posed optimizations makes the CHERI architecture enables us to construct a diverse family of algorithms more affordable and appealing for industrial adoption. for solving consensus; covering classical as well as novel algorithms to reach consensus where it was previously UCAM-CL-TR-937 thought impossible. We will explore the wide reach- ing implications of this new understanding, ranging Diana Andreea Popescu: from pragmatic optimisations to production systems to fundamentally novel approaches to consensus, which Latency-driven performance in achieve new tradeoffs in performance, scalability and reliability. data centres June 2019, 190 pages, PDF UCAM-CL-TR-936 PhD thesis (Churchill College, December 2018)

Alexandre J. P. Joannou: Abstract: Data centre based cloud computing has revo- lutionised the way businesses use computing infrastruc- High-performance memory safety: ture. Instead of building their own data centres, compa- optimizing the CHERI capability nies rent computing resources and deploy their appli- cations on cloud hardware. Providing customers with machine well-defined application performance guarantees is of May 2019, 132 pages, PDF paramount importance to ensure transparency and to PhD thesis (Peterhouse College, September 2017) build a lasting collaboration between users and cloud operators. A user’s application performance is subject Abstract: This work presents optimizations for mod- to the constraints of the resources it has been allocated ern capability machines and specifically for the CHERI and to the impact of the network conditions in the data architecture, a 64-bit MIPS instruction set extension centre. for security, supporting fine-grained memory protection In this dissertation, I argue that application per- through hardware enforced capabilities. formance in data centres can be improved through The original CHERI model uses 256-bit capabili- cluster scheduling of applications informed by predic- ties to carry information required for various checks tions of application performance for given network la- helping to enforce memory safety, leading to increased tency, and measurements of current network latency in memory bandwidth requirements and cache pressure data centres between hosts. Firstly, I show how to use when using CHERI capabilities in place of conven- the Precision Time Protocol (PTP), through an open- tional 64-bit pointers. In order to mitigate this cost, I source software implementation PTPd, to measure net- present two new 128-bit CHERI capability formats, us- work latency and packet loss in data centres. I pro- ing different compression techniques, while preserving pose PTPmesh, which uses PTPd, as a cloud network C-language compatibility lacking in previous pointer monitoring tool for tenants. Furthermore, I conduct a compression schemes. I explore the trade-offs intro- measurement study using PTPmesh in different cloud duced by these new formats over the 256-bit format. providers, finding that network latency variability in I produce an implementation in the L3 ISA modelling data centres is still common. Normal latency values in language, collaborate on the hardware implementation, data centres are in the order of tens or hundreds of and provide an evaluation of the mechanism. microseconds, while unexpected events, such as net- Another cost related to CHERI capabilities is the work congestion or packet loss, can lead to latency memory traffic increase due to capability-validity tags: spikes in the order of milliseconds. Secondly, I show to provide unforgeable capabilities, CHERI uses a that network latency matters for certain distributed ap- tagged memory that preserves validity tags for every plications even in small amounts of tens or hundreds 256-bit memory word in a shadow space inaccessible of microseconds, significantly reducing their perfor- to software. The CHERI hardware implementation of mance. I propose a methodology to determine the im- this shadow space uses a capability-validity-tag table in pact of network latency on distributed applications per- memory and caches it at the end of the . formance by injecting artificial delay into the network To efficiently implement such a shadow space and im- of an experimental setup. Based on the experimental prove on CHERI’s current approach, I use sparse data results, I build functions that predict the performance structures in a hierarchical tag-cache that filters unnec- of an application for a given network latency. Given essary memory accesses. I present an in-depth study the network latency variability observed in data cen- of this technique through a Python implementation of tres, applications’ performance is determined by their the hierarchical tag-cache, and also provide a hardware placement within the data centre. Thirdly, I propose

272 latency-driven, application performance-aware, cluster time. I also develop a simple language model based ap- scheduling as a way to provide performance guarantees proach to GEC, that does not require annotated train- to applications. I introduce NoMora, a cluster schedul- ing data, and show how it can be improved using ER- ing architecture that leverages the predictions of appli- RANT error types. cation performance dependent upon network latency combined with dynamic network latency measurements UCAM-CL-TR-939 taken between pairs of hosts in data centres to place applications. Moreover, I show that NoMora improves Christine Guo Yu: application performance by choosing better placements than other scheduling policies. Effects of timing on users’ perceived control when interacting with UCAM-CL-TR-938 intelligent systems Christopher Bryant: August 2019, 284 pages, PDF Automatic annotation of error types PhD thesis (Gonville & Caius Gollege, May 2018) for grammatical error correction Abstract: This research relates to the usability of mixed- initiative interaction systems, in which actions can be June 2019, 138 pages, PDF initiated either through a choice by the user or through PhD thesis (Churchill College, December 2018) intelligent decisions taken by the system. The key issue addressed here is how to preserve the user’s perceived Abstract: Grammatical Error Correction (GEC) is the control (‘sense of agency’) when the control of the in- task of automatically detecting and correcting gram- teraction is being transferred between the system and matical errors in text. Although previous work has fo- the user in a back-and-forth manner. cused on developing systems that target specific error Previous research in social psychology and cogni- types, the current state of the art uses machine trans- tive neuroscience suggests timing is a factor that can lation to correct all error types simultaneously. A sig- influence perceived control in such back-and-forth in- nificant disadvantage of this approach is that machine teractions. This dissertation explores the hypothesis translation does not produce annotated output and so that in mixed-initiative interaction, a predictable in- error type information is lost. This means we can only teraction rhythm can preserve the user’s sense of con- evaluate a system in terms of overall performance and trol and enhance their experience during a task (e.g. cannot carry out a more detailed analysis of different higher confidence in task performance, stronger tem- aspects of system performance. poral alignment, lower perceived levels of stress and In this thesis, I develop a system to automatically effort), whereas irregular interaction timing can have annotate parallel original and corrected sentence pairs the opposite effect. Three controlled experiments com- with explicit edits and error types. In particular, I first pare alternative rhythmic strategies when users interact extend the Damerau-Levenshtein alignment algorithm with simple visual stimuli, simple auditory stimuli, and to make use of linguistic information when aligning a more realistic assisted text labelling task. The results parallel sentences, and supplement this alignment with of all three experiments support the hypothesis that a a set of merging rules to handle multi-token edits. The predictable interaction rhythm is beneficial in a range output from this algorithm surpasses other edit extrac- of interaction modalities and applications. tion approaches in terms of approximating human edit This research contributes to the field of human- annotations and is the current state of the art. Having computer interaction (HCI) in four ways. Firstly, it extracted the edits, I next classify them according to a builds novel connections between existing theories in new rule-based error type framework that depends only cognitive neuroscience, social psychology and HCI, on automatically obtained linguistic properties of the highlighting how rhythmic temporal structures can be data, such as part-of-speech tags. This framework was beneficial to the user’s experience: particularly, their inspired by existing frameworks, and human judges sense of control. Secondly, it establishes timing as a rated the appropriateness of the predicted error types crucial design resource for mixed-initiative interaction, as Good (85%) or Acceptable (10%) in a random sam- and provides empirical evidence of how the user’s per- ple of 200 edits. The whole system is called the ERRor ceived control and other task experiences (such as re- ANnotation Toolkit (ERRANT) and is the first toolkit ported levels of confidence, stress and effort) can be in- capable of automatically annotating parallel sentences fluenced by the manipulation of timing. Thirdly, it pro- with error types. vides quantitative measures for the user’s entrainment I demonstrate the value of ERRANT by applying it behaviours that are applicable to a wide range of inter- to the system output produced by the participants of action timescales. Lastly, it contextualises the design of the CoNLL-2014 shared task, and carry out a detailed timing in a realistic application scenario and offers in- error type analysis of system performance for the first sights to the design of general end-user automation and decision support tools.

273 UCAM-CL-TR-940 UCAM-CL-TR-941

Kyndylan Nienhuis, Alexandre Joannou, Robert N. M. Watson, Simon W. Moore, Anthony Fox, Michael Roe, Peter Sewell, Peter G. Neumann: Thomas Bauereiss, Brian Campbell, Matthew Naylor, Robert M. Norton, An Introduction to CHERI Simon W. Moore, Peter G. Neumann, September 2019, 43 pages, PDF Ian Stark, Robert N. M. Watson, Peter Sewell: Abstract: CHERI (Capability Hardware Enhanced RISC Instructions) extends conventional processor Rigorous engineering Instruction-Set Architectures (ISAs) with architectural for hardware security: capabilities to enable fine-grained memory protection and highly scalable software compartmentalization. formal modelling and proof in the CHERI’s hybrid capability-system approach allows ar- CHERI design and implementation chitectural capabilities to be integrated cleanly with contemporary RISC architectures and microarchitec- process tures, as well as with MMU-based C/C++-language September 2019, 38 pages, PDF software stacks. CHERI’s capabilities are unforgeable tokens of au- Abstract: The root causes of many security vulnera- thority, which can be used to implement both explicit bilities include a pernicious combination of two prob- pointers (those declared in the language) and implied lems, often regarded as inescapable aspects of com- pointers (those used by the runtime and generated code) puting. First, the protection mechanisms provided by in C and C++. When used for C/C++ memory pro- the mainstream processor architecture and C/C++ lan- tection, CHERI directly mitigates a broad range of guage abstractions, dating back to the 1970s and be- known vulnerability types and exploit techniques. Sup- fore, provide only coarse-grain virtual-memory-based port for more scalable software compartmentalization protection. Second, mainstream system engineering re- facilitates software mitigation techniques such as sand- lies almost exclusively on test-and-debug methods, with boxing, which also defend against future (currently un- (at best) prose specifications. These methods have his- known) vulnerability classes and exploit techniques. torically sufficed commercially for much of the com- We have developed, evaluated, and demonstrated puter industry, but they fail to prevent large numbers this approach through hardware-software prototypes, of exploitable bugs, and the security problems that this including multiple CPU prototypes, and a full soft- causes are becoming ever more acute. ware stack. This stack includes an adapted version In this paper we show how more rigorous engi- of the Clang/LLVM compiler suite with support for neering methods can be applied to the development of capability-based C/C++, and a full UNIX-style OS a new security-enhanced processor architecture, with (CheriBSD, based on FreeBSD) implementing spatial, its accompanying hardware implementation and soft- referential, and (currently for userspace) non-stack tem- ware stack. We use formal models of the complete poral memory safety. Formal modeling and verification instruction-set architecture (ISA) at the heart of the de- allow us to make strong claims about the security prop- sign and engineering process, both in lightweight ways erties of CHERI-enabled architectures. that support and improve normal engineering practice This report is a high-level introduction to CHERI. – as documentation, in emulators used as a test ora- The report describes our architectural approach, cle for hardware and for running software, and for test CHERI’s key microarchitectural implications, our ap- generation – and for formal verification. We formalise proach to formal modeling and proof, the CHERI key intended security properties of the design, and es- software model, our software-stack prototypes, further tablish that these hold with mechanised proof. This is reading, and potential areas of future research. for the same complete ISA models (complete enough to boot operating systems), without idealisation. UCAM-CL-TR-942 We do this for CHERI, an architecture with hard- ware capabilities that supports fine-grained memory protection and scalable secure compartmentalisation, Alexander Kuhnle: while offering a smooth adoption path for existing soft- Evaluating visually grounded ware. CHERI is a maturing research architecture, de- veloped since 2010, with work now underway to ex- language capabilities using plore its possible adoption in mass-market commercial microworlds processors. The rigorous engineering work described here has been an integral part of its development to January 2020, 142 pages, PDF date, enabling more rapid and confident experimenta- PhD thesis (Queens’ College, August 2019) tion, and boosting confidence in the design.

274 Abstract: Deep learning has had a transformative im- Internet, datacenter networks suffer from network in- pact on computer vision and natural language process- terference. Network interference occurs when conges- ing. As a result, recent years have seen the introduction tion caused by some applications, delays or interferes of more ambitious holistic understanding tasks, com- with traffic from other applications. Network interfer- prising a broad set of reasoning abilities. Datasets in ence makes it difficult to predict network latency: the this context typically act not just as application-focused time that any given packet will take to traverse the net- benchmark, but also as basis to examine higher-level work. The lack of predictability makes it difficult to model capabilities. This thesis argues that emerging is- build fast, efficient, and responsive datacenter applica- sues related to dataset quality, experimental practice tions. and learned model behaviour are symptoms of the in- In this dissertation I address the problem of network appropriate use of benchmark datasets for capability- interference in datacenter networks. I do so primar- focused assessment. To address this deficiency, a new ily by exploiting network scheduling techniques. Net- evaluation methodology is proposed here, which specif- work scheduling techniques were previously developed ically targets in-depth investigation of model perfor- to provide predictability in the Internet. However, they mance based on configurable data simulators. This fo- were complex to deploy and administer because few as- cus on analysing system behaviour is complementary sumptions could be made about the network. Unlike to the use of monolithic datasets as application-focused the Internet, datacenter networks are administered by a comparative benchmarks. single entity, and have well known physical properties, Visual question answering is an example of a mod- that rarely change. ern holistic understanding task, unifying a range of The thesis of this dissertation is that it is both pos- abilities around visually grounded language under- sible and practical to resolve network interference in standing in a single problem statement. It has also been datacenter networks by using network scheduling tech- an early example for which some of the aforemen- niques. I show that it is possible to resolve network in- tioned issues were identified. To illustrate the new eval- terference by deriving a simple, and general, network uation approach, this thesis introduces ShapeWorld, scheduler and traffic regulator. I take the novel step a diagnostic data generation framework. Its design is of basing my scheduler design on a simple, but real- guided by the goal to provide a configurable and exten- istic, model of a datacenter switch. By regulating the sible testbed for the domain of visually grounded lan- flow of traffic into each switch, I show that it is possi- guage understanding. Based on ShapeWorld data, the ble to bound latency across the network. I develop the strengths and weaknesses of various state-of-the-art vi- leaky token bucket regulator to perform this function. sual question answering models are analysed and com- I show that my network scheduler design is practical pared in detail, with respect to their ability to correctly by implementing a simple, and immediately deployable, handle statements involving, for instance, spatial rela- system called QJUMP. QJUMP is thoroughly evaluated tions or numbers. Finally, three case studies illustrate and demonstrated to resolve network interference be- the versatility of this approach and the ShapeWorld tween datacenter applications in both simulation and generation framework: an investigation of multi-task on a physical test-bed. I further show that QJUMP can and curriculum learning, a replication of a psycholin- be extended and improved upon in a variety of ways. I guistic study for deep learning models, and an explo- therefore conclude that it is both possible and practical ration of a new approach to assess generative tasks like to control network interference in datacenter networks image captioning. using network scheduling techniques.

UCAM-CL-TR-943 UCAM-CL-TR-944

Mathew P. Grosvenor: Alexander Vetterl: Latency-First datacenter network Honeypots in the age of universal scheduling attacks and the Internet of Things January 2020, 310 pages, PDF February 2020, 115 pages, PDF PhD thesis (April 2017) PhD thesis (Churchill College, November 2019)

Abstract: Every day we take for granted that, with the Abstract: Today’s Internet connects billions of physical click of a mouse or a tap on a touchscreen, we can devices. These devices are often immature and insecure, instantly access the Internet to globally exchange in- and share common vulnerabilities. The predominant formation, finances and physical goods. The computa- form of attacks relies on recent advances in Internet- tional machinery behind the Internet is found in dat- wide scanning and device discovery. The speed at which acenters scattered all over the globe. Each datacenter (vulnerable) devices can be discovered, and the device contains many tens of thousands of computers con- monoculture, mean that a single exploit, potentially nected together through a datacenter network. Like the trivial, can affect millions of devices across brands and continents.

275 In an attempt to detect and profile the growing problem in general, and the analytic techniques that ex- threat of autonomous and Internet-scale attacks against ist currently are difficult to combine with experimental the Internet of Things, we revisit honeypots, resources data. The central hypothesis of this thesis is that statis- that appear to be legitimate systems. We show that this tical analysis of large datasets of simulated metabolic endeavour was previously limited by a fundamentally fluxes is an effective way to gain insight into the struc- flawed generation of honeypots and associated miscon- ture of metabolic networks. These datasets can be ei- ceptions. ther simulated or experimental, allowing insight on real We show with two one-year-long studies that the world data while retaining the large sample sizes only display of warning messages has no deterrent effect easily possible via simulation. This work demonstrates in an attacked computer system. Previous research as- that this approach can yield results in detecting struc- sumed that they would measure individual behaviour, ture in both a population of solutions and in the net- but we find that the number of human attackers is or- work itself. ders of magnitude lower than previously assumed. This work begins with a taxonomy of sampling Turning to the current generation of low- and methods over metabolic networks, before introducing medium-interaction honeypots, we demonstrate that three case studies, of different sampling strategies. Two their architecture is fatally flawed. The use of off-the- of these case studies represent, to my knowledge, the shelf libraries to provide the transport layer means largest datasets of their kind, at around half a million that the protocols are implemented subtly differently points each. This required the creation of custom soft- from the systems being impersonated. We developed a ware to achieve this in a reasonable time frame, and is generic technique which can find any such honeypot at necessary due to the high dimensionality of the sample Internet scale with just one packet for an established space. TCP connection. Next, a number of techniques are described which We then applied our technique and conducted sev- operate on smaller datasets. These techniques, focused eral Internet-wide scans over a one-year period. By log- on pairwise comparison, show what can be achieved ging in to two SSH honeypots and sending specific com- with these smaller datasets, and how in these cases, vi- mands, we not only revealed their configuration and sualisation techniques are applicable which do not have patch status, but also found that many of them were not simple analogues with larger datasets. up to date. As we were the first to knowingly authenti- In the next chapter, Similarity Network Fusion is cate to honeypots, we provide a detailed legal analysis used for the first time to cluster organisms across sev- and an extended ethical justification for our research to eral levels of biological organisation, resulting in the show why we did not infringe computer-misuse laws. detection of discrete, quantised biological states in the Lastly, we present honware, a honeypot framework underlying datasets. This quantisation effect was main- for rapid implementation and deployment of high- tained across both real biological data and Monte- interaction honeypots. Honware automatically pro- Carlo simulated data, with related underlying biolog- cesses a standard firmware image and can emulate a ical correlates, implying that this behaviour stems from wide range of devices without any access to the manu- the network structure itself, rather than from the ge- facturers’ hardware. We believe that honware is a major netic or regulatory mechanisms that would normally be contribution towards re-balancing the economics of at- assumed. tackers and defenders by reducing the period in which Finally, Hierarchical Block Matrices are used as a attackers can exploit vulnerabilities at Internet scale in model of multi-level network structure, by clustering a world of ubiquitous networked ‘things’. reactions using a variety of distance metrics: first stan- dard network distance measures, then by Local Net- UCAM-CL-TR-945 work Learning, a novel approach of measuring connec- tion strength via the gain in predictive power of each Maxwell Jay Conway: node on its neighbourhood. The clusters uncovered us- ing this approach are validated against pre-existing sub- Machine learning methods for system labels and found to outperform alternative tech- niques. detecting structure in metabolic flow Overall this thesis represents a significant new networks approach to metabolic network structure detection, as both a theoretical framework and as technolog- March 2020, 132 pages, PDF ical tools, which can readily be expanded to cover PhD thesis (Selwyn College, August 2018) other classes of multilayer network, an under explored datatype across a wide variety of contexts. In addition Abstract: Metabolic flow networks are large scale, to the new techniques for metabolic network structure mechanistic biological models with good predictive detection introduced, this research has proved fruitful power. However, even when they provide good predic- both in its use in applied biological research and in tions, interpreting the meaning of their structure can terms of the software developed, which is experiencing be very difficult, especially for large networks which substantial usage. model entire organisms. This is an underaddressed

276 UCAM-CL-TR-946 UCAM-CL-TR-947

Michael Schaarschmidt: Robert N. M. Watson, End-to-end deep reinforcement Alexander Richardson, Brooks Davis, learning in computer systems John Baldwin, David Chisnall, Jessica Clarke, Nathaniel Filardo, Simon W. Moore, April 2020, 166 pages, PDF Edward Napierala, Peter Sewell, PhD thesis (Sidney Sussex College, September 2019) Peter G. Neumann: Abstract: The growing complexity of data process- CHERI C/C++ Programming Guide ing systems has long led systems designers to imag- ine systems (e.g. databases, schedulers) which can self- June 2020, 33 pages, PDF configure and adapt based on environmental cues. In this context, reinforcement learning (RL) methods have Abstract: This document is a brief introduction to the since their inception appealed to systems developers. CHERI C/C++ programming languages. We explain They promise to acquire complex decision policies from the principles underlying these language variants, and raw feedback signals. Despite their conceptual popu- their grounding in CHERI’s multiple architectural in- larity, RL methods are scarcely found in real-world stantiations: CHERI-MIPS, CHERI-RISC-V, and Arm’s data processing systems. Recently, RL has seen ex- Morello. We describe the most commonly encountered plosive growth in interest due to high profile suc- differences between these dialects and C/C++ on con- cesses when utilising large neural networks (deep rein- ventional architectures, and where existing software forcement learning). Newly emerging machine learning may require minor changes. We document new com- frameworks and powerful hardware accelerators have piler warnings and errors that may be experienced given rise to a plethora of new potential applications. compiling code with the CHERI Clang/LLVM com- In this dissertation, I first argue that in order to piler, and suggest how they may be addressed through design and execute deep RL algorithms efficiently, typically minor source-code changes. We explain how novel software abstractions are required which can modest language extensions allow selected software, accommodate the distinct computational patterns of such as memory allocators, to further refine permis- communication-intensive and fast-evolving algorithms. sions and bounds on pointers. This guidance is based I propose an architecture which decouples logical al- on our experience adapting the FreeBSD operating- gorithm construction from local and distributed execu- system userspace, and applications such as PostgreSQL tion semantics. I further present RLgraph, my proof- and WebKit, to run in a CHERI C/C++ capability- of-concept implementation of this architecture. In RL- based programming environment. We conclude by rec- graph, algorithm developers can explore novel designs ommending further reading. by constructing a high-level data flow graph through combination of logical components. This dataflow UCAM-CL-TR-948 graph is independent of specific backend frameworks or notions of execution, and is only later mapped to Dylan McDermott: execution semantics via a staged build process. RL- graph enables high-performing algorithm implementa- Reasoning about effectful programs tions while maintaining flexibility for rapid prototyp- ing. and evaluation order Second, I investigate reasons for the scarcity of June 2020, 150 pages, PDF RL applications in systems themselves. I argue that PhD thesis (Homerton College, October 2019) progress in applied RL is hindered by a lack of tools for task model design which bridge the gap between Abstract: Program transformations have various appli- systems and algorithms, and also by missing shared cations, such as in compiler optimizations. These trans- standards for evaluation of model capabilities. I in- formations are often effect-dependent: replacing one troduce Wield, a first-of-its-kind tool for incremental program with another relies on some restriction on the model design in applied RL. Wield provides a small side-effects of subprograms. For example, we cannot set of primitives which decouple systems interfaces and eliminate a dead computation that raises an exception, deployment-specific configuration from representation. or a duplicated computation that prints to the screen. Core to Wield is a novel instructive experiment proto- Effect-dependent program transformations can be de- col called progressive randomisation which helps prac- scribed formally using effect systems, which annotate titioners to incrementally evaluate different dimensions types with information about the side-effects of expres- of non-determinism. I demonstrate how Wield and pro- sions. gressive randomisation can be used to reproduce and In this thesis, we extend previous work on effect sys- assess prior work, and to guide implementation of tems and correctness of effect-dependent transforma- novel RL applications. tions in two related directions.

277 First, we consider evaluation order. Effect systems model (using CHERI capabilities for all pointers) to for call-by-value languages are well-known, but are not provide complete spatial memory protection for tradi- sound for other evaluation orders. We describe sound tionally unsafe languages. and precise effect systems for various evaluation or- As the first step towards memory safety, all ders, including call-by-name. We also describe an ef- language-visible pointers can be implemented as ca- fect system for Levy’s call-by-push-value, and show that pabilities. I analyse the programmer-visible impact of this subsumes those for call-by-value and call-by-name. this change and refine the pure-capability program- This naturally leads us to consider effect-dependent ming model to provide strong source-level compatibil- transformations that replace one evaluation order with ity with existing code. Second, to provide robust spa- another. We show how to use the call-by-push-value ef- tial safety, language-invisible pointers (mostly arising fect system to prove the correctness of transformations from program linkage) such as those used for functions that replace call-by-value with call-by-name, using an calls and global variable accesses must also be pro- argument based on logical relations. Finally, we extend tected. In doing so, I highlight trade-offs between per- call-by-push-value to additionally capture call-by-need. formance and privilege minimization for implicit and We use our extension to show a classic example of a re- programmer-visible pointers. Finally, I present Cher- lationship between evaluation orders: if the side-effects iSH, a novel and highly compatible technique that pro- are restricted to (at most) nontermination, then call-by- tects against buffer overflows between fields of the same name is equivalent to call-by-need. object, hereby ensuring that the CHERI spatial memory The second direction we consider is non-invertible protection is complete. transformations. A program transformation is non- I find that the byte-granular spatial safety provided invertible if only one direction is correct. Such trans- by CHERI pure-capability code is not only stronger formations arise, for example, when considering unde- than most other approaches, but also incurs almost fined behaviour, nondeterminism, or concurrency. We negligible performance overheads in common cases present a general framework for verifying noninvert- (0.1% geometric mean) and a worst-case overhead of ible effect-dependent transformations, based on our ef- only 23.3% compared to the insecure MIPS baseline. fect system for call-by-push-value. The framework in- Moreover, I show that the pure-capability program- cludes a non-symmetric notion of correctness for effect- ming model provides near-complete source-level com- dependent transformations, and a denotational seman- patibility with existing programs. I evaluate this based tics based on order-enriched category theory that can on porting large widely used open-source applications be used to prove correctness. such as PostgreSQL and WebKit with only minimal changes: fewer than 0.1% of source lines. UCAM-CL-TR-949 I conclude that pure-capability CHERI C/C++ is an eminently viable programming environment offering Alexander Richardson: strong memory protection, good source-level compati- bility and low performance overheads. Complete spatial safety for C and C++ using CHERI capabilities UCAM-CL-TR-950 June 2020, 189 pages, PDF Hugo Paquet: PhD thesis (Emmanuel College, October 2019) Probabilistic concurrent game Abstract: Lack of memory safety in commonly used semantics systems-level languages such as C and C++ results in a constant stream of new exploitable software vulner- August 2020, 156 pages, PDF abilities and exploit techniques. Many exploit mitiga- PhD thesis (Homerton College, September 2019) tions have been proposed and deployed over the years, yet none address the root issue: lack of memory safety. Abstract: This thesis presents a variety of models for Most C and C++ implementations assume a memory probabilistic programming languages in the framework model based on a linear array of bytes rather than an of concurrent games. object-centric view. Whilst more efficient on contem- Our starting point is the model of concurrent porary CPU architectures, linear addresses cannot en- games with symmetry of Castellan, Clairambault code the target object, thus permitting memory errors and Winskel. We show that they form a symmetric such as spatial safety violations (ignoring the bounds of monoidal closed bicategory, and that this can be turned an object). One promising mechanism to provide mem- into a cartesian closed bicategory using a linear expo- ory safety is CHERI (Capability Hardware Enhanced nential pseudo-comonad inspired by linear logic. RISC Instructions), which extends existing processor Then, we enrich this with probability, relying heav- architectures with capabilities that provide hardware- ily on Winskel’s model of probabilistic concurrent enforced checks for all accesses and can be used to pre- strategies. We see that the bicategorical structure is not vent spatial memory violations. This dissertation pro- perturbed by the addition of probability. We apply this totypes and evaluates a pure-capability programming model to two probabilistic languages: a probabilistic

278 untyped λ-calculus, and Probabilistic PCF. For the for- memory protection and scalable software compart- mer, we relate the semantics to the probabilistic Naka- mentalization, by providing strong, non-probabilistic, jima trees of Leventis, thus obtaining a characterisation efficient mechanisms to support the principles of of observational equivalence for programs in terms of least privilege and intentional use in the execution of strategies. For the latter, we show a definability result software at multiple levels of abstraction, preventing in the spirit of the game semantics tradition. This solves and mitigating vulnerabilities. Design goals include an open problem, as it is notoriously difficult to model incremental adoptability from current ISAs and soft- Probabilistic PCF with sequential game semantics. ware stacks, low performance overhead for memory Finally, we introduce a model for measurable protection, significant performance improvements for game semantics, in which games and strategies come software compartmentalization, formal grounding, equipped with measure-theoretic structure allowing for and programmer-friendly underpinnings. an accurate description of computation with contin- CHERI blends traditional paged virtual memory uous data types. The objective of this model is to with an in-address-space capability model that includes support computation with arbitrary probability mea- capability values in registers, capability instructions, sures on the reals. In the last part of this thesis we and tagged memory to enforce capability integrity. This see how this can be done by equipping strategies with hybrid approach, inspired by the Capsicum security parametrised families of probability measures (also model, addresses the performance and robustness is- known as stochastic kernels), and we construct a bi- sues that arise when trying to express more secure pro- category of measurable concurrent games and proba- gramming models, minimising privilege, above conven- bilistic measurable strategies. tional architectures that provide only MMU-based pro- tection. CHERI builds on the C-language fat-pointer UCAM-CL-TR-951 literature: its capabilities can describe fine-grained re- gions of memory, and can be substituted for data or Robert N. M. Watson, Peter G. Neumann, code pointers in generated code, protecting data and improving control-flow robustness. Strong capability Jonathan Woodruff, Michael Roe, integrity and monotonicity properties allow CHERI to Hesham Almatary, Jonathan Anderson, express a variety of protection idioms, from enforc- John Baldwin, Graeme Barnes, ing valid C-language pointer provenance and bounds David Chisnall, Jessica Clarke, Brooks Davis, checking to implementing the isolation and controlled Lee Eisen, Nathaniel Wesley Filardo, communication structures required for software com- partmentalization. Richard Grisenthwaite, Alexandre Joannou, CHERI’s hybrid approach allows incremental adop- Ben Laurie, A. Theodore Markettos, tion of capability-oriented design: critical components Simon W. Moore, Steven J. Murdoch, can be ported and recompiled to use capabilities Kyndylan Nienhuis, Robert Norton, throughout, providing fine-grain memory protection, or be largely unmodified but encapsulated in ways that Alexander Richardson, Peter Rugg, permit only controlled interaction. Potential early de- Peter Sewell, Stacey Son, Hongyan Xia: ployment scenarios include low-level software Trusted Computing Bases (TCBs) such as separation kernels, Capability Hardware hypervisors, and operating-system kernels, userspace Enhanced RISC Instructions: TCBs such as language runtimes and web browsers, and particularly high-risk software libraries such as CHERI Instruction-Set Architecture data compression, protocol parsing, and image process- (Version 8) ing (which are concentrations of both complex and his- torically vulnerability-prone code exposed to untrust- October 2020, 590 pages, PDF worthy data sources). CHERI ISAv8 is a substantial enhancement to prior Abstract: This technical report describes CHERI ISAv8, ISA versions. Capability compression is now part of the eighth version of the CHERI architecture being the abstract model. Both 32-bit and 64-bit architectural developed by SRI International and the University address sizes are supported. Various previously experi- of Cambridge. This design captures ten years of re- mental features, such as sentry capabilities and CHERI- search, development, experimentation, refinement, for- RISC-V, are now considered mature. We have defined mal analysis, and validation through hardware and a number of new temporal memory-safety accelera- software implementation. tion features including MMU assistance for a load-side- CHERI introduces an architecture-neutral barrier revocation model. We have added a chapter on capability-based protection model, which has been practical CHERI microarchitecture. CHERI ISAv8 is instantiated in various commodity base architectures to synchronized with Arm Morello. give CHERI-MIPS, CHERI-RISC-V, Arm’s prototype Morello architecture, and (sketched) CHERI-x86-64. It UCAM-CL-TR-952 enables software to efficiently implement fine-grained David Adeboye:

279 Exploring the effect of System-on-Chip (SoC), and board. Morello experimen- spatial faithfulness on group tally incorporates the CHERI protection model, devel- oped at the University of Cambridge and SRI Interna- decision-making tional, into the ARMv8-A architecture. This document declares a set of capability essential IP – ideas essential October 2020, 64 pages, PDF to the creation of a contemporary CHERI capability MPhil thesis (Jesus College, 2020) system in architecture and microarchitecture. Arm and Cambridge agree that they have made this IP available Abstract: Remote working is becoming increasingly for use without restriction. This document also identi- popular and many large organisations are asking their fies a set of CHERI background documents that may be employees to work from home. However, several stud- of value as prior art. ies have shown that groups who make decisions over videoconferencing take longer to complete tasks, are UCAM-CL-TR-954 less effective and are less satisfied with the result. The ability for a communication medium to convey infor- Myoung Jin Nam: mation, cues or symbols to its users has been theorised to influence team/communication performance. Video- Inline and sideline approaches for conferencing fails to communicate these non-verbal be- low-cost memory safety in C haviours, which provide complementary information to speech. For example, the inability to use gaze to help in- February 2021, 124 pages, PDF dicate the next speaker means that conversations over PhD thesis (Selwyn College, November 2020) videoconferencing typically contain more explicit han- Abstract: System languages such as C or C++ are widely dovers such as names. used for their high performance, however the allowance This thesis presents Spatial, a new spatially faith- of arbitrary pointer arithmetic and typecast introduces ful videoconferencing application that captures the as- a risk of memory corruptions. These memory errors pects of face-to-face conversations that are not avail- cause unexpected termination of programs, or even able on standard systems. Unlike previous work, which worse, attackers can exploit them to alter the behavior requires specialised equipment or setups, Spatial fo- of programs or leak crucial data. cuses on work-from-home environments. Spatial aims Despite advances in memory safety solutions, high to replicate the spatial characteristics of face-to-face and unpredictable overhead remains a major challenge. conversations, using commodity hardware. It builds en- Accepting that it is extremely difficult to achieve com- vironments that ensure that both visual and auditory plete memory safety with the performance level suit- communication can be transmitted directionally and able for production deployment, researchers attempt to as wholly as possible. Using Spatial they can calibrate strike a balance between performance, detection cov- their working environments to ensure that their experi- erage, interoperability, precision, and detection timing. ence is free from perspective distortions. Some properties are much more desirable, e.g. the in- We show that under Spatial, groups replicate con- teroperability with pre-compiled libraries. Compara- versation characteristics of face-to-face interactions. tively less critical properties are sacrificed for perfor- They completed a cooperative decision-making task in mance, for example, tolerating longer detection delay a shorter amount of time, took less time for turns and or narrowing down detection coverage by performing interrupted each other less. approximate or probabilistic checking or detecting only certain errors. Modern solutions compete for perfor- UCAM-CL-TR-953 mance. The performance matrix of memory safety solutions Robert N. M. Watson, Jonathan Woodruff, has two major assessment criteria – run-time and mem- ory overheads. Researchers trade-off and balance per- Alexandre Joannou, Simon W. Moore, formance metrics depending on its purpose or place- Peter Sewell, Arm Limited: ment. Many of them tolerate the increase in memory use for better speed, since memory safety enforcement DSbD CHERI and Morello is more desirable for troubleshooting or testing dur- Capability Essential IP ing development, where a memory resource is not the main issue. Run-time overhead, considered more criti- (Version 1) cal, is impacted by cache misses, dynamic instructions, December 2020, 25 pages, PDF DRAM row activations, branch predictions and other factors. Abstract: The CHERI protection model extends con- This research proposes, implements, and evaluates temporary Instruction Set Architectures (ISAs) with MIU: Memory Integrity Utilities containing three solu- support for architectural capabilities. The UKRI Digi- tions – MemPatrol, FRAMER and spaceMiu. MIU sug- tal Security by Design (DSbD) programme is support- gests new techniques for practical deployment of mem- ing the creation of Arm’s prototype Morello processor, ory safety by exploiting free resources with the follow- ing focuses: (1) achieving memory safety with overhead

280 < 1% by using concurrency and trading off prompt frequency of memory sweeping. I explore tradeoffs of detection and coverage; but yet providing eventual de- memory allocator designs that use quarantine buffers tection by a monitor isolation design of an in-register and shadow space tags to prevent frequent unnecessary monitor process and the use of AES instructions (2) sweeping. The evaluation shows that the optimisations complete memory safety with near-zero false negatives and new allocator designs reduce the cost of capability focusing on eliminating overhead, that hardware sup- sweeping revocation by orders of magnitude, making it port cannot resolve, by using a new tagged-pointer rep- already practical for most applications to adopt tempo- resentation utilising the top unused bits of a pointer. ral safety under CHERI.

UCAM-CL-TR-955 UCAM-CL-TR-956

Hongyan Xia: Jianxin Zhao: Capability memory protection for Optimisation of a modern numerical embedded systems library: a bottom-up approach February 2021, 145 pages, PDF April 2021, 96 pages, PDF PhD thesis (Hughes Hall, May 2019) PhD thesis (Corpus Christi College, September 2019)

Abstract: This dissertation explores the use of capa- Abstract: Numerical libraries lie in the heart of modern bility security hardware and software in real-time and applications, from machine learning, scientific compu- latency-sensitive embedded systems, to address exist- tation and to Internet of Things (IoT). It has dominated ing memory safety and task isolation problems as well many aspects of our daily lives. Numerical library used as providing new means to design a secure and scal- to lie in the low level of applications, and only need able real-time system. In addition, this dissertation to focus on provide fast calculation. However, with so- looks into how practical and high-performance tempo- cial awareness of privacy and personal data arising, ral memory safety can be achieved under a capability computation is gradually moved to devices in heteroge- architecture. neous environment. Recently development of edge de- State-of-the-art memory protection schemes for em- vices such as Edge TPU also promotes a trend of de- bedded systems typically present limited and inflexible centralised computation. Given this trend, a new un- solutions to memory protection and isolation, and fail derstanding of the full stack of computation is required to scale as embedded devices become more capable and to optimise computation at various levels. ubiquitous. I investigate whether a capability architec- In this thesis, based on my experience participating ture is able to provide new angles to address memory in the development of a numerical library, I present a safety issues in an embedded scenario. Previous CHERI bottom-up approach that centres on numerical library capability research focuses on 64-bit architectures in to describe the optimisation of computation at various UNIX operating systems, which does not translate to levels. I present the low-level design of numerical op- typical 32-bit embedded processors with low-latency erations and show the related impact on performance and real-time requirements. I propose and implement optimisation. I create new algorithms for key opera- the CHERI CC-64 encoding and the CHERI-64 copro- tions, and build an automatic tuning module to further cessor to construct a feasible capability-enabled 32-bit improve performance. At the graph level, which con- CPU. In addition, I implement a real-time kernel for sists of multiple operations, I present the idea of using embedded systems atop CHERI-64. On this hardware graph as common Intermediate Representation to en- and software platform, I focus on exploring scalable able interoperability on other computation frameworks task isolation and fine-grained memory protection en- and devices. To demonstrate this approach, I build the abled by capabilities in a single flat physical address TFgraph system that provides a symbolic representa- space, which are otherwise difficult or impossible to tion layer to exchange the computation between Owl achieve via state-of-the-art approaches. Later, I present and other frameworks. At a higher level, the compu- the evaluation of the hardware implementation and the tation graph can be seen as a unit, and at this level I software run-time overhead and real-time performance. identify the problems of computation composition and Even with capability support, CHERI-64 as well deployment. I build the Zoo system to address these as other CHERI processors still expose major attack two problems. It provides a small Domain-specific Lan- surfaces through temporal vulnerabilities like use-after- guage to enable composition of advanced data analytics free. A naıve¨ approach that sweeps memory to inval- services. Benefiting from OCaml’s powerful type sys- idate stale capabilities is inefficient and incurs signifi- tem, the Zoo provides type checking for the composi- cant cycle overhead and DRAM traffic. To make sweep- tion. Besides, the Zoo DSL supports fine-grained ver- ing revocation feasible, I introduce new architectural sion control in composing. It also involves deploying mechanisms and micro-architectural optimisations to composed services to multiple backends. Finally, the substantially reduce the cost of memory sweeping and top level involves collaboration of multiple deployed capability revocation. Another factor of the cost is the

281 computations. At this level, I focus on the barrier con- large extent. Problems of this kind, whilst not popular trol methods, propose two quantitative metrics to eval- in the machine learning community, have direct appli- uate existing barrier control methods, and bring new cations such as domain adaptation, hypothesis testing, insights into their design. I have also built a simulation semantic similarity, and others. platform and real-world experiments to perform thor- Thus, the focus of this thesis is to carry out a prelim- ough evaluation of the PSP compared to existing barrier inary study on computational approaches for estimat- methods. ing the Schrodinger¨ bridge between two distributions, when these distributions are available (or can be avail- UCAM-CL-TR-957 able) through samples, as most problems in machine learning are. Daniel Hugenroth, Martin Kleppmann, Due to the mathematical nature of the problem, this manuscript is also concerned with restating and Alastair R. Beresford: re-deriving theorems and results that seem to be con- Rollercoaster: an efficient sidered communal knowledge within the mathematical community or hidden in type-written textbooks behind group-multicast scheme for paywalls. Part of the aim of this thesis is to make the mix networks mathematical machinery behind these approaches more accessible to a broader audience. 27 pages, PDF Originally published in Proceedings of the 30th UCAM-CL-TR-959 USENIX Security Symposium Thomas Bauereiss, Brian Campbell, Abstract: Mix network designs such as Loopix provide Thomas Sewell, Alasdair Armstrong, strong metadata anonymity guarantees that are crucial across many applications. However, because they limit Lawrence Esswood, Ian Stark, the rate at which messages can be sent by each user, Graeme Barnes, Robert N. M. Watson, they incur high delays when sending many messages to Peter Sewell: multiple recipients – for instance, in decentralised col- laborative apps. Verified security for the Morello In this paper we present an efficient multicast capability-enhanced prototype Arm scheme named Rollercoaster that reduces the time for delivering a message to all members of a group of size m architecture from O(m) to O(log m). Rollercoaster can be deployed September 2021, 24 pages, PDF without modifications to the underlying mix network, allowing it to benefit from the anonymity set provided by existing users. We further develop an extension that Abstract: Memory safety bugs continue to be a major achieves the same asymptotic guarantees in the pres- source of security vulnerabilities in our critical infras- ence of unreliable group members. tructure. The CHERI project has proposed extending While the scheme is applicable to many mix net- conventional architectures with hardware-supported work designs, we evaluate it for the Loopix network, capabilities to enable fine-grained memory protection which is the most advanced and practical design to and scalable compartmentalisation, allowing histori- date. For this evaluation we developed a network sim- cally memory-unsafe C and C++ to be adapted to ulator that allows fast, reproducible, and inspectable deterministically mitigate large classes of vulnerabili- runs while eliminating external influences. ties, while requiring only minor changes to existing system software sources. Arm is currently designing and building Morello, a CHERI-enabled prototype ar- UCAM-CL-TR-958 chitecture, processor, SoC, and board, extending the high-performance Neoverse N1, to enable industrial Francisco Vargas: evaluation of CHERI and pave the way for potential mass-market adoption. However, for such a major new Machine-learning approaches for the security-oriented architecture feature, it is important to empirical Schrodinger¨ bridge problem establish high confidence that it does provide the pro- tections it intends to, and that cannot be done with con- June 2021, 114 pages, PDF ventional engineering techniques. MPhil thesis (Girton College, 24 June 2020) In this paper we put the Morello architecture on a solid mathematical footing from the outset. We de- Abstract: The Schrodinger¨ bridge problem is con- fine the fundamental security property that Morello cerned with finding the most likely stochastic evo- aims to provide, reachable capability monotonicity, and lution between two probability distributions given a prove that the architecture definition satisfies it. This prior/reference stochastic evolution. This problem was proof is mechanised in Isabelle/HOL, and applies to posed by Schrodinger¨ (1931, 1932) and solved to a a translation of the official Arm Morello specification

282 into Isabelle. The main challenge is handling the com- via learnable weighted pseudodata, termed pseudocore- plexity and scale of a production architecture: 62,000 sets. We show that the use of pseudodata enables over- lines of specification, translated to 210,000 lines of Is- coming the constraints on minimum summary size for abelle. We do so by factoring the proof via a narrow given approximation quality, that are imposed on all abstraction capturing the essential properties of instruc- existing Bayesian coreset constructions due to data tion execution in an arbitrary CHERI ISA, expressed dimensionality. Moreover, it allows us to develop a above a monadic intra-instruction semantics. We also scheme for pseudocoresets-based summarization that develop a model-based test generator, which generates satisfies the standard framework of differential privacy instruction-sequence tests that give good specification by construction; in this way, we can release reduced size coverage, used in early testing of the Morello imple- privacy-preserving representations for sensitive datasets mentation and in Morello QEMU development. We that are amenable to arbitrary post-processing. also use Arm’s internal test suite to validate our internal Subsequently, we consider summarizations for model. large-scale Bayesian inference in scenarios when ob- This gives us machine-checked mathematical proofs served datapoints depart from the statistical assump- of whole-ISA security properties of a full-scale industry tions of our model. Using robust divergences, we de- architecture, at design-time. To the best of our knowl- velop a method for constructing coresets resilient to edge, this is the first demonstration that that is feasible, model misspecification. Crucially, this method is able and it significantly increases confidence in Morello. to automatically discard outliers from the generated data summaries. Thus we deliver robustified scalable UCAM-CL-TR-960 representations for inference, that are suitable for ap- plications involving contaminated and unreliable data Dionysis Manousakas: sources. We demonstrate the performance of proposed sum- Data summarizations for scalable, marization techniques on multiple parametric statis- tical models, and diverse simulated and real-world robust and privacy-aware learning in datasets, from music genre features to hospital read- high dimensions mission records, considering a wide range of data di- mensionalities. September 2021, 130 pages, PDF PhD thesis (Darwin College, October 2020) UCAM-CL-TR-961

Abstract: The advent of large-scale datasets has offered Lawrence G. Esswood: unprecedented amounts of information for building statistically powerful machines, but, at the same time, CheriOS: designing an untrusted also introduced a remarkable computational challenge: how can we efficiently process massive data? This the- single-address-space capability sis presents a suite of data reduction methods that make operating system utilising capability learning algorithms scale on large datasets, via extract- ing a succinct model-specific representation that sum- hardware and a minimal hypervisor marizes the full data collection—a coreset. Our frame- September 2021, 195 pages, PDF works support by design datasets of arbitrary dimen- PhD thesis (Churchill College, July 2020) sionality, and can be used for general purpose Bayesian inference under real-world constraints, including pri- Abstract: This thesis presents the design, implementa- vacy preservation and robustness to outliers, encom- tion, and evaluation of a novel capability operating sys- passing diverse uncertainty-aware data analysis tasks, tem: CheriOS. The guiding motivation behind CheriOS such as density estimation, classification and regression. is to provide strong security guarantees to program- We motivate the necessity for novel data reduction mers, even allowing them to continue to program in techniques in the first place by developing a reidenti- fast, but typically unsafe, languages such as C. Further- fication attack on coarsened representations of private more, it does this in the presence of an extremely strong behavioural data. Analysing longitudinal records of hu- adversarial model: in CheriOS, every compartment – man mobility, we detect privacy-revealing structural and even the operating system itself – is considered ac- patterns, that remain preserved in reduced graph repre- tively malicious. Building on top of the architecturally sentations of individuals’ information with manageable enforced capabilities offered by the CHERI micropro- size. These unique patterns enable mounting linkage at- cessor, I show that only a few more capability types and tacks via structural similarity computations on longitu- enforcement checks are required to provide a strong dinal mobility traces, revealing an overlooked, yet ex- compartmentalisation model that can facilitate mutual isting, privacy threat. distrust. I implement these new primitives in software, We then propose a scalable variational inference in a new abstraction layer I dub the nanokernel. Among scheme for approximating posteriors on large datasets the new OS primitives I introduce are one for integrity and confidentiality called a Reservation (which allows

283 allocating private memory without trusting the alloca- tor), as well as another that can provide attestation about the state of the system, a Foundation (which pro- vides a key to sign and protect capabilities based on a signature of the starting state of a program). I show that, using these new facilities, it is possible to design an operating system without having to trust the imple- mentation is correct. CheriOS is fundamentally fail-safe; there are no as- sumptions about the behaviour of the system, apart from the CHERI processor and the nanokernel, to be broken. Using CHERI and the new nanokernel primi- tives, programmers can expect full isolation at scopes ranging from a whole program to a single function, and not just with respect to other programs but the sys- tem itself. Programs compiled for and run on CheriOS offer full memory safety, both spatial and temporal, enforced control flow integrity between compartments and protection against common vulnerabilities such as buffer overflows, code injection and Return-Oriented- Programming attacks. I achieve this by designing a new CHERI-based ABI (Application Binary Interface) which includes a novel stack structure that offers temporal safety. I evaluate how practical the new designs are by prototyping them and offering a detailed performance evaluation. I also contrast with existing offerings from both industry and academia. CHERI capabilities can be used to restrict access to system resources, such as memory, with the required dynamic checks being performed by hardware in par- allel with normal operation. Using the accelerating fea- tures of CHERI, I show that many of the security guar- antees that CheriOS offers can come at little to no cost. I present a novel and secure IO/IPC layer that allows se- cure marshalling of multiple data streams through mu- tually distrusting compartments, with fine-grained au- thenticated access control for end-points, and without either copying or encryption. For example, CheriOS can restrict its TCP stack from having access to packet contents, or restrict an open socket to ensure data sent on it to arrives at an endpoint signed as a TLS im- plementation. Even with added security requirements, CheriOS can perform well on real workloads. I show- case this by running a state-of-the-art webserver, NG- INX, atop both CheriOS and FreeBSD and show im- provements in performance ranging from 3x to 6x when running on a small-scale low-power FPGA im- plementation of CHERI-MIPS.

284