Conference Papers Year : 2024

Designing interrupts for ML and OCaml

Leo White
Stephen Dolan

Abstract

This talk reports on ongoing work to propose a sound design for asynchronous exceptions (or interrupts, in ML parlance) in the OCaml language, inspired by fault-tolerance concepts and Rust's design for exceptions.

We first describe the problems of recovering from interrupts in Standard ML and OCaml, and how these language deficiencies have been worked around, notably in the implementation of proof assistants and other interactive tools.

We then aim to explain more conceptually how safe interrupt handling is possible by evolving ML exceptions. We emphasize key notions: exception-safety concepts originating from C++ and Rust's extension of Erlang's "let it fail" approach to shared mutable state. Lastly we will discuss considerations specific to the OCaml language.

This work suggests, in the spirit of structured programming, that while the ML notion of exception lacks structure, it refines into better-structured abstractions for error handling, suggested by its relevant usage by programmers.

Fichier principal
Vignette du fichier
mlworkshop_2024_panics.pdf (120.61 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04860321 , version 1 (31-12-2024)

Licence

Identifiers

Cite

Guillaume Munch-Maccagnoni, Leo White, Stephen Dolan. Designing interrupts for ML and OCaml. ML 2024 - ACM SIGPLAN Workshop on ML Family Workshop Higher-order, Typed, Inferred, Strict, Troels Henriksen, Sep 2024, Milan, Italy. ⟨10.1007/11818502_15⟩. ⟨hal-04860321⟩
14 View
5 Download

Altmetric

Share

More