Using functor categories to generate intermediate code

  • Authors:
  • John C. Reynolds

  • Affiliations:
  • Department of Computing, Imperial College, London SW7 2BZ, Great Britain and School of Computer Science, Carnegie Mellon University, Pittsburgh, PA

  • Venue:
  • POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the early 80's Oles and Reynolds devised a semantic model of Algol-like languages using a category of functors from a category of store shapes to the category of predomains. Here we will show how a variant of this idea can be used to define the translation of an Algol-like language to intermediate code in a uniform way that avoids unnecessary temporary variables, provides control-flow translation of boolean expressions, permits online expansion of procedures, and minimizes the storage overhead of calls of closed procedures. The basic idea is to replace continuations by instruction sequences and store shapes by descriptions of the structure of the run-time stack.