Cosmo: A Concurrent Separation Logic for Multicore OCaml - INRIA - Institut National de Recherche en Informatique et en Automatique Accéder directement au contenu
Article Dans Une Revue Proceedings of the ACM on Programming Languages Année : 2020

Cosmo: A Concurrent Separation Logic for Multicore OCaml

Résumé

Multicore OCaml extends OCaml with support for shared-memory concurrency. It is equipped with a weak memory model, for which an operational semantics has been published. This begs the question: what reasoning rules can one rely upon while writing or verifying Multicore OCaml code? To answer it, we instantiate Iris, a modern descendant of Concurrent Separation Logic, for Multicore OCaml. This yields a low-level program logic whose reasoning rules expose the details of the memory model. On top of it, we build a higher-level logic, Cosmo, which trades off some expressive power in return for a simple set of reasoning rules that allow accessing nonatomic locations in a data-race-free manner, exploiting the sequentially-consistent behavior of atomic locations, and exploiting the release/acquire behavior of atomic locations. Cosmo allows both low-level reasoning, where the details of the Multicore OCaml memory model are apparent, and high-level reasoning, which is independent of this memory model. We illustrate this claim via a number of case studies: we verify several implementations of locks with respect to a classic, memory-model-independent specification. Thus, a coarse-grained application that uses locks as the sole means of synchronization can be verified in the Concurrent-Separation-Logic fragment of Cosmo, without any knowledge of the weak memory model.
Fichier principal
Vignette du fichier
mevel2020cosmo.pdf (866.82 Ko) Télécharger le fichier
Origine : Fichiers éditeurs autorisés sur une archive ouverte
Loading...

Dates et versions

hal-02929998 , version 1 (04-09-2020)

Identifiants

Citer

Glen Mével, Jacques-Henri Jourdan, François Pottier. Cosmo: A Concurrent Separation Logic for Multicore OCaml. Proceedings of the ACM on Programming Languages, 2020, 4 (ICFP), ⟨10.1145/3408978⟩. ⟨hal-02929998⟩
128 Consultations
68 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More