Stratego Release 07

Stratego -- Strategies for Program Transformation
Stratego version 0.7 is now available.

-- EelcoVisser - 13 Mar 2002


New in 0.7beta

New in 0.7beta1

New in 0.7beta2

New in 0.7beta3

-- EelcoVisser - 09 Jan 2002


Version 0.7

 released: March 13, 2002

SUMMARY OF CHANGES

 (with respect to release 0.6.4)

 * Support for `native' ATerm lists and tuples
 * List traversal: lists considered as varyadic constructors
 * Global choice operators ++ and <++ support global backtracking
 * Bagof returns list of all possible results for ++ and <++
 * Guarded left choice s1 < s2 + s3 commits after s1 succeeds
 * Support for term annotations t1{t2}
 * Many new library strategies
 * Constant term caching in the compiler

DEPENDENCIES

 * aterm-1.6.6: aterm library with support for tuples
 
 * cpl-stratego-0.4: choice point library from INRIA (Nancy) with
   some modifications (optional)

MIGRATION

 * Existing code based on generic tuples (TCons/TNil) should be
   rewritten

MORE INFORMATION

 * http://www.stratego-language.org/Stratego/StrategoRelease07

CONTRIBUTIONS

 * Bug reports by Martin Bravenboer (<++), Dick Kieburtz
   (configuration), Otto Skrove Bagge (mapping reverse)
 * Bug fixes: Eelco Dolstra & Eelco Visser (Sun/ATmap bug)
 * Library contributions: connect.r (Hedzer Westra), getopt.r (Otto
   Bagge), restore (Martin Bravenboer)

LANGUAGE

 * The operators ++ and <++ provide global non-deterministic and
   global deterministic choice, respectively.

 * For symmetry, the choice operators +> and ++> give priority
   to their _right_ strategy argument.

 * The operator bagof(s) returns the list of all possible
   results produced by s.

 * The operator cpl-loaded (and friends) tell you whether you
   are running in an environment with the choice point library
   loaded (module cpl.r in the library).

 * The guarded left choice operator s1 < s2 + s3 is similar to
   (s1; s2) <+ s3, except that the choice is committed after s1
   has succeeded, i.e., no backtracking to s3 if s2 fails.

 * List constructors [_|_] and [] are no longer interpreted as syntactic
   sugar for Cons and Nil.

 * Tuple constructors TCons(_,_) and TNil are replaced by fixed length
   tuples (_,_,_,...). There is a tuple constructor for each arity.
   Parentheses around a term no longer represents a tuple, but the term
   itself, i.e., (t) == t. A lot of confusion arose because of <s>(t) not
   being equal to <s>t.

 * Term annotations can be used to attach information to a term without
   affecting its structure, i.e., arities or names of constructors. Syntax:
   t1 { t2 } denotes the annotation of term t1 with term t2. By making
   the annotation into a list, many different annotations can be attached
   to a term. Proposals for linguistic support for such annotation lists
   are welcome.

COMPILER

 * The translation to C has been adapted to support native lists.

 * Implementation of native tuples is handled in the front-end; tuples
   are just special constructors.

 * The C back-end has been adapted to perform constant term caching.
   This means that terms that are constant _at compile time_ are
   constructed once at program startup and cached in global variables
   for later use.

 * Compiler quits after finding a parse error instead of struggling
   on for a while.

RUN TIME SYSTEM

 * Adapted the Stratego Run-Time System to (conditionally) include the
   Nancy Choice Point Library. This provides an alternative
   implementation for choice from the current one---although it comes
   down to the same thing, i.e., setjmp and longjmp. The advantage of
   this addition is that it enables global choice. For programs only
   using local choice this extension is transparent. By choosing the
   --with-cpl switch of srts/configure the choice point library will
   be used. By default the old implementation is used. For programs
   using the new ++ and <++ operators the --with-cpl flag should be
   used.

 * Choice buffer overflow repaired (?) when using cpl

 * Include files are now installed in $prefix/include/srts to avoid 
   file name clashes with other packages.

 * There was a bug in the definition of ATmap in aterm-extension.c, which
   caused the new implementation of the generic traversal operators
   to malbehave on lists. (ED + EV)

LIBRARY

 * Include files are installed in $prefix/include/ssl to avoid 
   file name clashes with other packages.

 * cpl.r: test if Choice Point Library is installed. 
   - cpl-loaded: succeeds if CPL is loaded
   - if-cpl-loaded(s): do s when loaded, otherwise exit 0
   - if-cpl-loaded(s1, s2): do s1 when loaded, otherwise s2

 * list-set.r
   - postorder-collect(s) selects all subterms for which s 
     succeeds and returns them in post-order.

 * list-filter.r:
   - partition(s): partitions list in a list with elements for
     which s succeeds, and one for which s fails

 * integers.r: 
   - Operator log2 takes the base 2 logarithm. 
   - Constructor Infinite represents infinity, 
   - Operatorsadd-inf and lt-inf are aware of Infinite.

 * simple-traversal.r: 
   - Strategy bottomup-para(s) implements paramorphism, 
     which applies s at pair of orignal term and term in 
     which the subterms have been transformed.

 * getopt.r:
   - This module parses command line arguments and build an option table
     for convenient retrieval. Non-option arguments are returned to
     the caller. Traditional Unix / GNU option syntax is supported.
     (Otto Skrove Bagge)

 * connect.r:
   - Inter process communication for Stratego programs. (Hedzer Westra)

 * annotations.r:
   - Support for annotations

 * conditional.r:
   - restore(s, rest): call restoring operation rest when s fails
     and then still fail
   - restore-always(s, rest): also call rest when s succeeds

ReleasePlan | StrategoDownload

Stratego.StrategoRelease07 moved from Stratego.StrategoRelease065 on 08 Jan 2002 - 23:37 by EelcoVisser - put it back