loops in combinator-based compilers
In our paper [Wand 82a], we introduced a paradigm for compilation based on combinators. A program from a source language is translated (via a semantic definition) to trees of combinators; the tree is simplified (via associative and distributive laws) to a linear, assembly-language-like format: the "compiler writer's virtual machine" operates by simulating a reduction sequence of the simplified tree. The correctness of these transformations follows from general results about the ?-calculus. The code produced by such n generator is always tree-like. In this paper, the method is extended to produce target code with explicit loops. This is done by re-introducing variables into the terms of the target language in a restricted way, along with a structured binding operator.
loops combinators compilation paper language semantic definition tree tree association virtual machine operability reduction sequence correctness generation generation code method variability structure binding trees assemblers general