Abstract
In M. Wand (1982, in “Conf. Rec. 9th ACM Sympos. on Principles of Programming Languages,” pp. 234–241, Assoc. Comput. Mach., New York) a paradigm for compilation based on combinators was introduced. 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 the transformations follows from general results about the λ -calculus. The code produced by such a 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 is a restricted way, along with a structured binding operator. General conditions under which these transformations hold are also considered.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.