Continuation-Passing C: compiling threads to events through continuations

Abstract : In this paper, we introduce Continuation Passing C (CPC), a programming language for concurrent systems in which native and cooperative threads are unified and presented to the programmer as a single abstraction. The CPC compiler uses a compilation technique, based on the CPS transform, that yields efficient code and an extremely lightweight representation for contexts. We provide a proof of the correctness of our compilation scheme. We show in particular that lambda-lifting, a common compilation technique for functional languages, is also correct in an imperative language like C, under some conditions enforced by the CPC compiler. The current CPC compiler is mature enough to write substantial programs such as Hekate, a highly concurrent BitTorrent seeder. Our benchmark results show that CPC is as efficient, while using significantly less space, as the most efficient thread libraries available.
Type de document :
Article dans une revue
Higher-Order and Symbolic Computation, Springer Verlag, 2011, 24 (3), pp.239-279. 〈10.1007/s10990-012-9084-5〉
Liste complète des métadonnées

Littérature citée [49 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/inria-00537964
Contributeur : Gabriel Kerneis <>
Soumis le : jeudi 5 juillet 2012 - 16:26:19
Dernière modification le : jeudi 11 janvier 2018 - 06:17:46
Document(s) archivé(s) le : samedi 6 octobre 2012 - 02:45:39

Fichiers

hosc-kerneis-chroboczek.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

Collections

PPS | USPC

Citation

Gabriel Kerneis, Juliusz Chroboczek. Continuation-Passing C: compiling threads to events through continuations. Higher-Order and Symbolic Computation, Springer Verlag, 2011, 24 (3), pp.239-279. 〈10.1007/s10990-012-9084-5〉. 〈inria-00537964v3〉

Partager

Métriques

Consultations de la notice

119

Téléchargements de fichiers

174