Scoping Constructs for Program Generators

  • Authors:
  • Yannis Smaragdakis;Don Batory

  • Affiliations:
  • -;-

  • Venue:
  • Scoping Constructs for Program Generators
  • Year:
  • 1996

Quantified Score

Hi-index 0.00

Visualization

Abstract

Program generation is the process of generating code in a high-level language (e.g., C, C++, Java) to implement an abstract specification of a program. Generated programs are created by synthesizing and composing code fragments. A fundamental problem of fragment composition is variable binding -- i.e., binding identifiers in generated code with their correct variable definitions. In this paper we present generation scoping: a mechanism for specifying interdependencies among code fragments that solves the variable binding problem. Generation scoping employs ideas similar to hygienic macro expansion and syntactic closures -- i.e., advanced macro expansion techniques developed for extensible programming languages -- adapted to suit program generators.