Managing Dynamic Changes in Multi-stage Program Generation Systems

  • Authors:
  • Zhenghao Wang;Richard R. Muntz

  • Affiliations:
  • -;-

  • Venue:
  • GPCE '02 Proceedings of the 1st ACM SIGPLAN/SIGSOFT conference on Generative Programming and Component Engineering
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

In a multi-stage program generation (MSPG) system, a stage-s program generates a stage-s + 1 program when the values of some variables are known. We call such variables program parameters for stage-s.When program parameters for a stage change during runtime, all later-stage program objects that are generated directly or indirectly based on them need to be dynamically regenerated. We make two contributions. a) We explore a metaobject protocol called reflection across stages (RAS), which allows later-stage program objects to refer back to earlier-stage program objects they originated from. Intercessory procedures can be specified by the earlier-stage program objects to be executed at, e.g., execution of the later stage objects. b) We apply RAS to automating runtime program regeneration, so that affected later-stage programs are automatically regenerated after program parameters change.In an initial experiment, RAS incurred an overhead of 10% when program parameters are invariant. The overhead of RAS plus regeneration is amortized to zero over1.5 executions of the generated program object.