Aster
Stratego -- Strategies for Program Transformation
Aster is an
attribute grammar system based on
Stratego. It makes use of the standard Stratego facilities such as
pattern matching and
concrete syntax to specify attribute equations and associate them with nodes of an abstract syntax tree. To abstract from these basic equations, users can specify
attribute decorators that provide an abstract evaluation mechanism for attributes. Inspired by Stratego's
rewriting strategies, these can be used to provide separation of concerns between the basic equations and high-level global search or traversal patterns to be taken on the tree for their evaluation. For example, these can be used to specify
automatic copy rules, such as a downward copy rule that copies an attribute value from the parent node if it is not defined at the current node, and recursively higher up in the tree.
Attribute decorators can be used to describe different various high-level attribution patterns, and are not limited to basic copy rule specifications. For example, these include providing support for collection attributes, declaration lookup attributes, and attributes that require fix-point evaluation of circular dependencies (e.g., for data-flow equations). These patterns are often implemented as extensions of the basic attribute grammar paradigm in other systems, "baked into" different attribute evaluator systems. Rather than supporting these in the attribute evaluation system itself, Aster allows to provide these as a library of decorators, and lets users specify their own, often domain-specific decorators by hand.
Project Information
Aster has been developed by
Lennart Kats.
Contact and Mailing List
Please send questions to the
users@strategoxt.org mailing list or
contact Lennart Kats directly. Also, the developers are usually available on IRC at
#stratego on freenode.net (
web version). Feel free to drop by!
License
Aster is
LGPL (GNU Lesser General Public License) software. This means that you can use it without being required to distribute your software under the GPL.
Downloads
Source Repository
The full source code is available from Subversion:
Daily builds
Distributions are built continuously:
Publications
Lennart C. L. Kats, Anthony M. Sloane, Eelco Visser.
Decorated Attribute Grammars. Attribute Evaluation Meets Strategic Programming.
In Proceedings of the 18th International Conference on Compiler Construction (
CC 2009), Volume 5501 of Lecture Notes in Computer Science, pages 142—157.
York, United Kingdom, Springer-Verlag, March 2009. [
abstract] [
pdf] [
bib]
Presentation
Decorated Attribute Grammars (CC 2009)
Related Software
The
Transformers project incorporates a Stratego-based attribute grammar system into
SDF for disambiguation of context-free grammars.