----------------------------------------------------------------------
            __ __ __  __    _  __ __  __  __   __      _  _ _ _
           |__   |   |__|  /_\   |   |__ | _  |  |  /   \/   |
            __|  |   | \  /   \  |   |__ |__| |__| /   _/\_  |

----------------------------------------------------------------------

STRATEGO : Strategies for Program Transformation
XT 	 : A Bundle of Transformation Tools

Version 0.9.2

----------------------------------------------------------------------

Copyright (c) 1998-2003 Eelco Visser <visser@acm.org>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA

----------------------------------------------------------------------

DESCRIPTION

Stratego is a modular language for the specification of fully
automatic program transformation systems based on the paradigm of
rewriting strategies.

In Stratego, basic transformation rules are expressed by means of
labeled conditional rewrite rules. Exhaustively applying all rewrite
rules in a collection of valid rules is often not desirable; a system
of rules can be non-terminating, or, more frequently,
non-confluent. The latter means that different outcomes of the
normalization process are possible depending on the position of
application and the selection of rules.  Therefore, it is necessary to
have more control over the application of rules. In standard systems
based on rewriting, normalization is controlled by a fixed default
rewriting strategy. In such systems more control is achieved by
encoding the desired strategy with additional rewrite rules that spell
out a traversal over the abstract syntax tree and apply the
transformations in the desired order.

To control the application of transformation rules, Stratego provides
a language for defining rewriting strategies based on primitives for
sequential programming and abstract syntax tree traversal. A rewriting
strategy selects a number of rules from the available rules and
defines in what order these rules are applied to a program
fragment. Thus, the separation of concerns between logic
(transformation rules) and control is maintained.

Transformation strategies can be defined generically, i.e.,
parameterized with a rule selection or other strategy to apply. The
language comes with a large library of generic strategies for syntax
tree traversal and built-in data type manipulation. In particular, the
library contains generic, language independent strategies for language
processing such as substitution, unification, and bound variable
renaming that are parameterized with the shape of the relevant
language constructs. Strategies cannot only be used to combine rules
into transformations, but can also be used inside rules to test
applicability conditions and perform local transformations.

Stratego specifications are compiled to C programs. Compiled
specifications have built-in support for exchange of abstract syntax
trees with other tools via the ATerm format. The Stratego distribution
also provides a (prototype) interpreter for the language for rapid
prototyping of specifications.

Stratego is being applied in a wide variety of program transformation
projects including a software improvement tool for Cobol programs
(CobolX), a compiler for Tiger, a documentation generation tool for
SDL, tools for grammar transformation, and a tool for deforestation of
functional programs through the warm fusion algorithm (HSX). The
StrategoCompiler is bootstrapped, i.e., implemented in Stratego
itself.

The Stratego system has been available as free software since March
1999. Since April 2000 the distribution is available from

      http://www.stratego-language.org

Since December 2002, the Stratego distribution is integrated with the
distribution of the XT package of transformation tools that combines a
number of free tools to support program transformation. The package
includes tools for generating tools such as pretty-printers from
syntax definitions. 

----------------------------------------------------------------------

Complete sources of StrategoXT

ftp://ftp.stratego-language.org/pub/stratego/StrategoXT/StrategoXT-0.9.2.tar.gz

StrategoXT is built using the ATermLibrary, the SDF syntax definition
formalism and parser generator, and optionally the Nancy Choice Point
Library cpl (with some adaptations for Stratego).
	
  * ftp://ftp.stratego-language.org/pub/stratego/aterm/aterm-1.6.7.tar.gz
  * ftp://ftp.stratego-language.org/pub/stratego/sdf2/sdf2-1.5.tar.gz
  * ftp://ftp.stratego-language.org/pub/stratego/cpl-stratego-0.4.tar.gz

The sources of the StrategoXT distribution are also available directly
from the CVS repository. Use the release tag to get the released
version, or ignore the tag to get the latest developments (at your own
risk).

cvs -d :pserver:anonymous@cvs.cs.uu.nl:/data/cvs-rep checkout StrategoXT

If you are going to build StrategoXT from CVS, you need to have autoxt
(part of StrategoXT) and LaTeX installed. Run the bootstrap script
before configuring the package. For more info on using the CVS 
repository :

  * http://www.stratego-language.org/twiki/bin/view/Stratego/StrategoCVS

----------------------------------------------------------------------
Bugs

Please report any problems with installation or bugs in the
implementation to the stratego-bugs mailing list

  * http://mail.cs.uu.nl/mailman/listinfo/stratego-bugs 

Please check the archive of the list to see if a report about the
problem was already submitted.

----------------------------------------------------------------------
Dependencies

Besides the dependency on the aterm-1.6.7 and sdf2-1.5, StrategoXT has
the following dependencies:

The Stratego Compiler depends on 

  * gcc (the extension of C with nested functions)

The build of the source distribution depends on the following software
packages

  * gmake

Developers who need to rebuild Makefiles and the configure scripts
will need

  * automake >= 1.6.3 
  * autoconf >= 2.53

In addition the autoxt package that is part of the StrategoXT
distribution should be installed prior to autobootstrapping such that
the autoxt tool is visible from the path.

----------------------------------------------------------------------
Installation

The following sequence of commands takes care of installing the aterm,
sdf2, and StrategoXT packages. 

   DIR=`pwd`

   tar zxf aterm-1.6.7.tar.gz
   cd aterm-1.6.7
   ./configure --prefix=$DIR --with-all  
   make
   make install
   cd ..

   tar zxf sdf2-1.5.tar.gz
   cd sdf2-1.5
   ./configure --prefix=$DIR --with-aterm=$DIR
   make
   make install
   cd ..

   tar zxf StrategoXT-0.9.2.tar.gz
   cd StrategoXT-0.9.2
   ./configure --prefix=$DIR --with-aterm=$DIR --with-sdf=$DIR
   make
   cd ..

Optionally you can install the choice point library prior to installation of StrategoXT:

   tar zxf cpl-stratego-0.4.tar.gz
   cd cpl-stratego-0.4
   ./configure --prefix=$DIR 
   make
   make install
   cd ..

To use the choice point library configure StrategoXT as follows:

   ./configure --prefix=$DIR --with-aterm=$DIR --with-sdf=$DIR --with-cpl=$DIR 

----------------------------------------------------------------------
Packages

The StrategoXT distribution consists of the following packages

    * autoxt -- autoconf/make support for packages using XT

    * srts -- Stratego run-time system

    * xtc -- Transformation tool composition (component model)
    * sdf-import -- XTC registration of SDF tools

    * stratego-front -- Stratego syntax and support for concrete object syntax
    * sc -- Stratego compiler
    * gpp -- Pretty-printing tools based on box
    * c-tools -- Improved support for the generation of C code

    * ssl -- Stratego Standard Library

    * aterm-tools -- Generic term operations
    * asfix-tools -- Operations on concrete syntax trees
    * sdf-tools -- Transformations on syntax definitions
    * stratego-tools -- Generation of Stratego code
    * dot-tools -- Support for processing Dot graph representations
    * graph-tools

    * boxenv -- LaTeX run-time system for Box

    * xt -- some tool compositions

----------------------------------------------------------------------
