An equational modeling of asynchronous concurrent programming - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2020

An equational modeling of asynchronous concurrent programming

David Janin

Résumé

Asynchronous concurrent programing is a widely spread technique offering some simple concurrent primitives that are restricted in such a way that the resulting concurrent programs are deadlock free. In this paper, we develop, study and extend a formal model of the underlying application programmer interface. For such a purpose, we formally define the extension of a monad by some notion of monad references uniquely bound to running monad actions together with the associated asynchronous primitives fork and read. The expected semantics is specified via two series of equations relating the behavior of these extension primitives with the underlying monad primitives. Thanks to these equations , we recover a fairly general notion of promises and prove that they induce a monad isomorphic to the underlying monad. We also show how synchronous and asynchronous reactive data flow programming eventually derive from such a formalization of asynchronous concurrency, uniformly lifting fork and read primitives from monadic actions to monadic streams of actions. Our proposal is illustrated throughout by concrete extensions of Haskell IO monad that allows for proving the soundness of the proposed equations and the applicability of the resulting API.
Fichier principal
Vignette du fichier
Janin-TFP2020.pdf (265.62 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-02865894 , version 1 (12-06-2020)

Identifiants

  • HAL Id : hal-02865894 , version 1

Citer

David Janin. An equational modeling of asynchronous concurrent programming. 21st International Symposium on Trends in Functional Programming, Aleksander Byrski and John Hugues, Feb 2020, Krakow, Poland. ⟨hal-02865894⟩

Collections

CNRS
69 Consultations
284 Téléchargements

Partager

Gmail Facebook X LinkedIn More