Results 1 
1 of
1
Language Independent Traversals for Program Transformation
 Universiteit Utrecht
, 2000
"... syntax representation in which variables are not leaves and extraction of variable names from expressions. strategies freevars2(getvars, boundvars) = rec x(split(getvars <+ ![], split(collectkids(x), boundvars <+ ![]); diff); union) Figure 15: Algorithm for collecting free variables th ..."
Abstract

Cited by 27 (7 self)
 Add to MetaCart
(Show Context)
syntax representation in which variables are not leaves and extraction of variable names from expressions. strategies freevars2(getvars, boundvars) = rec x(split(getvars <+ ![], split(collectkids(x), boundvars <+ ![]); diff); union) Figure 15: Algorithm for collecting free variables that takes variables in subterms of variables into account. A variant of this algorithm taking into account binding positions can be created analogously to Figure 13 11 Section: Case Studies RENAMING BOUND VARIABLES Renaming of bound variables depends on the shape of variables and the shape of binding constructs. For binding constructs, in addition to determining what variables are bound and in which arguments they are binding, it is necessary to declare where new variables should be pasted. In order to keep track of renamings it is also required to distribute an environment along with the renaming traversal. Renaming of bound variables is used to prevent name clashes between variables, for exa...