- Stratego/XT
Infobox Software
name = Stratego/XT
caption =
developer =
latest release version =
latest release date =
latest preview version =
latest preview date =
operating system =Cross-platform
platform =
genre = program transformation system
license =LGPL
website = http://www.strategoxt.orgStratego/XT is a language and toolset for constructing stand-alone program transformation systems. It combines the "Stratego"
transformation language with the "XT" toolset of transformation components, providing a framework for constructing stand-aloneprogram transformation systems. The Stratego language is based around a programming paradigm called "strategic term rewriting". It provides "rewrite rules" for expressing basic transformation steps. The application of these rules can be controlled using "strategies", a form ofsubroutine s. The XT toolset provides reusable transformation components and declarative languages for deriving new components, such asparsing grammars using theModular Syntax Definition Formalism (SDF) and implementing pretty-printing.Concrete syntax
Program transformations often operate by modifying the
abstract syntax tree (AST). In Stratego it is also possible to specify transformations usingconcrete syntax . [ [http://www.program-transformation.org/Stratego/MetaProgrammingWithConcreteObjectSyntax Meta-programming with concrete object syntax] ] This allows programmers to express a transformation using the familiar (and often more concise) syntax of the object programming language, while it internally still operates on the AST.Examples
A rule to desugar a do-while statement in Java: [Using the [http://www.program-transformation.org/Stratego/JavaFront Java-front] syntax definition] desugar : While(e, stm) -> If(e, DoWhile(stm, e))
The same rule, using concrete syntax: desugar : | [ while (e) stm; ] | -> | [ if (e) do stm while(e); ]
See also
*
ASF+SDF Meta Environment
*Program transformation
*Source code generation Notes
External links
* [http://www.strategoxt.org strategoxt.org]
* [http://www.program-transformation.org Program-transformation.org]
* [http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt/strategoxt-manual-unstable-latest/manual/ The Stratego Manual]
* [http://www.strategoxt.org/Stratego/StrategoPublications Stratego Publications]
Wikimedia Foundation. 2010.