Service interruption on Monday 11 July from 12:30 to 13:00: all the sites of the CCSD (HAL, EpiSciences, SciencesConf, AureHAL) will be inaccessible (network hardware connection).
Skip to Main content Skip to Navigation
Preprints, Working Papers, ...

Generating events with style

Abstract : Threads and events are two common abstractions for writing concurrent programs. Because threads are often more convenient, but events more efficient, it is natural to want to translate the former into the latter. However, whereas there are many different event-driven styles, existing translators often apply ad-hoc rules which do not reflect this diversity. We analyse various control-flow and data-flow encodings in real-world event-driven code, and we observe that it is possible to generate any of these styles automatically from threaded code, by applying certain carefully chosen classical program transformations. In particular, we implement two of these transformations, lambda lifting and environments, in CPC, an extension of the C language for writing concurrent systems. Finally, we find out that, although rarely used in real-world programs because it is tedious to perform manually, lambda lifting yields better performance than environments in most of our benchmarks.
Document type :
Preprints, Working Papers, ...
Complete list of metadata

Cited literature [18 references]  Display  Hide  Download
Contributor : Gabriel Kerneis Connect in order to contact the contributor
Submitted on : Wednesday, October 17, 2012 - 3:32:15 PM
Last modification on : Saturday, June 25, 2022 - 8:52:41 PM
Long-term archiving on: : Saturday, December 17, 2016 - 1:55:10 AM


Files produced by the author(s)


  • HAL Id : hal-00742098, version 2
  • ARXIV : 1210.4263



Matthieu Boutier, Gabriel Kerneis. Generating events with style. 2012. ⟨hal-00742098v2⟩



Record views


Files downloads