Loading…

Generation of visitor components that implement program transformations

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 tr...

Full description

Saved in:
Bibliographic Details
Published in:Proceedings of SSR '01 : 2001 Symposium on Software Reusability : "Putting Software Reuse in Context", Toronto, Ontario, Canada, May 18-20, 2001 Toronto, Ontario, Canada, May 18-20, 2001, 2001-05, Vol.26 (3), p.86-94
Main Authors: Stirewalt, R. E. Kurt, Dillon, Laura K.
Format: Article
Language:English
Citations: Items that this one cites
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary: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.
ISSN:0163-5948
DOI:10.1145/379377.375258