By representing a strategy as a term, it can be passed around. This requires an EvalStrategy operator that evaluates such a term. This need not be a primitive; Problems * How to distinghuish congruence strategies represented as terms from terms themselves? * By declaring _constructors_ for the strategies, a congruence operator is declared automatically. This should be avoided. That is, the user should not declare these constructors, but they should be generated implicitly from strategy definitions. * Closures? -- Main.EelcoVisser - 27 Oct 2001
A possibility is to use a quotation mechanism in the style of Transform.MetaML and represent quoted stategies internally using abstract syntax representation. This requires an interpreter that maps calls to strategy operators, but has to interprete ordinary combinators. This would make possible an integration of the interpreter StrategoScript with the StrategoCompiler. In fact, StrategoScript already calls C functions, i.e., the Stratego primitives from the [[Stratego standard library]]. Transform.ELAN provides such a mechanism. The idea of Transform.RewritingByRewriting is based on this idea, if I remember correctly. -- Main.EelcoVisser - 02 Nov 2001
----- CategoryToDo | ToDo | LanguageExtensions