Kindly bent to free us - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Proceedings of the ACM on Programming Languages Année : 2020

Kindly bent to free us

Résumé

Systems programming often requires the manipulation of resources like file handles, network connections, or dynamically allocated memory. Programmers need to follow certain protocols to handle these resources correctly. Violating these protocols causes bugs ranging from type mismatches over data races to use-after-free errors and memory leaks. These bugs often lead to security vulnerabilities. While statically typed programming languages guarantee type soundness and memory safety by design, most of them do not address issues arising from improper handling of resources. An important step towards handling resources is the adoption of linear and affine types that enforce single-threaded resource usage. However, the few languages supporting such types require heavy type annotations. We present Affe, an extension of ML that manages linearity and affinity properties using kinds and constrained types. In addition Affe supports the exclusive and shared borrowing of affine resources, inspired by features of Rust. Moreover, Affe retains the defining features of the ML family: it is an impure, strict, functional expression language with complete principal type inference and type abstraction. Affe does not require any linearity annotations in expressions and supports common functional programming idioms.
Fichier principal
Vignette du fichier
1908.09681.pdf (866.72 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-02938020 , version 1 (14-09-2020)

Identifiants

Citer

Gabriel Radanne, Hannes Saffrich, Peter Thiemann. Kindly bent to free us. Proceedings of the ACM on Programming Languages, 2020, 4 (ICFP), pp.1-29. ⟨10.1145/3408985⟩. ⟨hal-02938020⟩
113 Consultations
80 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More