Testing of aspect-oriented software
Aspect oriented programming (AOP) is one of the means for separation of concerns. For example, non-functional concerns such as fault-tolerance can be implemented in separate components and then woven into the application code. Our work uses AOP to develop micro-aspects that can be combined to realize a given fault tolerance mechanism. The toolbox of micro-aspects also makes mechanisms easily reconfigurable at a fine grain. However, the composed micro-aspects may exhibit undesirable interactions and side effects, called interferences. We have developed an approach to detect interferences with executable assertions [LWF12], based on an existing extension of AspectJ. The AIRIA extension offers a Resolver operator to precisely control the composition of conflicting aspects. It also adds observation points that are lacking in AspectJ, making it possible to automatically instrument the code to detect various types of interferences during testing (including both control- and data-flow interferences). We have demonstrated the micro-aspects development and instrumentation approach on a case study, involving a Primary-Backup replication protocol [LFW13]. The micro-aspects facilitate reconfigurations from passive to active replication, as well as the introduction of new mechanisms (e.g., an authentification mechanism). Non-interference properties attached to the micro-aspects allow us to automatically produce the assertion-checking code. Four integration faults have been successfully detected during the development of the case study, two genuine ones and two introduced on purpose.
Publications
[LFW13] J.Lauret, J.C.Fabre, H. Weaselynck: Fine-grained implementation of fault tolerance mechanisms with AOP: to what extent? Proc. International Conference on Computer Safety, Reliability and Security (SafeComp), Toulouse (France), Sept. 2013.
[LWF12] J. Lauret, H. Weaselynck, J.C. Fabre: Detection of interferences in aspect-oriented programs using executable assertions, Proc. Int. Workshop on Program Debugging (IWPD), Dallas (USA), November 2012. LAAS Report N°12607