Language Independent Traversals for Program Transformation
user correction - Legacy Corrections
SVM HeaderParse 0.1
Department of Information and Computing Sciences, Universiteit Utrecht
SVM HeaderParse 0.2
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...