[aspectc-user] Questions about implementation
Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Oct 19 14:53:22 CEST 2006
Panu Bloigu wrote:
> Hello you all.
> I have some questions about the implementaton of the AspectC++ compiler.
> 1) In various documents there are references to Class&Aspect Database
> produced by the PUMA system. Could someone elaborate a bit the nature and
> contents of the said database. The PUMA User's Manual accessible at
> http://www-ivs.cs.uni-magdeburg.de/~puma/docu-eng.html says nothing about it
> and I can't download the PUMA source from the CVS either since it seems to
> require an account. I would go about asking this in PUMA mailing list if
> there were one. And yes, I know the source is the ultimate documentation and
> that I should probably consult ac++ source, but I still would appreciate
> reading about it in plain English.
The "class database" contains objects that are used for the semantic
analysis of the C++ code and also describe the results of the analysis.
For example, each function, attribute, class, etc. is represented by a
class database object. There is one class database for each translation
There are three parallel efforts going on to improve the documentation
1. examples: In the current CVS version there are five small and very
well commented Puma applications, which could be used to learn more
about some aspects of Puma including the class db.
2. user's manual: Matthias started to write a user's manual. However, it
is still in a very early stage. One day it shall replace the outdated
manual that a have found at the old Puma homepage at the university
3. doxygen docu: many class of the class database already contain
We are currently discussing free CVS read-only access to the Puma
sources or daily snapshots. Please be patient.
> 2) AspectC++ papers and documentations say that AspectC++ avoids using RTTI.
> I don't see how that() and target() could be implemented w/o resorting to
> using RTTI. Could someone explain this a little.
Of course, some kind of runtime type information is needed, but we avoid
the rtti mechanism provided by C++ compilers. There are two reasons:
1. C++ RTTI induces costs for *every class*, even though type
information might only be needed for only a single class. Many
programs are compiled with -fno-rtti and we don't want to force
them to enable this feature only for AOP support.
2. The mechanism is not sufficient for AspectC++.
Therefore, we "re-implemented" RTTI by introducing virtual helper
functions, wherever dynamic type checks are needed.
BTW, I wouldn't say that this is the best tested feature of the ac++
> Thank you for putting you time and effort in reading and, hopefully,
> answering these questions.
More information about the aspectc-user