Computer Laboratory

OCaml Labs

The OCaml Labs are organised around focussed projects summarised below. Click on the heading for more information, and get in touch with the project owner if you'd like to know more. The projects are:

  • OCaml Platform: A rigorously designed, tested and documented base of OCaml libraries and tools.
  • Mirage OS: A high-performance, type-safe library OS written in OCaml.
  • Illuminate: Connecting cyber-physical devices with rigorous programming, coordination and persistence.
  • The OCaml Compiler: Maintaining, extending and documenting the core OCaml compiler toolchain
  • Trilogy 2: Building a resilient liquid OS, with multipath and adaptive scheduling.
  • Community Outreach: Building an effective online presence for the worldwide OCaml community

OCaml Platform »

The OCaml Platform combines the core OCaml compiler with a coherent set of libraries, tools and documentation. The requirements and direction of the Platform are initially being guided by large users of OCaml such as Jane Street, Citrix and Lexifi.

The reason for initially taking direction from industrial users is because these companies have a great deal of experience of using the language at scale (e.g millions of lines of code, thousands of modules and complicated testing requirements). We take a pragmatic view that examining and solving the problems such users have will ultimately result in a large and positive impact on the wider community, through significantly improved tooling, libraries and documentation.

The current thrust of work is to improve the tooling around packaging, build and test infrastructure. Once complete, this will enable us to effectively run over hundreds of community packages and determine selection criteria for the Platform. A key aspect of this selection will be which libraries are already popular and in use, and also how actively maintained and portable they are across different operating systems.

The tasks below reflect this by:

  • The OPAM package manager acts as the package management front end.
  • The OPAM Doc tool replaces the venerable ocamldoc tool with modern, cross-referenced HTML output across several libraries.
  • The OCamlot testing infrastructure runs continuous integration of OPAM stable and candidate packages across a variety of operating systems and CPU architectures.

The mailing list for discussion about this is platform@lists.ocaml.org (archive).

Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Thomas Gazagnaire OPAM 1.0 (if it builds, ship it)
Thomas Gazagnaire OPAM 1.1 (the CI and Test release)
Thomas Gazagnaire OPAM 1.2 (the Platform release)
Thomas Gazagnaire OPAM-in-a-box
Vincent Botbol OPAMDoc prototype
David Sheets OCamlot 0.2.0
David Sheets OCamlot 0.3.0
Anil Madhavapeddy Non-x86 Machine Pool
Amir Chaudhry Platform Preview
Jeremy Yallop Ctypes
Jeremy Yallop Ctypes stub generation
 

Mirage OS »

The cloud has so far mostly been used to consolidate existing operating systems and manage them more conveniently. The interface between guest kernels, applications and VMs are all managed very differently, leading to serious inefficiencies, unreliability and insecurity. Mirage OS revisits the library OS concept (built here as Nemesis in the late '90s), and narrows the gap between safe, high-level programming, and low-level systems construction.

Applications are written in high-level OCaml and compiled directly into microkernels that run on the Xen hypervisor. By treating the hypervisor as a stable hardware platform, we can focus on high-performance protocol implementations without worrying about having to support the thousands of device drivers found in a traditional OS. Although Mirage initially targets the Xen hypervisor, other backends, such as a FreeBSD kernel module and Javascript, also exist.

Mirage includes clean-slate functional implementations of protocols ranging from TCP/IP, DNS, SSH, Openflow (switch/controller), HTTP, XMPP and Xen inter-VM transports. Some of the new applications we're building using Mirage include the next-generation Xen Cloud Platform (a widely deployed open-source Xen distribution), dubbed Project Windsor.

Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Anil Madhavapeddy Unikernel Mirage prototype
Amir Chaudhry Xen.org incubation
Vincent Bernardoff Mirari
Dave Scott Mirage Developer Preview
Anil Madhavapeddy Mirage 1.0
Balraj Singh Formalisms for packet processing
Gabor Pali kFreeBSD
Bogdan-Alexandru Matican Nigori
 

Illuminate »

Embedded computer systems that are low-power, physically mobile, and which contain actuators and sensors to interface and influence the "real world" are becoming increasingly common.
Many people are referring to this collectively as the "Internet of Things". We're building the core technology to make these distributed devices fundamentally more secure, reliable and easier to program. This consists of three main bits of technology:

  • The Mirage OS (described separately) to build specialised, type-safe embedded images.
  • The Signposts coordination system for embedded devices to find each other securely across a complex edge network.
  • The Irminsule (described in T2) persistent storage system to provide a flexible coordination workflow across such sensors.

A key first use case for here is revolutionising lighting systems. Over the next decade or so, lighting systems in buildings all over the world will shift to using more energy efficient LEDs in place of traditional tungsten bulbs or fluorescent tubes. As well as the important reduction in energy usage, this transition opens up unprecedented opportunities for both lighting circuit design and embedded systems.

Due to the nature of LEDs, it's feasible to consider deploying ubiquitous sensor networks alongside the LED lighting in a building. Since issues of power and communication are straightforward to tackle, such a network would allow completely new types of applications and services to be developed. In addition, there would also be a dramatic impact on the relationship between people and the building.

We're creating this platform to allow others to build technology and services based on such distributed networks. Such a platform tackles the questions surrounding security, reliability, and accountability while working with industry to enable new services.

Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Heidi Howard Signpost prototype
Daniel Bünzli Declarative graphing library
Anil Madhavapeddy Raspberry OCaml
 

The OCaml Compiler »

We are working on maintaining and extending the core OCaml compiler toolchain and runtime. This consists of a variety of day-to-day tasks such as submitting bug fixes, and also longer-term improvements to the type system and runtime libraries (see below).

We are actively engaging with the wider OCaml community to ensure that any improvements and modifications we propose are thoroughly discussed, well-formulated and maintainable.

Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Leo White Open types
Leo White Record disambiguation
Leo White Syntax extensions
Leo White Namespaces plan
Stephen Dolan Multicore
plan?
Jeremy Yallop Compile-time meta programming
plan?
Mark Shinwell Emission of DWARF debugging information
Xavier Clerc OCaml Java 2.0 preview
 

Trilogy 2 »

Trilogy2 aims to develop a new Internet architecture based on the concept of the liquid network. A liquid system should ideally allow resources including bandwidth, storage and processing to be used by any application, whether they are contributed by network operators, data centre operators or end systems. Resources form a shared pool and applications can scale up and down in multiple dimensions (storage, processing, bandwidth and energy usage) as needed, in a continuous effort to enhance the users’ experience as measured in terms of key metrics such as delay and battery life.

The Cambridge participation is primarily centered around three efforts:

  • The Mirage library operating system that provides the policy-free mechanism to implement the liquid OS.
  • A highly adaptive PVTCP transport protocol that takes advantage of heterogenous network connections.
  • The Irminsule storage substrate that cleanly separates block storage form

Trilogy 2 is a 3-year EU STREP project that addresses the "Pervasive and Trusted Network and Service Infrastructures: Future Networks" challenge. The tasks below and include our collaborators at OnApp.

Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Vsevolod Stakhov Polyversal TCP prototype
Thomas Gazagnaire Irminsule prototype
 

Community Outreach »

Growing a language community is more than just technology; we also need a better online presence, documentation and educational material. We're working on an O'Reilly book about practical OCaml programming, as well as a comprehensive revamp of the website to include features such as the interactive TryOCaml Javascript toplevel.

Much of this work is done in collaboration with members of the wider OCaml community such as Ashish Agarwal and Christophe Troestler, and not just from the Cambridge group.

Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Anil Madhavapeddy Real World OCaml
Anil Madhavapeddy Book review site
Philippe Wang Meta preprocessor
Philippe Wang Markdown processor
Anil Madhavapeddy OCaml.org infrastructure
Amir Chaudhry OCaml.org redesign
Jeremy Yallop FPDays tutorial