A reactive computation exchanges events with the environment in which the computation runs. Reactive computations execute with concurrency, but many compilers for reactive languages attempt to improve execution performance by generating purely sequential code.
This paper presents a tutorial survey of the techniques used by ten compilers that produce sequential code from reactive computations; the compilers represent seven reactive programming languages. The principle areas surveyed in each compiler are the translation from high-level to low-level concurrency, and the accompanying intermediate representation, the analysis used to reconfigure available concurrency, and code generation techniques. Code generation is presented in terms of partial evaluation on interpreters for the intermediate code.
The author’s stated objective for this paper is to motivate work on combining the disparate techniques used by current compilers into a single compiler. This objective might have been better served if the paper’s structure had been inverted: rather than have a single section on each compiler, the author should have devoted a section to each compilation technique, with examples drawn from current compilers. As it stands, however, the paper fulfills the expectations raised by its title. There is enough detail to prototype the various techniques presented, but not enough detail to extend the prototypes into even a rudimentary compiler for modest reactive language.
The reader should be familiar with reactive systems; familiarity with general compilation techniques is helpful, but not required. The bibliography has broad coverage, with depth in the relevant details.