[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [aosd-discuss] Dynamically scoped functions

some minor corrections to my own reply...

Pascal Costanza wrote:

> Any approach that allows one to write functions that produce lists of 
> function names would be candidates for valid pointcut models.
> For example, it seems to me that the best way to handle negative 
> information ("!cflowbelow") is a logic metaprogramming approach (in the 
> sense of SOUL and Tyruba). It's pretty easy to include a logic 
> programming framework in Common Lisp...

I have pulled a fast one here. The !cflowbelow is indeed not so easy to 
describe with just a function that creates a list of function names. But 
I still think that's a good direction to investigate.

>>   - Make it possible to define advice on pointcuts globally,
>>     to get complete non-invasiveness (obliviousness) back.
>>     Maybe call this advice!!! :)
> :)
> (setf (symbol-function 'main)
>       (lambda (&rest args)
>         (dflet ...
>           (main ...))))
> ;-)

Untested code which won't work. Better:

(let ((org-main (symbol-function 'main)))
   (setf (symbol-function 'main)
	(lambda (&rest args)
           (dflet ...
             (funcall org-main ...)))))


Pascal Costanza               University of Bonn
mailto:costanza@web.de        Institute of Computer Science III
http://www.pascalcostanza.de  Römerstr. 164, D-53117 Bonn (Germany)