[aspectc-user] Issues using AspectC
Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Sep 3 18:30:12 CEST 2002
On Tuesday 03 September 2002 16:02, you wrote:
> Dear Daniel/Olaf,
> We have been trying to use aspectc quite agressively in our jobs but we are
> facing problems during the weaving stage. Since the project sizes are quite
> large we have multiple #includes as well as files including header files,
> which in turn include other header files and so on. I have tried to weave
> my aspect code alongwith such files but have failed. The errors that are
> very common are the parse errors. The compilation process wihout the
> aspects goes very smoothly. We use the Sun's C Compiler as well as gcc/g++.
> All the header file paths are given as -I options. When the header files
> are 1 level away, there is no problem. The problem is typical to #includes
> spanning over 2-3 levels like for e.g main.cc including main.h, which in
> turn includes main1.h, which in turn includes main2.h.
We use AspectC++ in our own projects with very deep hierarchies of nested
includes (at least 10 or 20) and that works as expected. You should make sure
that all macros (defines) that are used in your code for conditional
compilation are provided with AspectC++ as well. Check which macros are
predefined by your compiler and make sure that these are also defined in
puma.config or with "-D..." on the command line.
If you already did that and still believe that the include mechanism of
AspectC++ is buggy, it would be helpful for us to get a simple source code
example with a reproduceable misbehavior. If you send me this example I will
try to fix the bug as soon as prossible.
> The second problem that I have faced is with using the STL.
> Please comment on this. When are you planning to incorporate the STL
The STL heavily relies (as the name says) on templates and also on
namespaces. Both language features are not supported by the AspectC++ parser
yet. If you are using the STL only at a few places in your code a possible
workaround would be:
// code that uses STL <= this will be ignored be AspectC++
At the moment we are completely reimplementing the parser (with AspectC++).
The new one has a much cleaner structure and is easier to extend. The short
term road map is as follows:
1. understand all the language features that were supported by the old parser
(we have already done a lot of work)
=> in about two weeks
2. port all applications (this includes AspectC++) to the new parser
=> done in about one month
3. extend the parser to support namespaces and templates (we already have
some preliminary support in step 1)
=> done in about three months
Our primary goal of step 3 is to be able to parse all header files that have
to do with i/o streams. This requires namespaces and templates on some
platforms. I personally think that would be too optimistic to believe that we
will be able to parse the STL headers in three months. The STL is used to
test compilers. Thus, there will probably be some work left. At the moment
I'm not sure whether we should immediately proceed with implementing perfect
template support as needed for the STL or if we should use the last months of
this year to reduce the ressource consumption (time, memory) and write a
documentation. These points are very important problem as well. Do you think
the STL has a higher priority?
> Also when are coming out with your next release?
During the last few weeks I was very busy with finishing my PhD thesis,
Daniel was in Greece for a holiday, and the parser work done by Matthias is
not yet ready to be integrated. Thus, we were not able to stay in the usual
four weeks interval. At the moment I don't see important bug fixes or new
language feature. This means that it will take another four weeks in the
worst case. Are you waiting for a particular bug fix?
I'm sorry for the problems that you are facing at the moment. AspectC++ does
not have the quality and supported language features as an industrial C++
compiler. The new parser will bring us a big step forward, but you have to be
More information about the aspectc-user