Capture Tracking
Capture Tracking uses object capabilities tracked in types to unify effect and resource ownership systems. It was the main topic of my PhD and a subject of a long collaboration with Martin Odersky, Jonathan Brachthäuser, Ondřej Lhoták, and Edward Lee. A number of other people have contributed to the project, including Yichen Xu and Oliver Bračevac.
I’m no longer directly involved in the effort. For more up-to-date information, try the Capture Checking website. Oliver Bračevac’s Scala Days 2025 presentation also shows a number of more recent developments in detail.
My contributions, presented in my thesis, were centered around the formal foundations for the approach. The foundational formal system I was involved with is CC<:◻, published in TOPLAS 2023. My thesis also discusses other developments which led to CC<:◻.
I also proposed Gradient, a Scala extension for gradually securing and compartmentalizing existing applications via object capabilities tracked in types. The associated paper was published at OOPSLA 2024; the OOPSLA presentation gives an accessible overview.
An algorithmic version of CC<:◻ is discussed in a technical report.
By the time I wrote my thesis, the Scala implementation was developed first and foremost by Martin Odersky. See the official documentation here.
The implementation was extended with a number of features since my thesis, which led to System Capless, an updated formal foundation for the system published at OOPSLA 2025.
System Capybara extends Capture Tracking with safe concurrency features, as presented on its project page. A formal system from which System Capybara evolved was published at OOPSLA 2024.
Gears is an ongoing project to extend Scala with structured async computation in direct style, with one-shot continuations as a primitive. See the project website here.
Martin Odersky’s ongoing Caprese project aims to further develop both the formal foundations and the practical applications of Capture Tracking. The particular questions include (1) How to solve the “what color is your function” problem when mixing synchronous and asynchronous programming? (2) How to express effect polymorphism without creating boilerplate? (3) How to combine manual and automatic memory management? (4) How to express high-level concurrency and parallelism, safely? (5) How to migrate large existing code bases to the new system? See the slide deck here.