Eric Bodden Current conditions in Darmstadt: Cloud and Visibility OK, 4°C (feels like -1°C)
4°C

Easy and efficient software verification
  • rss
  • Home
  • Research
    • Past Research
      • Efficient Runtime Verification
      • Racer: Effective Race Detection Using AspectJ
      • Continuation-equivalent states (ICSE 2010)
      • Aspect-oriented programming and design
      • Visual specification languages
      • A denial-of-service attack on the Java bytecode verifier
    • Publications
    • Presentations
  • Tools
    • Clara: Compile-time Approximation of Runtime Analyses
    • RacerAJ (for race detection)
    • An introduction to Soot 2.2.5
    • Aspect-oriented approaches targeting the .NET Framework
  • Teaching
    • Automated Software Engineering
    • Software-Engineering Project
    • COMP 520
    • COMP 621
  • Legacy
    • Bad Sector Recovery on NTFS
    • Arithmetic Coding
    • PHP Scripts
  • About me
  • Photos

Aspect-oriented programming and design

Avoiding infinite recursion with Stratified Aspects

Stratified aspectsInfinite recursion is a known problem of aspect-oriented programming with AspectJ: if no special precautions are taken, aspects which advise other aspects can easily and unintentionally advise themselves. We developed a compiler for an extension of the AspectJ programming language that avoids self reference by associating aspects with levels, and by automatically restricting the scope of pointcuts used by an aspect to joinpoints of lower levels. We report on a case study using our language extension and quantify the changes necessary for migrating existing applications to it. Our results suggest that we can make programming with AspectJ simpler and safer, without restricting its expressive power unduly.

Read more about this research on the related web site.

Relational aspects as tracematches (and “relational tracematches”)

Different storage structure of association aspects, the relationship aspects library and relational aspects (our own approach)The relationships between objects in object-oriented applications are an essential property of the program’s design and implementation. Two previous approaches to implement relationships with aspects were association aspects, an AspectJ-based language extension, and the relationship aspects library. While those approaches greatly ease software development, we believe that they are not general enough. For instance, the library approach only works for binary relations, while the language extension does not allow for the association of primitive values or values from non-weavable classes.

Hence, in our work we proposed a generalized alternative implementation via a direct reduction to tracematches, a language feature for executing an advice after having matched a sequence of events.

This new implementation scheme yields multiple benefits. Firstly, our implementation is more general than existing ones, avoiding most previous limitations. It also yields a new language construct, relational tracematches.

We provide an efficient implementation based on the AspectBench compiler, along with test cases and micro-benchmarks. Our empirical studies showed that our implementation, when compared to previous approaches, uses a similar memory footprint with no leaking, but the generality of our approach does lead to some runtime overhead. We believe that our implementation can provide a solid foundation for future research.

The following code snippet shows a relational aspect in action.

relational abstract aspect SimpleObserver(Subject s, Observer o) {
    abstract pointcut subjectChanged(Subject subj);

    relational after(): subjectChanged(s) {
        o. notify(s );
    }

}

This aspect implements the well-known Observer pattern in which a set of observers is to be notified about certain observable changes in the state of a particular subject. With this aspect, all the client code has to do is call:

SimpleObserver.associate(mySubject,myObserver);

This will then automatically register this pair of objects with the aspect. Then, whenever the subject is updated, the after-advice in the relational aspect is executed. Conversely, the advice will not execute if a subject is updated that was not registered with the aspect. Hence, relational aspects can be used to attach semantics to groups of objects, implementing collaborations in a modular way.

Download the full AOSD 2008 paper here.

An AspectJ library for fault tolerance

As a course project at McGill, I developed a little library for fault tolerance, written in AspectJ 5. It contains two components:

  1. Support for automatic N-Version programming.
  2. A full implementation of a recovery cache.

More information about this project can be found here.

Comments rss
Comments rss
Trackback
Trackback

