System Capybara: Capture Tracking for Ownership and Borrowing
Ownership and borrowing principles are powerful tools for preventing unintended aliasing, enabling safe memory management, data-race-free concurrency, and more. These principles, popularized by Rust, are often seen as too rigid to be integrated into mainstream languages like Scala without disrupting existing codebases.
System Capybara introduces flexible and expressive ownership tracking to Scala by extending capture checking, a recently introduced system for effect and capability tracking. It enriches capture checking with alias prevention guarantees, enabling fine-grained control over exclusive resources such as mutable buffers and file handles—while staying lightweight and flexible.
The talk presents System Capybara in three parts: (1) a brief overview of the problem and background; (2) a quick walkthrough of how capture checking can serve as a foundation for alias tracking; and (3) an introduction to System Capybara’s key ideas. This part is interactive, with examples presented in Cavia, a prototype compiler that implements System Capybara in a Scala-like language.
| Paper (capybara.pdf) | 486KiB |
Tue 14 OctDisplayed time zone: Perth change
10:50 - 12:05 | Capabilities and ownership in ScalaThe Scala Workshop 2025 / IWACO at Peony NE Chair(s): Oliver Bračevac EPFL, LAMP, Hamza Remmal EPFL, LAMP | ||
10:50 35mKeynote | Where Are We With Scala's Capabilities? The Scala Workshop 2025 File Attached | ||
11:25 20mTalk | System Capybara: Capture Tracking for Ownership and Borrowing The Scala Workshop 2025 File Attached | ||
11:45 20mTalk | Capability-Safe Erasure in ScalaRemote The Scala Workshop 2025 File Attached | ||