Tool support for understanding and diagnosing pointcut expressions

In this paper, we present algorithms that compute two kinds of information that can help AspectJ developers diagnose and fix potential problems with their pointcuts. First, we present an algorithm to compute almost matched joinpoints. Second, we present algorithms to compute explanations of why a pointcut does not match (or does match) a specific joinpoint. We implemented two tools using these algorithms. The first is an offline tool that analyzes a code base and produces a comprehensive report about the pointcuts in the code. Using this tool, we were able to find several real problems in existing, medium-sized AspectJ code bases. The second tool is an Eclipse plug-in called PointcutDoctor. PointcutDoctor is a natural extension of AJDT that provides developers easy access to the same information from within their already familiar development environment.

[1]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[2]  Jürgen Graf,et al.  Using pointcut delta analysis to support evolution of aspect-oriented software , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[3]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[4]  Tao Xie,et al.  APTE: automated pointcut testing for AspectJ programs , 2006, WTAOP '06.

[5]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[6]  Tao Xie,et al.  Efficient Mutant Generation for Mutation Testing of Pointcuts in Aspect-Oriented Programs , 2006, Second Workshop on Mutation Analysis (Mutation 2006 - ISSRE Workshops 2006).

[7]  Gary T. Leavens,et al.  Obliviousness, Modular Reasoning, and the Behavioral Subtyping Analogy , 2003 .

[8]  Hidehiko Masuhara,et al.  A Compilation and Optimization Model for Aspect-Oriented Programs , 2003, CC.

[9]  G. Kiczales,et al.  Aspect-oriented programming and modular reasoning , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[10]  Matthew Alexander Webster,et al.  Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools , 2004 .

[11]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[12]  Mira Mezini,et al.  Expressive Pointcuts for Increased Modularity , 2005, ECOOP.

[13]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[14]  Hans-Arno Jacobsen,et al.  Quantifying aspects in middleware platforms , 2003, AOSD '03.

[15]  Hidehiko Masuhara,et al.  Test-based pointcuts: a robust pointcut mechanism based on unit test cases for software evolution , 2007, LATE@AOSD.

[16]  Kris Gybels,et al.  Arranging language features for more robust pattern-based crosscuts , 2003, AOSD '03.

[17]  Robert E. Filman What Is Aspect-Oriented Programming, Revisited , 2001 .

[18]  R Day,et al.  The eclipse open-development platform , 2008 .

[19]  Ramnivas Laddad,et al.  Aspectj in Action: Practical Aspect-Oriented Programming , 2003 .