Loops in combinator-based compilers

  • Authors:
  • Mitchell Wand

  • Affiliations:
  • Indiana University, Bloomington, Indiana

  • Venue:
  • POPL '83 Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
  • Year:
  • 1983

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.