Otto Skrove Bagge wrote:
> 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
>
--
Nicolas Desprès
nicolas.despres(a)lrde.epita.fr
Feature request item #15, was opened at 2004-05-12 17:21
You can respond by visiting:
http://gforge.lrde.epita.fr/tracker/?func=detail&atid=102&aid=15&group_id=5
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Clement Vasseur (vasseu_c)
Assigned to: Nobody (None)
Summary: Transformers for C
Initial Comment:
People are interested in a transformation framework for the C language. StrategoXT already has a C grammar, but it is only used for code generation, it is not completely standard compliant.
Using the work we already invested in transformers, we could come up with such a transformation framework for the C language, with a reasonable amount of work.
Any volunteer?
----------------------------------------------------------------------
You can respond by visiting:
http://gforge.lrde.epita.fr/tracker/?func=detail&atid=102&aid=15&group_id=5
Here is the result of my little investigation on gcc testsuite
failures.
abi/mangle4: template function definition. fail in
afcxx-anonymous
abi/mangle8:
template method operator() definition.
fail in afcxx-disambiguate
abi/mangle12:
template function definition.
fail in afcxx-disambiguate
abi/mangle14:
abi/mangle15:
template
fail in afcxx-anonymous
compat/init-ref2_y:
operator && doesn't work.
fail in afcxx-disambiguate
eh/cleanup1:
declaration of 4000 class attributes,
sglr error: 'too many ambiguities'.
expr/static_cast3:
inheritance with a parameterized class.
fail in afcxx-disambiguate
inherit/access3:
template method definition.
fail in afcxx-disambiguate
init/addr-const1:
use of static and non-static class attribute in a struct constructor.
fail in afcxx-disambiguate
init/array11:
C code, simple cast with a typedef type.
fail in afcxx-disambiguate
init/array6:
char arr [2][4] = { "one", "two" };
doesn't parse.
fail in afcxx-disambiguate
init/copy2:
init/copy3:
struct s {};
s a = s ();
fail in afcxx-disambiguate
init/elide1:
operator &&.
init/empty1:
strange base class initialization.
fail in afcxx-disambiguate
init/init-ref2:
operator &&.
init/new9:
template use.
fail in afcxx-disambiguate
init/ref2:
same as init/copy2.
lookup/disamb1:
call to a method in a base class.
lookup/koenig2:
same as abi/mangle8.
lookup/scoped3:
same as lookup/disamb1.
lookup/template1:
basic template function (parametrized by an int) use.
opt/cfg2:
fail in afcxx-disambiguate
opt/cfg3:
opt/cleanup1:
opt/const1:
these tests are too big, i don't want to investiguate further.
opt/inline1:
struct A {};
template <typename, typename> struct B {};
typedef B <int, int> C;
fail in afcxx-disambiguate
opt/local1:
declaration of a pure virtual method in a inner class.
fail in afcxx-disambiguate
opt/mmx1:
opt/nrv1:
opt/nrv2:
operator &&.
opt/pr6713:
too big test, too many problems.
opt/reload1:
call to 'operator <<' with 1 argument.
fail in afcxx-disambiguate
opt/stack1:
opt/unroll1:
too big, too many problems.
opt/static2:
similar to lookup/template1.
*******************
These piece of code are valid, but fail with parse-cxx. They are
related to gcc failing tests.
***
int i = 1 && 1;
***
int f();
int a = f ();
// or
struct s {};
s a = s ();
***
char a[2][4] = { "one", "two" };
***
// Call to a method in a base class.
struct A
{
void f();
};
struct C : public A
{
void g() { f(); };
};
***
// Declaration of a pure virtual method in a inner class.
struct O {
struct I { virtual bool f() = 0; };
};
***
// Call to 'operator <<' with 1 argument.
struct A
{
void operator << (int s) {}
void f() { return operator << (0); }
};
***
struct A {};
struct B {
B(int, const A&);
};
B t(1, A());
***
// Strange base class initialization.
class a {};
class c : a { c() : a(a()) {} };
***
struct A {};
template <typename, typename> struct B {};
typedef B <int, int> C;
***
template <class T> struct a {};
struct b : a<int> {};
--
Les trous noirs sont les endroits ou Dieu divisa par zero.