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 free-vars2(getvars, boundvars) = rec x(split(getvars <+ ![], split(collect-kids(x), boundvars <+ ![]); diff); union) Figure 15: Algorithm for collecting free variables that tak ..."
Abstract
-
Cited by 24 (7 self)
- Add to MetaCart
syntax representation in which variables are not leaves and extraction of variable names from expressions. strategies free-vars2(getvars, boundvars) = rec x(split(getvars <+ ![], split(collect-kids(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...

