Home

Language independent traversals for program transformation


Author(s) : Eelco Visser, 
Publisher : N/A
Publication Date : 2000
ISSN : N/A
Abstract : summary Many language processing operations have a generic underlying algorithm. However, these generic algorithms either have to be implemented specically for the language under consideration or the language needs to be encoded in a generic format that the generic algorithm works on. Stratego is a language for program transformation that supports both specic and generic views of data types. A Stratego program denes a transformation on rst-order ground terms. Transformation rules dene single transformation steps. Transformation rules are combined into transformation strategies by means of combinators that determine where and in what order rules are applied. These combinators include: primitives for traversal to the direct subterms of a node, allowing the denition of many kinds of full term traversals; full control over recursion in traversals; patterns as rst-class citizens; generic term construction and deconstruction. These features create a setting in which it is possible to combine generic traversal with data type specic pattern matching, and separating logic (transformation,,