SCoPE: an AspectJ compiler for supporting user-defined analysis-based pointcuts

  • Authors:
  • Tomoyuki Aotani;Hidehiko Masuhara

  • Affiliations:
  • University of Tokyo;University of Tokyo

  • Venue:
  • Proceedings of the 6th international conference on Aspect-oriented software development
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper proposes an approach called SCoPE, which supports user-defined analysis-based pointcuts in aspect-oriented programming (AOP) languages. The advantage of our approach is better integration with existing AOP languages than previous approaches. Instead of extending the language, SCoPE allows the programmer to write a pointcut that analyzes a program by using a conditional (if) pointcut with introspective reflection libraries. A compilation scheme automatically eliminates runtime tests for such a pointcut. The approach also makes effects of aspects visible to the analysis, which is essential for determining proper aspect interactions. We implemented a SCoPE compiler for the AspectJ language on top of the AspectBench compiler using a backpatching technique. The implementation efficiently finds analysis-based pointcuts, and generates woven code without runtime tests for those pointcuts. Our benchmark tests with JHotDraw and other programs showed that SCoPE compiles programs with less than 1% compile-time overhead, and generates a program that is as efficient as an equivalent program that uses merely static pointcuts.