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

RE: [aosd-discuss] Dynamically scoped functions



(warning, this message is long!)

I guess I think this framework misses key aspects of AOP.

I do agree that there is a sense in which the cflow pointcut feels like
a "lexically scoped dynamic binding". But to try to cast all of AOP into
this intuitition doesn't work.

Some of the problems I see with the dynamic binding characterization are:

  - Dynamic binding is too restrictive for AOP.

    We want AOP to be able to have pointcuts that involve static
    analysis as well. Consider just the simple within pointcut
    in AspectJ.

    Or consider the more elaborate example from my AOSD talk
    [http://tinyurl.com/p22w]. In that example, we want the pointcuts
    to work in terms of a static control flow analysis. We essentially
    write a pointcut that says "find the places control can reach from
    here, and do something interesting there".

    There are a number of interesting aspects that could use such
    functionality, and several researchers are working in this area.

  - dflet is too restrictive.

    We don't want to have to wrap the entry to the computation in a
    dflet. This interferes with non-invasiveness (obliviousness).

  - Just functions is too restrictive.

    We want join points to be able to be other things, like field
    accesses.

  - Lack of compositional crosscutting. 

    We want to be able to write things like:

     (see http://tinyurl.com/p259 for details of ... )


     pointcut move(): ...;

     pointcut topLevelMove(): move() && !cflowbelow(move());

    The poincuts are the crosscutting mechanism. They let you take
    a cut or slice through the code (or execution) and affect
    semantics there. And, critically, the pointcuts are compositional.
    (The ll1-discuss people remember Hal and Gerry saying that
    PL mechanisms have to be compositional and support abstraction.)

    I don't see that the dflet mechanism is compositional.


Of course you could fix these problems easily enough. You could:

  - Add more kinds of points than function calls. Maybe call
    them join points!

  - Define compositional predicates on those points. Maybe
    call them pointcuts!!

  - Make it possible to define advice on pointcuts globally,
    to get complete non-invasiveness (obliviousness) back.
    Maybe call this advice!!! :)

I think that would end up being pretty close to the characterization
in Mitch Wand's papers.


> -----Original Message-----
> From: discuss-admin@aosd.net [mailto:discuss-admin@aosd.net] 
> On Behalf Of Pascal Costanza
> Sent: Monday, September 29, 2003 6:53 AM
> To: AOSD
> Subject: [aosd-discuss] Dynamically scoped functions
> 
> 
> 
> I have a paper about "dynamically scoped functions as the essence of 
> AOP" published in the August issue of SIGPLAN Notices. See 
> http://doi.acm.org/10.1145/944579.944587
> 
> It is a slightly extended version of the one presented at the 
> post-Java 
> workshop at ECOOP 2003. (Now, it also includes a minor extension to 
> cover multiple join points.)
> 
> I am very interested in opinions and feedback about this idea. Please 
> contact me if you would like to read the paper but don't have an ACM 
> account.
> 
> 
> Pascal
> 
> -- 
> 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)
> 
> __________________________________________________
> AOSD Discuss mailing list   -   discuss@aosd.net
> http://aosd.net/mailman/listinfo/discuss
>