[aspectc-user] questions about ac-languageref

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Sun Mar 26 11:04:41 CEST 2006

Hello Pavlo,

thanks a lot for your remarks.

Pavlo Korzhyk wrote:
>Hi. I'm reading ac-languageref.pdf and have some questions:
>1. Example on page 12 defines aspect Counter and it contains a row,
>that looks like aspect constructor:
>	Counting() : m_count(0) {}
>   It seems to me that constructor should have the same name as an
>aspect. Is this a documentation bug?
>2. "Aspect instantiation" on page 13 says that the static method
>aspectof can be generated.
>   Since we didn't define aspectof in example on page 12, "static int
>m_count;" must not be static (example doesn't compile, if it is).

you right. This example is wrong. The constructor has to be called 
Counter. However, after a closer look I removed the constructor 
completely. Let me explain:

The attribute m_count is static, because the class Helper should be able 
to access the attribute without having to call Counter::aspectof() [the 
aspectof() function is introduced later in the manual]. As static 
attributes are not initialized by the constructor, I removed it and 
added the static attribute initialization instead.
>3. A note on "Inheritance relation" (page 31) looks very strange. My
>ac++ requires base aspect to be abstract. Abstract aspect has no
>effect on program, so why do we need to check precedence for derived
>and base aspect if only the derived aspect has the possibility to
Abstract base aspects may contain advice. The advice is only affecting 
the component code if there is a derived (concrete) aspect. In this case 
the advice precedence might be relevant. Consider that some advice of 
the derived aspect and the advice of the abstract base aspect might 
affect the same join points.

>4. How do I get PUMA framework? It is used by ag++/ac++ and whole
>chapter 3 "MATCH EXPRESSIONS" looks like it was copied from PUMA
>manual. But where can I find the library, its headers and complete
The section is completely specific for AspectC++ and definitely not 
copied from the PUMA manual.

If you are interested in Puma, have a look into the AspectC++ source 
tarball. It contains the code of the Puma library. An overview of the 
class structure can be generated with "make doxygen" in the Puma directory.

>BTW AspectC++ is a great compiler, thanks for creating this tool and
>making it open-source.
Thanks again,


More information about the aspectc-user mailing list