From ChristianBitter at web.de Mon Jun 5 14:01:59 2006 From: ChristianBitter at web.de (Christian Bitter) Date: Mon Jun 5 14:02:15 2006 Subject: [Eos-discuss] Message-ID: <25160902.1149530521184.JavaMail.fmail@fmcert02.dlan.cinetic.de> Hello Eos List, My question ist the following: assuming I have simple class class X { public void SaySomething() { Console.WriteLine("SaySomething"); } } class Program { public static void Main(string [] parms) { X _x = new X; X.SaySomething(); } } how can get the call to Console.WriteLine() being intercepted by an aspect. The call joinpoint does not exist and my attempts to do something like aspect MyAspect { pointcut Trace () : execution (any WriteLine(..)) && within(System.Console) && !within(MyAspect); } did not work.. So is it possible to do what I want. I do this simple example because I want to intercept method calls to other classes and not weave to calls of (in this example) class X Best Regards, Christian Bitter ------------------------------------------ Christian Bitter Hoyerswerdaer Str. 10 01099 Dresden ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1770 bytes Desc: S/MIME Cryptographic Signature Url : http://www.cs.Virginia.EDU/pipermail/eos-discuss/attachments/20060605/bb688ebb/smime.bin From hridesh at cs.iastate.edu Mon Jun 5 14:24:38 2006 From: hridesh at cs.iastate.edu (Hridesh Rajan) Date: Mon Jun 5 14:24:56 2006 Subject: [Eos-discuss] In-Reply-To: <25160902.1149530521184.JavaMail.fmail@fmcert02.dlan.cinetic.de> References: <25160902.1149530521184.JavaMail.fmail@fmcert02.dlan.cinetic.de> Message-ID: <12367b660606051124t4533c334t970087a74da8de95@mail.gmail.com> Hi Christian, In the absence of the call join points, you can simulate it using Wrappers. Here is the example code. The original call now becomes execution join point within the wrapper. class ConsoleWrapper { WriteLine(string s) { System.Console.WriteLine(s); } } class X { public void SaySomething() { ConsoleWrapper.WriteLine("SaySomething"); } } class Tracing { pointcut Trace () : execution (any ConsoleWrapper.WriteLine(..)) && !within(Tracing); } Hope it helps. Let me know if you have any other issues. Hridesh On 6/5/06, Christian Bitter wrote: > Hello Eos List, > > My question ist the following: > > assuming I have simple class > > class X > { > public void SaySomething() > { > Console.WriteLine("SaySomething"); > } > } > > class Program > { > public static void Main(string [] parms) > { > X _x = new X; > X.SaySomething(); > } > } > > how can get the call to Console.WriteLine() being intercepted by an aspect. The call joinpoint does not exist and my attempts to do something like > > aspect MyAspect > { > pointcut Trace () : execution (any WriteLine(..)) && within(System.Console) && !within(MyAspect); > } > > did not work.. > > So is it possible to do what I want. I do this simple example because I want to intercept method calls to other classes and not weave to calls of (in this example) class X > > Best Regards, > > Christian Bitter > ------------------------------------------ > Christian Bitter > Hoyerswerdaer Str. 10 > 01099 Dresden > ______________________________________________________________ > Verschicken Sie romantische, coole und witzige Bilder per SMS! > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 > > > > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@ares.cs.Virginia.EDU > http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/eos-discuss > > > > -- Hridesh Rajan Assistant Professor Dept of Computer Sc., Iowa State University http://www.cs.iastate.edu/~hridesh From ChristianBitter at web.de Mon Jun 5 15:35:04 2006 From: ChristianBitter at web.de (Christian Bitter) Date: Mon Jun 5 15:35:19 2006 Subject: [Eos-discuss] Message-ID: <15958380.1149536106254.JavaMail.fmail@fmcert01.dlan.cinetic.de> Hi, well this would certainly help in this situation but what I am looking for is actually something that helps me in the following scenario ... A) assume a PluginHost that loads plugins via reflection (LoadAssembly, perform checks if assembly is plugin, get type, instantiatem ... ) B) assume a Facade that offers some methods e.g. void SaySomething() so there is interface IFacade and class FacadeImplementation : IFacade ... C) assume a Plugin so there is an interface IPlugin and class PluginImplementation : IPlugin what I want is the following, the Plugin calls methods on the facade when I change the facade IFacade and FacadeImplementation I want to do that without changing the Plugin explicitly Assume Plugin calls MethodX on FacadeImplementation, now I change IFacade and FacadeImplementation so that MethodX becomes MethodY so I want to write an aspect that tracks all "calls" from my Plugin class to FacadeImplementation.MethodX so that they can be substituted (maybe around advice) with FacadeImplementation.MethodY Another question I have is: Is it possible to weave an aspect to a library module (*.dll) and what were the compiler options ? Best regards Christian ------------------------------------------ Christian Bitter Hoyerswerdaer Str. 10 01099 Dresden _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000071 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1770 bytes Desc: S/MIME Cryptographic Signature Url : http://www.cs.Virginia.EDU/pipermail/eos-discuss/attachments/20060605/cdf2681b/smime.bin From hridesh at cs.iastate.edu Tue Jun 6 00:06:34 2006 From: hridesh at cs.iastate.edu (Hridesh Rajan) Date: Tue Jun 6 00:06:40 2006 Subject: [Eos-discuss] In-Reply-To: <15958380.1149536106254.JavaMail.fmail@fmcert01.dlan.cinetic.de> References: <15958380.1149536106254.JavaMail.fmail@fmcert01.dlan.cinetic.de> Message-ID: <12367b660606052106i1e775856wf4dae92258393a35@mail.gmail.com> See comments below: On 6/5/06, Christian Bitter wrote: > Hi, > > well this would certainly help in this situation but what I am looking for is actually something that helps me in the following scenario ... > > > A) assume a PluginHost that loads plugins via reflection (LoadAssembly, perform checks if assembly is plugin, get type, instantiatem ... ) > > B) assume a Facade that offers some methods e.g. void SaySomething() > so there is interface IFacade and class FacadeImplementation : IFacade ... > > C) assume a Plugin > so there is an interface IPlugin and class PluginImplementation : IPlugin > > what I want is the following, the Plugin calls methods on the facade > when I change the facade IFacade and FacadeImplementation I want to do that without changing the Plugin explicitly > > Assume Plugin calls MethodX on FacadeImplementation, now I change IFacade and FacadeImplementation so that MethodX becomes MethodY > > so I want to write an aspect that tracks all "calls" from my Plugin class to FacadeImplementation.MethodX so that they can be substituted (maybe around advice) with FacadeImplementation.MethodY > In the OO world, one would suggest you to use the GOF adapter pattern. This is essentially the problem of mismatched interfaces between your plug-in and the Facade that can be easily solved by an adapter. However, If you insist on using aspects, why don't you consider using an around advice on execution of FacadeImplementation.MethodX. Ignore the original call (i.e. do not proceed) and call FacadeImplementation.MethodY, but that will require you to leave the implementation of MethodX intact in the interface. An alternative and perhaps better solution in that case might be to just have an empty body for MethodX with just a call to MethodY. > > > Another question I have is: > > Is it possible to weave an aspect to a library module (*.dll) and what were the compiler options ? > Eos does not support weaving to a library module. We are developing another AO approach for .NET called "Nu". Nu allows you to weave into library module (*.dll). A word of warning, Nu versions are still preliminary. Good news is that Nu is open source. For more information: http://www.cs.iastate.edu/~nu Best, Hridesh > Best regards > > Christian > ------------------------------------------ > Christian Bitter > Hoyerswerdaer Str. 10 > 01099 Dresden > _____________________________________________________________________ > Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > http://smartsurfer.web.de/?mc=100071&distributionid=000000000071 > > > > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@ares.cs.Virginia.EDU > http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/eos-discuss > > > > -- Hridesh Rajan Assistant Professor Dept of Computer Sc., Iowa State University http://www.cs.iastate.edu/~hridesh From hridesh at cs.iastate.edu Mon Jun 26 12:58:31 2006 From: hridesh at cs.iastate.edu (Hridesh Rajan) Date: Mon Jun 26 12:58:38 2006 Subject: [Eos-discuss] Re: Reg:EOS Version [and new Eos version 0.3.4 released today] Message-ID: <12367b660606260958q791db8d7j47fedb7abb91a711@mail.gmail.com> Hi Ravi, We have released a new Eos version Eos 0.3.4 today that contains a simple example that explains the handler patterns. The new Eos release is available from http://www.cs.iastate.edu/~eos/ Best regards, Hridesh On 6/20/06, KUMAR Jonnalagada Ravi wrote: > Hi Hridesh > > Please tell me about handler (name-pattern) if possible an > example. > > Thanks and Regards > Ravi Kumar > > -----Original Message----- > From: hridesh@gmail.com [mailto:hridesh@gmail.com] On Behalf Of Hridesh > Rajan > Sent: Monday, June 19, 2006 8:37 PM > To: KUMAR Jonnalagada Ravi > Subject: Re: Reg:EOS Version > > Hi Ravi, > > Why do you need source code of Eos? Please let me know. > > Hridesh > > On 6/19/06, KUMAR Jonnalagada Ravi wrote: > > Hi Hridesh, > > > > What is the process of getting source code for the same? > > > > Thanks and Regards, > > Ravi > > > > -----Original Message----- > > From: hridesh@gmail.com [mailto:hridesh@gmail.com] On Behalf Of > Hridesh > > Rajan > > Sent: Monday, June 19, 2006 8:27 PM > > To: KUMAR Jonnalagada Ravi > > Subject: Re: Reg:EOS Version > > > > Hi Ravi, > > > > The source code for Eos is not available to public. Only the > > distribution is available for download. > > > > Hridesh > > > > On 6/19/06, KUMAR Jonnalagada Ravi wrote: > > > Hi Hridesh, > > > > > > I have gone through the web address could not able to find the link > > for > > > source for the same. So could you please help me to locate the > source > > > code for the latest release of EOS0.3.3? > > > > > > Earliest reply is appreciated. > > > > > > Thanks and regards, > > > Ravi. > > > > > > -----Original Message----- > > > From: hridesh@gmail.com [mailto:hridesh@gmail.com] On Behalf Of > > Hridesh > > > Rajan > > > Sent: Monday, June 19, 2006 8:02 PM > > > To: KUMAR Jonnalagada Ravi > > > Subject: Re: Reg:EOS Version > > > > > > Dear Ravi, > > > > > > All information about Eos is available from: > > > > > > http://www.cs.iastate.edu/~eos/ > > > > > > On 6/19/06, KUMAR Jonnalagada Ravi wrote: > > > > Dear Hridesh Rajan > > > > > > > > Thanks for you reply. > > > > > > > > We are happy to analyze EOS and we intend required the > > source > > > > code, documents and sample examples of current version. It will > be > > > > great full if you please let us know web address. > > > > > > > > Thanks in advance > > > > > > > > Ravi Kumar. > > > > > > > > > > > > -----Original Message----- > > > > From: hridesh@gmail.com [mailto:hridesh@gmail.com] On Behalf Of > > > Hridesh > > > > Rajan > > > > Sent: Wednesday, June 14, 2006 6:39 PM > > > > To: KUMAR Jonnalagada Ravi > > > > Subject: Re: Reg:EOS Version > > > > > > > > Hi Ravi, > > > > > > > > The current release version is the release version, however, you > > > > should read the licensing agreement before using it in real > > products. > > > > > > > > Hridesh > > > > > > > > On 6/14/06, KUMAR Jonnalagada Ravi wrote: > > > > > > > > > > > > > > > > > > > > > > > > > Dear Hridesh Rajan > > > > > > > > > > I would like know current release version 0.3.3 of EOS is > > Beta > > > > or > > > > > Release version > > > > > > > > > > Earlier help is appreciated. > > > > > > > > > > Thanks and Regards > > > > > > > > > > Ravi Kumar > > > > > > > > > > > > > > > Confidentiality Statement: > > > > > > > > > > This message is intended only for the individual or entity to > > which > > > it > > > > is > > > > > addressed. It may contain privileged, confidential information > > which > > > > is > > > > > exempt from disclosure under applicable laws. If you are not the > > > > intended > > > > > recipient, please note that you are strictly prohibited from > > > > disseminating > > > > > or distributing this information (other than to the intended > > > > recipient) or > > > > > copying this information. If you have received this > communication > > in > > > > error, > > > > > please notify us immediately by return email. > > > > > > > > > > > > -- > > > > Hridesh Rajan > > > > Assistant Professor > > > > Dept of Computer Sc., Iowa State University > > > > http://www.cs.iastate.edu/~hridesh > > > > Confidentiality Statement: > > > > > > > > This message is intended only for the individual or entity to > which > > it > > > is addressed. It may contain privileged, confidential information > > which > > > is exempt from disclosure under applicable laws. If you are not the > > > intended recipient, please note that you are strictly prohibited > from > > > disseminating or distributing this information (other than to the > > > intended recipient) or copying this information. If you have > received > > > this communication in error, please notify us immediately by return > > > email. > > > > > > > > > > > > > > > > > -- > > > Hridesh Rajan > > > Assistant Professor > > > Dept of Computer Sc., Iowa State University > > > http://www.cs.iastate.edu/~hridesh > > > Confidentiality Statement: > > > > > > This message is intended only for the individual or entity to which > it > > is addressed. It may contain privileged, confidential information > which > > is exempt from disclosure under applicable laws. If you are not the > > intended recipient, please note that you are strictly prohibited from > > disseminating or distributing this information (other than to the > > intended recipient) or copying this information. If you have received > > this communication in error, please notify us immediately by return > > email. > > > > > > > > > > > > -- > > Hridesh Rajan > > Assistant Professor > > Dept of Computer Sc., Iowa State University > > http://www.cs.iastate.edu/~hridesh > > Confidentiality Statement: > > > > This message is intended only for the individual or entity to which it > is addressed. It may contain privileged, confidential information which > is exempt from disclosure under applicable laws. If you are not the > intended recipient, please note that you are strictly prohibited from > disseminating or distributing this information (other than to the > intended recipient) or copying this information. If you have received > this communication in error, please notify us immediately by return > email. > > > > > > > -- > Hridesh Rajan > Assistant Professor > Dept of Computer Sc., Iowa State University > http://www.cs.iastate.edu/~hridesh > Confidentiality Statement: > > This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by return email. > > -- Hridesh Rajan Assistant Professor Dept of Computer Sc., Iowa State University http://www.cs.iastate.edu/~hridesh