One Response to “Aspect-oriented programming and design”

  1. Eric Bodden » How relational aspects could have helped Princeton win the DARPA challenge says:
    April 28, 2008 at 9:56 pm

    [...] you could just as well have used association aspects or the relational aspects we proposed for next year’s AOSD conference. Using a relational aspect you can just implement [...]

Leave a Reply

Click here to cancel reply.

Welcome

Welcome to my website. Interested in my research? Click here for details or jump directly to my publications.

Pages

  • Research
    • Past Research
      • Continuation-equivalent states (ICSE 2010)
      • Efficient Runtime Verification
      • Racer: Effective Race Detection Using AspectJ
      • Aspect-oriented programming and design
      • Visual specification languages
      • A denial-of-service attack on the Java bytecode verifier
    • Publications
    • Presentations
  • Tools
    • Clara: Compile-time Approximation of Runtime Analyses
    • RacerAJ (for race detection)
    • An introduction to Soot 2.2.5
    • Aspect-oriented approaches targeting the .NET Framework
  • Teaching
    • Automated Software Engineering
    • Software-Engineering Project
    • COMP 520
    • COMP 621
  • Legacy
    • Arithmetic Coding
    • Bad Sector Recovery on NTFS
    • PHP Scripts
  • About me

Categories & Feeds

  • Misc RSS Feed Icon (89)
  • Montreal Blog RSS Feed Icon (44)
  • Research Blog RSS Feed Icon (67)
  • Comments (RSS) RSS Feed Icon

Kitchensink

  • Conferences
  • My first patent: Method and system for performance profiling of software (pending)
  • Photos

Research projects

  • AspectBench Compiler (abc)
  • J-LO
  • Soot
  • Stratified aspects

Service

  • AOSD 2006
  • AOSD 2007
  • AOSD 2010
  • AOSD 2011
  • Association of Alumni, Friends, and Supporters of the RWTH Aachen University in North America
  • ATVA 2008
  • ECOOP 2008 Doctoral Symposium
  • ECOOP 2010
  • FOAL 2010
  • IEEE Transactions on Software Engineering (TSE)
  • International Journal of Image and Graphics
  • ISSTA 2011
  • OOPSLA 2008
  • PEPM 2008
  • PLDI 2006
  • PLDI 2008
  • RV 2007
  • RV 2009
  • RV 2010
  • SEFM 2005
  • SEFM 2008
  • Transactions on Software Engineering and Methodology (TOSEM)
  • VMIL 2008
  • VMIL 2009

Some of my colleagues

  • Gregory Prokopski
  • Laurie Hendren
  • Nomair Naeem
  • Ondrej Lhotak
  • Patrick Lam
  • Programming Tools Group
  • Sable lab

Some other people I know

  • Adrian Colyer
  • Bruno Dufour
  • Dan North
  • Daniel Klink
  • Dave Thomas
  • Dean Wampler
  • Friedrich Steimann
  • Joachim Kneis
  • Klaus Havelund
  • Liz Keogh
  • Malte Clasen
  • Markus Schorn
  • Pascal Costanza
  • Patricia Jablonski
  • Philip Mayer
  • Ron Bodkin
  • Sven Wittig
  • Wiebke Berg

Some people not to confuse me with

  • Eric B. the terrorist
  • Eric Bodden the basketball player
  • Eric Bodden the chef who sunk
  • Eric Christopher Bodden
  • Noel R. Lopez alias Eric Bodden

Previous posts

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Tags

Alumni AspectJ Atlanta Blizzard Bug finding Clara COMP 621 Eclipse Flight FSE Google ISSTA Java LinkedIn Mac McGill Microsoft Montreal Blog OOPSLA Oxford Photos Politics Programming Quebec City Race detection Racer Random ranting Runtime verification RWTH Seattle Ski trip Snow Snow storm Soot Soot Tutorial Static Analysis Strike TA strike Thesis tracematches Typestate Vacation Website Winter carnival Wordpress


rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox