Publications [publications]
Various talks, papers and preprints.
Published
Conference Papers
Reference. Package Managers à la Carte [pkg-calc2026gibb]
- 2026
- Ryan T. Gibb, Patrick Ferris, David Allsopp, Thomas Gazagnaire, Anil Madhavapeddy
- 10.1145/3828699
- https://doi.org/10.1145/3828699
Abstract
- 2026
- Ryan T. Gibb, Patrick Ferris, David Allsopp, Thomas Gazagnaire, Anil Madhavapeddy
Package managers are legion. Every programming language and operating system has its own solution, each with subtly different semantics for dependency resolution. This fragmentation prevents multilingual projects from expressing precise dependencies across language ecosystems; it leaves external system dependencies implicit and unversioned; and it obscures the full dependency graph that supply-chain analysis depends on. We present the Package Calculus, a formalism for dependency resolution that unifies the core semantics of package managers. Through a series of formal reductions, we show how this core is expressive enough to model the diversity of real-world dependency expression languages. The calculus provides the theoretical foundation for future cross-ecosystem tooling, as a lingua franca of dependency expression.
Reference. Functional Networking for Millions of Docker Desktops (Experience Report) [madhavapeddy2025docker]
- 2025
- Anil Madhavapeddy, David J. Scott, Patrick Ferris, Ryan T. Gibb, Thomas Gazagnaire
- 10.1145/3747525
- https://dl.acm.org/doi/10.1145/3747525
Abstract
- 2025
- Anil Madhavapeddy, David J. Scott, Patrick Ferris, Ryan T. Gibb, Thomas Gazagnaire
Docker is a developer tool used by millions of developers to build, share and run software stacks. The Docker Desktop clients for Mac and Windows have long used a novel combination of virtualisation and OCaml unikernels to seamlessly run Linux containers on these non-Linux hosts. We reflect on a decade of shipping this functional OCaml code into production across hundreds of millions of developer desktops, and discuss the lessons learnt from our experiences in integrating OCaml deeply into the container architecture that now drives much of the global cloud. We conclude by observing just how good a fit for systems programming that the unikernel approach has been, particularly when combined with the OCaml module and type system.
Workshop Papers
Reference. Generating a corpus of Hazel programs from ill-typed OCaml programs [ferris2025hazel_of_ocaml]
- 2025
- Patrick Ferris, Anil Madhavapeddy
- https://patrick.sirref.org/var/tyde2025.pdf
Abstract
- 2025
- Patrick Ferris, Anil Madhavapeddy
When developing a new programming language, having a large corpus of both correct and incorrect programs allows language designers to test and explore the capabilities of their new language. However, bootstrapping such a corpus of incorrect programs is time-consuming and arduous. We therefore explore how to reuse code from more mature languages to generate a corpus of ill-typed code for newer ones. We have developed a compiler to Hazel, an emerging language with typed holes, from the more mature OCaml ecosystem. We find it practical to generate a comprehensive corpus of ill-typed programs for Hazel development, and discuss future larger scale efforts towards bridging ecosystems.
Reference. Decomposable Type Highlighting for Bidirectional Type and Cast Systems [carroll2025decomposable_type_highlighting]
- 2025
- Max Carroll, Anil Madhavapeddy, Patrick Ferris
- https://maxcarroll0.github.io/papers/workshops/HATRA-decomposable-type-highlighting/
Abstract
- 2025
- Max Carroll, Anil Madhavapeddy, Patrick Ferris
We explore how to provide programmers with an interactive interface for explaining the process by which static types and dynamic casts are derived, with the goal of improving the debugging of static and dynamic type errors. To this end, we define mathematical foundations for a decomposable highlighting system within a bidirectional system, and show how these can be propagated through dynamic types in a cast system. Our prototype implementation in the gradually typed Hazel language includes a web-based user interface, through which we highlight the importance of type level debugging.
Reference. Yirgacheffe: A Declarative Approach to Geospatial Data [dales2025yirgacheffe]
- 2025
- Michael Winston Dales, Alison Eyres, Patrick Ferris, Francesca A. Ridley, Simon Tarr, Anil Madhavapeddy
- 10.1145/3759536.3763806
- https://dl.acm.org/doi/10.1145/3759536.3763806
Abstract
- 2025
- Michael Winston Dales, Alison Eyres, Patrick Ferris, Francesca A. Ridley, Simon Tarr, Anil Madhavapeddy
We present Yirgacheffe, a declarative geospatial library that allows spatial algorithms to be implemented concisely, supports parallel execution, and avoids common errors by automatically handling data (large geospatial rasters) and resources (cores, memory, GPUs). Our primary user domain comprises ecologists, where a typical problem involves cleaning messy occurrence data, overlaying it over tiled rasters, combining layers, and deriving actionable insights from the results. We describe the successes of this approach towards driving key pipelines related to global biodiversity and describe the capability gaps that remain, hoping to motivate more research into geospatial domain-specific languages.
Reference. Modularizing Reasoning about AI Capabilities via Abstract Dijkstra Monads [omar2024bastion]
- 2024
- Cyrus Omar, Patrick Ferris, Anil Madhavapeddy
- https://icfp24.sigplan.org/home/hope-2024
Abstract
- 2024
- Cyrus Omar, Patrick Ferris, Anil Madhavapeddy
The proposed talk will outline the vision for a recently originated research project aiming to build a formally verified prototype of a foundational "operating system" for safeguarded AI, called Bastion, that grounds these activities within programming language theory, namely by combining dependent type theory (as a practical general-purpose theory of computational structures and proofs), Dijkstra monads (as a flexible formalism for reasoning about an AI agent's computational effects), and abstract types (for modularizing reasoningto individual components that can be separately developed by various stakeholders, including AI safety researchers, formal methods experts, organizations of various scales, and governments seeking to develop actionable, specific policy).
Reference. Carbon-Aware Name Resolution [gibb2024carbonaware]
- 2024
- Ryan Gibb, Patrick Ferris, Anil Madhavapeddy
- https://www.sicsa.ac.uk/wp-content/uploads/2024/11/LOCO2024_paper_28.pdf
Abstract
- 2024
- Ryan Gibb, Patrick Ferris, Anil Madhavapeddy
The current Internet architecture fails to treat the carbon emissions associated with networked services as a first-class metric. We propose extending the DNS with load balancing techniques to consider the carbon cost of scheduling decisions, and further to actively wake machines running networked services as a side effect of name resolution. By extending the DNS, we maintain compatibility with existing Internet infrastructure, unlocking the ability for existing applications to be carbon-aware.
Reference. Lineage first computing: towards a frugal userspace for Linux [dales2024frugallinux]
- 2024
- Michael Dales, Patrick Ferris, Anil Madhavapeddy
- https://www.sicsa.ac.uk/wp-content/uploads/2024/11/LOCO2024_paper_30.pdf
Abstract
- 2024
- Michael Dales, Patrick Ferris, Anil Madhavapeddy
Data-science is a vital tool in tackling the ongoing climate crisis, but it is one that has a significant cost to it also, in terms of energy used during execution and in terms of significant hardware investment required to run it. These are then amplified considerably in the exploratory nature of scientific research.We argue this is because the affordances of the operating system, particularly filesystems, make little effort to support reuse of computed artifacts directly or promote reuse through trusted lineage data. However, it turns out that many of the userspace interfaces exposed by the Linux kernel entirely support a radically more efficient -- a more frugal -- model of computation than is currently the default. In this talk, we explore a new OS architecture which defaults to deterministic, reusable computation with the careful recording of side effects. This in turn allows the OS to guide complex computations towards previously acquired intermediate results, but still allowing for recomputation when required. We use these interfaces to build a new Linux userspace where we put the workflow graph-containing relationships between tools, provenance and labelling-as the core of a system that drives how processes, data, and users interact. Our prototype shell, dubbed Shark, is a data-science first operating environment that is designed to both ensure efficient use of computation and storage resources, and to make it easy for non-experts to create pipeline descriptions from end results post-hoc. It does this by making the lineage graph of a data-pipeline the key concept that ties everything else together: by tracking how the data-pipeline evolves from experimental practice, and tracking what data has already been built and what hasn't we can prevent re-execution both at development and after publication.
Reference. Emission Impossible: privacy-preserving carbon emissions claims [man2024emissionimpossible]
- 2024
- Jessica Man, Sadiq Jaffer, Patrick Ferris, Martin Kleppmann, Anil Madhavapeddy
- https://www.sicsa.ac.uk/wp-content/uploads/2024/11/LOCO2024_paper_35.pdf
Abstract
- 2024
- Jessica Man, Sadiq Jaffer, Patrick Ferris, Martin Kleppmann, Anil Madhavapeddy
In this talk we will explore: (i) how the conflicting incentives around carbon emissions reporting make existing systems unlikely to succeed; and (ii) how we could use ZKPs to allow for the accurate reporting of carbon claims without compromising on individual privacy and competitiveness requirements.
Reference. Eio 1.0-effects-based IO for OCaml 5 [leonard2023eio]
Abstract
- 2023
- Thomas Leonard, Patrick Ferris, Christiano Haesbaert, Lucas Pluvinage, Vesa Karvonen, Sudha Parimala, K Sivaramakrishnan, Vincent Balat, Anil Madhavapeddy
Eio provides an effects-based direct-style IO stack for OCaml 5. This talk introduces Eio's main features, such as use of effects, multicore support and lock-free data-structures, support for modular programming, interoperability with other concurrency libraries such as Lwt, Async and Domainslib, and interactive monitoring support enabled by the custom runtime events in OCaml 5.1. We will report on our experiences porting existing applications to Eio.
Reference. Continuous Monitoring of OCaml Applications using Runtime Events [jaffer2022runtimeevents]
- 2022
- Sadiq Jaffer, Patrick Ferris
- https://icfp22.sigplan.org/details/ocaml-2022-papers/7/Continuous-Monitoring-of-OCaml-Applications-using-Runtime-Events
Abstract
- 2022
- Sadiq Jaffer, Patrick Ferris
The upcoming 5.0 release of OCaml includes a new runtime tracing system designed for continuous monitoring of OCaml applications called Runtime Events. It enables very low overhead, programmatic access to performance data emitted by the OCaml runtime and garbage collector. This talk focuses on the implementation of Runtime Events and the user experience of writing applications exploiting this new feature.
Misc.
Reference. What we talk about when we talk about scientific programming [ferris2025scientific_programming]
- 2025
- Patrick Ferris
- https://watch.eeg.cl.cam.ac.uk/w/aYXqXLtgQawYMjVXjSQtjx
Abstract
- 2025
- Patrick Ferris
Programming for the planet undoubtedly involves programming scientifically, but what kind of programming are we talking about and what makes it scientific? In what ways does it differ from other forms of programming, if at all? Is scientific programming, data science or machine learning fundamentally different to constructing a compiler or building a high-throughput web server? By considering how the scientific method (with its falsifiable hypotheses and repeatable and reproducible experiments) relates to scientific programming, I hope to explore how computer science and traditional programming techniques are coming up short in meeting the requirements of scientific programmers.
Reference. Global, robust and comparable digital carbon assets [jaffer2024global]
- 2024
- Sadiq Jaffer, Michael Dales, Patrick Ferris, Derek Sorensen, Thomas Swinfield, Robin Message, Srinivasan Keshav, Anil Madhavapeddy
- 10.1109/ICBC59979.2024.10634343
Abstract
- 2024
- Sadiq Jaffer, Michael Dales, Patrick Ferris, Derek Sorensen, Thomas Swinfield, Robin Message, Srinivasan Keshav, Anil Madhavapeddy
Carbon credits purchased in the voluntary carbon market allow unavoidable emissions, such as international flights for essential travel, to be offset by an equivalent climate benefit, such as avoiding emissions from tropical deforestation. However, many concerns regarding the credibility of these offsetting claims have been raised. Moreover, the credit market is manual, therefore inefficient and unscalable, and non-fungible, therefore illiquid. To address these issues, we propose an efficient digital methodology that combines remote sensing data, modern econometric techniques, and on-chain certification and trading to create a new digital carbon asset (the PACT stablecoin) against which carbon offsetting claims can be transparently verified. PACT stablecoins are produced as outputs from a reproducible computational pipeline for estimating the climate benefits of carbon offset projects that not only quantifies the CO2 emissions involved, but also allows for similar credits to be pooled based on their co-benefits such as biodiversity and jurisdictional attributes, increasing liquidity through fungibility within pools. We implement and evaluate the PACT carbon stablecoin on the Tezos blockchain, which is designed to facilitate low-cost transactions while minimizing environmental impact. Our implementation includes a contract for a registry for tracking issuance, ownership, and retirement of credits, and a custodian contract to bridge on-chain and off-chain transactions. Our work brings scale and trust to the voluntary carbon market by providing a transparent, scalable, and efficient framework for high-integrity carbon credit transactions.
Preprints
Reference. Planetary computing for data-driven environmental policy-making [ferris2023planetary]
- 2023
- Patrick Ferris, Michael Dales, Sadiq Jaffer, Amelia Holcomb, Eleanor Scott, Thomas Swinfield, Alison Eyres, Andrew Balmford, David Coomes, Srinivasan Keshav, Anil Madhavapeddy
- 10.48550/arXiv.2303.04501
Abstract
- 2023
- Patrick Ferris, Michael Dales, Sadiq Jaffer, Amelia Holcomb, Eleanor Scott, Thomas Swinfield, Alison Eyres, Andrew Balmford, David Coomes, Srinivasan Keshav, Anil Madhavapeddy
We make a case for planetary computing -- infrastructure to handle the ingestion, transformation, analysis and publication of global data products for furthering environmental science and enabling better informed policy-making. We draw on our experiences as a team of computer scientists working with environmental scientists on forest carbon and biodiversity preservation, and classify existing solutions by their flexibility in scalably processing geospatial data, and also how well they support building trust in the results via traceability and reproducibility. We identify research gaps in the intersection of computing and environmental science around how to handle continuously changing datasets that are often collected across decades and require careful access control rather than being fully open access.
Reference. PACT Tropical Moist Forest Accreditation Methodology v2.0 [balmford2023pact]
- 2023
- Andrew Balmford, David Coomes, Michael Dales, Patrick Ferris, James Hartup, Sadiq Jaffer, Srinivasan Keshav, Miranda Lam, Anil Madhavapeddy, Robin Message
- 10.33774/coe-2023-g584d-v5
Abstract
- 2023
- Andrew Balmford, David Coomes, Michael Dales, Patrick Ferris, James Hartup, Sadiq Jaffer, Srinivasan Keshav, Miranda Lam, Anil Madhavapeddy, Robin Message
This draft document describes the methodology developed by the Cambridge Center for Carbon Credits (4C) for estimating the number of credits to be issued to a project in the tropical moist forest (TMF) biome. It expands on the methodology outlined in (Swinfield and Balmford, 2023). We welcome comments and suggestions in the associated online document at https://tinyurl.com/cowgreport.