Workshop Icon
WORKSHOPS

Data-race Freedom by Construction, with OxCaml

OCaml, Parallel Programming, Type Systems

Max. Attendees: 25

Multicore programming has been a major driver of performance gains, but data races remain a persistent headache: programs fail non-deterministically despite analysis and testing tools. Ever since OCaml 5 introduced shared-memory parallelism, this concern has affected OCaml programmers as well.

OxCaml is a set of OCaml extensions developed by Jane Street for performance-oriented programming. Among its many additions is a mode system, inspired by Rust's ownership and borrowing model. Part of this mode system is designed to ensure data-race freedom: it rules out data races at compile time.

Workshop Plan

  • Run your first parallel OCaml programs across multiple domains and intentionally trigger data races.
  • Learn about the portability and contention mode axes and use them to rule out data races at compile time.
  • Share mutable state safely with atomics and capsules, without giving up the data-race-freedom guarantee.

Key Takeaways

  • Get a clear picture of what a data race is, and why these bugs are so good at slipping past your tests.
  • See the compiler catch data races at compile time, no runtime tools needed.
  • Leave curious about mode systems: alongside types, which say what a value is, they track how a value can be used.

Requirements for attendees

Knowledge Requirements

Familiarity with OCaml syntax is helpful but not required: exercises are well commented and ask for minimal code writing so that OCaml beginners can follow most of them. No prior experience with OxCaml or multicore OCaml is needed.

Technical Requirements

The environment is provided as a devcontainer, runnable through Codespaces, which is the recommended setup. No local setup is required: it works entirely in the browser. Attendees just need a modern browser and a free GitHub account.

The same devcontainer can also be run locally on Linux or Mac OS for those who prefer it, but this requires Docker installed, plus either VS Code with the Dev Containers extension or the devcontainer CLI.

Target Audience

Developers curious about safe parallel programming and type-system approaches to data-race freedom. Useful for anyone interested in OCaml, OxCaml, or how Rust-style ownership ideas transfer to other languages.

Canela Workshop

€50

Free registration for general ticket holders