Continuation-passing C, compiling threads to events through continuations
From MaRDI portal
Publication:1929338
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.
Recommendations
Cites work
- scientific article; zbMATH DE number 1942456 (Why is no real title available?)
- scientific article; zbMATH DE number 2087570 (Why is no real title available?)
- A poor man's concurrency monad
- Call-by-name, call-by-value and the \(\lambda\)-calculus
- Continuation-passing C, compiling threads to events through continuations
- Continuations revisited
- Continuations: A mathematical semantics for handling full jumps
- Correspondence between ALGOL 60 and Church's Lambda-notation
- Implementing first-class polymorphic delimited continuations by a type-directed selective CPS-transform
- Linear continuation-passing
- Monitors
- Scala actors: Unifying thread-based and event-based programming
- Specification and correctness of lambda lifting This material is based upon work supported by the National Science Foundation under Grant No. 9900918.
- Trampolined style
Cited in
(2)
This page was built for publication: Continuation-passing C, compiling threads to events through continuations
Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q1929338)