Stratego Release 05

Stratego -- Strategies for Program Transformation
SUMMARY OF CHANGES

  • StrategoScript?: an interpreter for Stratego
  • Syntax clean up
  • Compiler and library maintenance
  • Stratego alpha release with anonymous CVS
  • Website under TWiki
  • Online documentation

INTERPRETER

StrategoScript? is an interpreted language for strategic rewriting. The interpreter has been designed for fast turn around time and not for performance; it will not replace the compiler. Possible applications are

  • learning Stratego
  • rapid prototyping
  • unit testing
  • glueing transformation components

A StrategoScript? has the form

   #!/bin/sh stratego
   stratego script
   <commands and declarations>

A script evaluates the commands and declarations sequentially. Commands are strategy expressions that are applied to the current subject term. The starting term is the list of command-line options. Declarations are the usual declarations of signatures, overlays, rules, strategies and imports that a normal Stratego module contains. In addition a script can dump the current state of the intepreter and load a previously dumped state. Thus, it is possible to load a previously pre-compiled version of the library.

The implementation of the interpreter still lacks some features:

  • signatures and overlay declarations in scripts are not interpreted
  • nullary variables are not recognized without parentheses, i.e., instead of Nil write Nil()
  • loading and precompiling modules should be more incremental

See doc/tutorial/exercises/pico for some example scripts

LANGUAGE

Local strategy definitions

     let f1(...) = s1 ... fn(...) = sn in s
This means that the identifier "in" has become a reserved word. Use 'in to indicate the identifier. Note that only strategy operators without arguments are supported in this release.

Syntax removed:

    ?t <= s

Syntax removed:

    << l -> r >>
has been removed. Replace local rules using this notation as follows:
    replace  {x1,...,xn: <<l -> r>>}  with  \ l -> r \
if the xi correspond to the variables of l. Otherwise,