XDoc Search Logo
Xdoc:
Stratego Library API Documentation
strategy/general
Link to XDoc
Description: No additional information available
Modules:
free-variables No additional information available
memo The memo operator makes a strategy into a memoizing strategy that looks up the term to be transformed in a memo table and only computes the transformation if the term is not found.
option No additional information available
parenthesize This module defines a generic strategy for placing parentheses in abstract syntax trees based on priority and associativity declarations. Reference Eelco Visser. Syntax Definition for Language Prototyping. PhD Thesis, University of Amsterdam, 1997. Typical usage: (from module Tiger-Ensugar in the tiger/tiger-front package) TigerParenthesize = !Seq([<id>]) tiger-parenthesize = parenthesize(TigerParenthesize, tiger-priorities) tiger-priorities = ![(None, ["Uminus","FieldVar","Subscript"]), (Some("left"), ["Power"]), (Some("left"), ["Times","Divide"]), (Some("left"), ["Plus","Minus"]), (Some("non-assoc"), ["CPlus","CMinus","Eq","Neq","Gt","Lt","Geq","Leq"]), (Some("left"), ["And"]), (Some("left"), ["Or"]), (None, ["Array"]), (None, ["Assign"]), (Some("right"), ["If","While","For"])]
rename Renaming of bound variables is determined by the shape of variables and binding constructs. Three generic strategies are defined that cater for different complexities of binding constructs. Variable binding constructs protect variables from clashing with variables in other parts of a program when their names are the same. To prevent the introduction of name clashes during program transformation it can be useful to give all variable bindings a unique name. This module defines three generic strategies for bound variable renaming all based on the same idea, but dealing with increasingly complex variable binding models. Renaming depends \emph{only} on the shape of variable bindings and variable occurences. Other language constructs are irrelevant. In the generic strategies the following assumptions about binding constructs are made: (1) There is a subtree that covers the scope in which the variables are bound. (2) variables are atomic, i.e., do not contain subterms that are variables or binding constructs. Approach: indicate shape of variable occurences and variable binders
substitution No additional information available
unification Syntactic unification, no variable bindings are taken into account.