Stratego Release 06

Stratego -- Strategies for Program Transformation
Release 0.6 of the StrategoCompiler is near. The compiler now translates Stratego to idiomatic, high-level C code. The generated code no longer uses computed labels, but instead uses another GCC extension: nested functions. Generated code is much faster than before, and compilation time has been reduced considerably. I have not done benchmarks to measure exactly how much, but the compiler now bootstraps in less than 15 minutes (on my new 1GHz machine).

I want to release version 0.6 soon. But before that I'd like to test out the distribution and use it with some applications. To enable you to use the new compiler before the official release, I have made a pre-release.

The distribution has been split up into a number of packages:

  • CGEN: a package for the generation of C source code
  • SCBOOT: the bootstrapped C sources of the StrategoCompiler
  • GPPBOOT: the bootstrapped C sources of the GenericPrettyPrinting? package GPP
  • SRTS: the StrategoRunTimeSystem
  • SSL: the StrategoStandardLibrary?

Here are the packages

In addition the Tools.ATerm library is required.

The bootstrapped sources are also available in a bundled package (thanks to MerijnDeJonge and AutoBundle):


The compiler has been developed using gcc-2.95.3 on Linux. Nested functions appear to be a problem on Sun machines, since execution of code on the stack is sometimes disabled. This is solved by allowing this explicitly in an extension of the run-time system.

The compiler has been reported to work on the following architectures:

OS CPU gcc /etc/system
Linux intel 2.95.3 ?
SunOS sparc 2.95.2 ?
SunOS intel 2.95.2 ?

Please report on configurations not listed here.


Unpack the archives in one directory. Configure each package with

> ./configure --prefix=`pwd`/..

Build (make; make install) the packages in the following order:

  • aterm
  • srts
  • ssl
  • sc-boot
  • gpp-boot
  • cgen

After that you can compile Stratego programs with sc as usual. For example, you could install the Stratego implementation of the compiler in the sc package.

-- EelcoVisser - 22,27 Aug 2001