Backwards-Compatible Row-Based Exceptions in ML
Simcha van Collem, Paulo Emílio de Vilhena, Robbert Krebbers
Abstract
We introduce a type system that provides strong types for exception tracking in ML-style languages. Our type system employs a rich notion of row polymorphism and subtyping to ensure backwards compatibility, making sure that code without exception tracking continues to work and can be generalized gracefully to support exception tracking. We study the safety and abstraction guarantees of our type system, in particular the role of local exceptions for data abstraction. We formulate these claims using binary logical relations in a novel relational separation logic for exceptions, an independent contribution of this paper. We support a realistic subset of features from ML-style languages, such as extensible variant types, local exceptions, and concurrency. We exercise our type system and logic on a number of challenging examples taken from the OCaml standard library, from one of Jane Street’s OCaml libraries, and from Filinski’s PhD thesis. All our results are mechanized in the Rocq prover using Iris.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 7cf8a492-afed-4e4b-90ba-5778bb3acf72Builds on10
- Binders by day, labels by night: effect instances via lexically scoped handlersDariusz Biernacki, Maciej Piróg, Piotr Polesiuk, Filip SieczkowskiPOPL 2020 · 46 citations
- The next 700 relational program logicsKenji Maillard, Catalin Hritcu, Exequiel Rivas, Antoine Van MuylderPOPL 2020 · 41 citations
- Graduality and parametricity: together again for the first timeMax S. New, Dustin Jamner, Amal AhmedPOPL 2020 · 36 citations
- Simuliris: a separation logic framework for verifying concurrent program optimizationsLennard Gäher, Michael Sammler, Simon Spies, Ralf Jung et al.POPL 2022 · 33 citations
- A separation logic for effect handlersPaulo Emílio de Vilhena, François PottierPOPL 2021 · 24 citations
Related papers
- TypeDis: A Type System for DisentanglementAlexandre Moine, Stephanie Balzer, Alex Xu, Sam WestrickPOPL 2026 · 1 citation
- A Relational Separation Logic for Effect HandlersPaulo Emílio de Vilhena, Simcha van Collem, Ines Wright, Robbert KrebbersPOPL 2026 · 3 citations
- Lawyer: Modular Obligations-Based Liveness Reasoning in Higher-Order Impredicative Concurrent Separation LogicEgor Namakonov, Justus Fasse, Bart Jacobs, Lars Birkedal et al.OOPSLA 2026
- Extensible Data Types with Ad-Hoc PolymorphismMatthew Toohey, Yanning Chen, Ara Jamalzadeh, Ningning XiePOPL 2026 · 1 citation
- Deadlock-Free Separation Logic: Linearity Yields Progress for Dependent Higher-Order Message PassingJules Jacobs, Jonas Kastberg Hinrichsen, Robbert KrebbersPOPL 2024 · 12 citations
