Nicolas Despres <despre_n(a)lrde.epita.fr>
writes:
Hello,
We met each other at the fifth Stratego Users Days. I'm part of the
Transformers team. We try to find a way to bridge the gap between
Codeboost and Transformers. I mean, we think about writing a stratego
filter to convert Transformers AST to Codeboost AST. Thus, we could glue
Transformers front-end with Codeboost back-end.
Transformers release 0.1 is available on the web at
http://www.lrde.epita.fr/cgi-bin/twiki/view/Projects/TransformersReleases
Have you planed a next release for CodeBoost soon ?
Yes, there is a new release, but it has not been annouced yet (since there
really aren't any external users to announce it to, I haven't bothered).
You can get it at
http://download.codeboost.org/codeboost/codeboost-0.3.0.tar.gz
The subversion repository is also publicly available (svn checkout
https://svn.cs.uu.nl:12443/repos/codeboost/trunk)
I had a look at Transformers a while ago, and I think it would be a great
idea to have a bridge between Transformers and CodeBoost (especially if
some of you guys are willing to write it...). I'm currently redesigning
the abstract syntax, so it may be a waste of time to write a converter for
the 3.0 AST. However, I noticed that your abstract syntax seems to follow
the standard grammar quite closely; for example, it preserves the extra
productions used for operator precedence. A good starting point might be
to (design and) convert to an intermediate form which doesn't have these
'unnecessary' constructors. I believe it would then be easy to convert to
CodeBoost's format (whatever it might end up looking like), and perhaps
also interface with other C++ transformation tools.
The 3.0 abstract syntax is poorly documented. There is a bit of
documentation in my thesis (available from the CodeBoost web page), and
some recent changes are explained in the NEWS file. I'm trying to do a
better job with the new and improved version. Note that while we in
earlier versions of CodeBoost considered it important to preserve as much
syntactic information as possible (e.g., whether the branches of an 'if'
are compound statements or not, or whether some variables are declared in a
single declaration (int a,b;) or in a sequence of declarations (int a; int
b;)), we no longer feel this is important. This means that the CodeBoost
abstract syntax is more like a high-level intermediate than an abstract
representation of C++.
By the way, I did some experiments with Transformers on the Sophus library
code (the code CodeBoost is designed to optimise), but I encountered
problems with ambiguities (which was kind of expected, since some type
information was missing). Also, it seemed to be a bit too slow to be
usable for us at the moment. I expect both problems can be solved without
too much trouble.
-otto