Stratego/XT Manual


Table of Contents

Stratego/XT Tutorial
I. Introduction
1. Software Transformation Systems
2. Installation
II. The XT Transformation Tools
3. Architecture
4. Annotated Terms
5. Syntax Definition and Parsing
6. Syntax Definition in SDF
7. Advanced Topics in Syntax Definition (*)
8. Trees, Terms, and Tree Grammars (*)
9. Pretty Printing with GPP (*)
III. The Stratego Language
10. Terms
11. Running Stratego Programs
12. Term Rewriting
13. Rewriting Strategies
14. Rules and Strategies
15. Strategy Combinators
16. Creating and Analyzing Terms
17. Traversal Strategies
18. Type Unifying Strategies
19. Concrete Object Syntax
20. Dynamic Rules
IV. The Stratego Library
21. Arithmetic Operations
22. Lists
23. Strings
24. Hashtables and Sets
25. I/O
26. Command-line Options
27. Unit Testing with SUnit
28. Transformation Tool Composition with XTC
29. Building and Deploying Stratego Programs
30. Debugging Techniques for Stratego/XT
Stratego/XT Examples
1. Introduction
1.1. Software Transformations
1.2. Introducing Stratego/XT
1.3. Software
1.4. Overview
I. A Tiny Imperative Language
2. Syntax Definition and Pretty-Printing
3. Simplification and Desugaring
4. Bound Variable Renaming (*)
5. Typechecking (*)
6. Interpretation
7. Data-flow Transformation (*)
8. Typestate Checking
9. Expression Blocks (*)
II. Example Packages (*)
10. Tiger Base (*)
11. BibTeX Tools (*)
Stratego/XT Reference Manual
I. Stratego Language (*)
1. Stratego Core (*)
2. Syntactic Abstractions (*)
3. Dynamic Rules (*)
4. Programs and Tools
abox2text — formats a Box term to plain text
asfix-yield — unparses an asfix tree to flat text
ast2abox — pretty prints an abstract syntax tree to the Box layout formalism
ast2text — pretty-prints an abstract syntax tree to plain text
aterm2xml — translates an ATerm to XML
autoxt — installs autoconf/make resources for Stratego/XT packages
baffle — converts between textual and binary ATerm formats
format-check — checks whether an ATerm conforms to a given regular tree grammar (RTG)
gen-renamed-sdf-module — generates an SDF module that renames all SDF sorts in a given SDF definition.
implode-asfix — maps an asfix parse tree to an abstract syntax tree
pack-sdf — packs a set of SDF modules into a single definition
parse-box — parses a layout definition written in the Box language
parse-cs — parses meta-programs with concrete syntax
parse-c — parses a C source file
parse-pp-table — parses a pretty-print table
parse-rtg — parse a regular tree grammar (RTG) source file
parse-sdf-definition — parsers and desugars a SDF definition file.
parse-sdf-module — parses and desugars an SDF module file.
parse-stratego — parses a Stratego source file
parse-unit — performs the test cases in a testsuite for an SDF syntax definition
parse-xml-doc — parses an XML file into a xml-doc term
parse-xml-info — parses an XML file into a xml-info term
pp-aterm — pretty-prints an ATerm in text format to make it readable for humans.
pp-box — pretty-prints an abstract syntax tree containing Box code
pp-c — pretty-prints an abstract syntax tree containing C code
ppgen — generates a pretty-print table from an SDF syntax definition
pp-pp-table — pretty-prints an abstract syntax tree containing a pretty-print table
pp-rtg — pretty-prints an abstract syntax tree containing a regular tree grammar (RTG)
pp-sdf — pretty-prints an abstract syntax tree containing an SDF definition
pp-stratego — pretty-prints a Stratego program
pptable-diff — diffs and synchronizes two pretty-print tables
pp-xml-doc — pretty-prints an xml-doc term into an XML document
pp-xml-info — pretty-prints an xml-info term into an XML document
pretty-stratego — pretty-prints a Stratego program.
rtg2sig — generates a Stratego signature from a regular tree grammar (RTG)
rtg2typematch — generates a set of Stratego strategies for typechecking terms against a regular tree grammar (RTG)
rtg-script — produces a regular tree grammar (RTG) by executing an RTG script
sdf2parenthesize — generates a Stratego module that puts parenthetical constructors at the correct places.
sdf2rtg — generates a abstract regular tree grammar (RTG) from an SDF concrete syntax definition.
sdf2table — generates a parse table from an SDF syntax definition.
sglri — parse a text file using sglri and implode using implode-asfix
sglr — parses a text file and produces an parse forest conforming to a given grammar.
strc — compiles Stratego programs to C or executable code
stratego-shell — interpreters a Stratego program, from a script or interactively
unpack-sdf — splits an SDF definition into its constituent modules.
visamb — displays the ambiguities in a parse tree represented in AsFix2
xtc — registers, unregisters and queries XTC components in a repository
xml2aterm — converts an XML document to a comparable ATerm.
II. Stratego/XT Development Manual (*)
5. The Development of Stratego/XT
Transforming Java with Stratego
1. Getting started with Java-Front
1.1. Basics
1.2. Example: Add Blocks
1.3. Example: Java Generation with Concrete Syntax
2. Getting started with Dryad
2.1. Linking with the Dryad Library
2.2. Dryad on Mac OS X