[aspectc-user] Re: Auto-discard notification
Olaf Spinczyk
Olaf.Spinczyk at informatik.uni-erlangen.de
Wed Nov 9 09:31:10 CET 2005
Hi,
this is a message by Klaus Havelund ...
(please subscribe to the mailing list before posting)
(find my answer below)
aspectc-user-bounces at aspectc.org wrote:
> The attached message has been automatically discarded.
>
>
> ------------------------------------------------------------------------
>
> From:
> Klaus Havelund <havelund at kestreltechnology.com>
> Date:
> Tue, 8 Nov 2005 15:24:10 -0800
> To:
> aspectc-user at aspectc.org
>
> To:
> aspectc-user at aspectc.org
>
>
>
> I understand that 'set' and 'get' operations (assignment to and reading
> from variables essentially) currently cannot
> be instrumented. See FAQ response below which is from the AspectC++ website.
>
> I would appreciate any experiences gained with handling this kind of
> problem.
>
> I need to instrument pure C code.
>
> Klaus Havelund
>
>
> ====
> FAQ:
>
> /Will 'set' and 'get' be supported in the near future?/
>
> The set and get functionality is quite problematic and we are still not
> sure if it even makes sense to have a set and get function in C++ at
> all. First of all there is the alias problem and the second problem is
> that the meaning of a 'set' operation is quite complicated in C++.
> Syntactically <attribute> = value is a set operation. But what about
> user-defined assignment operators? Should it still be considered a 'set'
> operation if operator = is defined? If yes, where is the difference
> between the invocation of operator = and any other member function which
> manipulates an attribute?
>
> As you can see, before we can implement set and get (or a similar
> function) a lot of language design has to be done. Thus, we can't
> promise these functions for the near future. However, this is a hot
> topic and we are actively working on a solution.
With AspectC++ there is currently no way to instrument set and get
operations, especially in pure C code.
In C++ we have helped outselfs in the past by using special types for
the observed objects as in the "Redundancy Management" example on our
AOSD 2004 tutorial slides. However, this requires some refactoring of
the exisiting code base.
For pure C code this is, of course, no viable option.
I am also not aware of any other weaver for C/C++ that comes with this
feature, besides a dynamic weaver that was presented at the last AOSD
ACP4IS workshop, which executes the C code in a virtual machine...
Could you please give us some more information about your requirements?
It is very important for us to know what the users really need when we
design this language extension.
It would, of course, also be possible to implement a special-purpose
code transformation based on our AspectC++ parser framework. If the
AspectC++ parser has no problems with your code, this might be a worth
to be considered.
Please keep us posted about your experiences and decisions.
- Olaf
More information about the aspectc-user
mailing list