Stratego/J

Stratego/J is an execution engine for the Stratego language, implemented in Java. It allows the execution of the full Stratego language on the Java virtual machine.

It may be easiest to think of Stratego/J as the implementation of an abstract Stratego machine. The Stratego compiler can, using the -F option, output a compiled Stratego program in a high-level Stratego-specific format which Stratego/J can execute. It is currently not possible to interactively evaluate Stratego source code on Stratego/J -- for that, use Stratego Shell.

Flavors

The execution engine comes in several different flavors, including a stand-alone command line application, a Java library (jar) and an Eclipse plugin. Other packaging formats are considered, especially the JNLP format.

Program Object Model Adapters

A novel and unique feature of Stratego/J is its ability to perform rewriting on any tree- or graph-like data structure, using program model adapters. This feature is not found in Stratego/XT. Stratego/J transforms terms (or trees) according to a specific term interface, called ITerm. Any tree or graph structure which implements this interface may be transformed using Stratego/J.

A program model adapter is a thin layer of adapter code which provides the ITerm interface for any existing tree structure. For example, we have a program model adapter for the Eclipse Java Compiler, which allows us to write Stratego programs that rewrite directly on the Java AST (the JDT DOM) of Eclipse.

Latest Releases

Spoofax
jsglr 0.1.0
Stratego/J 0.1.0