Generation of visitor components that implement program transformations

  • Authors:
  • R. E. Kurt Stirewalt;Laura K. Dillon

  • Affiliations:
  • Department of Computer Science and Engineering, Michigan State University, East Lansing, MI;Department of Computer Science and Engineering, Michigan State University, East Lansing, MI

  • Venue:
  • SSR '01 Proceedings of the 2001 symposium on Software reusability: putting software reuse in context
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

The visitor pattern is appealing to developers of program-analysis tools because it separates the design of the data structures that represent a program from the design of software that traverses these structures. Unfortunately, the visitor pattern is difficult to apply when the analysis involves transformation logic that involves multiple program fragments simultaneously. We encountered this problem in our work on the {\proj} project and discovered a novel way to use multiple cooperating visitor objects to systematically implement such functions when they are specified via a set of transformation rules. This paper introduces our {\em curried-visitor framework} and illustrates how we applied it to implement a key component in the {\proj} framework. We are working on a code generator that will automatically synthesize curried-visitor frameworks from a description of a program's abstract syntax and a set of pattern-matching transformation rules.