Compiling Conditional Pointcuts for User-Level Semantic Pointcuts (bibtex)
by Tomoyuki Aotani and Hidehiko Masuhara
Abstract:
We propose a compilation framework that compiles conditional pointcuts (i.e., if pointcuts) in AspectJ for allowing the programmer to define expressive pointcuts without runtime overheads. The framework automatically finds conditional pointcuts that are static with respect to join point shadows, evaluates them at compile-time, and generates compiled code that performs no runtime tests for those pointcuts. By writing conditions that examine static properties of a program, the programmer can simulate many semantic pointcuts within current AspectJ's semantics yet without runtime overheads. Our compiler implementation identifies static conditional pointcuts by using a technique similar to the binding-time analysis in partial evaluation, and employs double-compilation scheme to guarantee the same behavior to the code generated by the existing AspectJ compilers. Our experiments confirmed that the compiler is capable of compiling several semantic pointcuts, such as the ones testing class membership (e.g., has and hasfield), testing join point location (e.g., withinstaticinitialization), matching by using regular expressions, and checking high-level coding rules (e.g., the Law of Demeter).
Reference:
Compiling Conditional Pointcuts for User-Level Semantic Pointcuts (Tomoyuki Aotani and Hidehiko Masuhara), In Proceedings of Software-Engineering Properties of Languages and Aspect Technologies (SPLAT05) (Lodewijk Bergmans, Kris Gybels, Peri Tarr, Erik Ernst, eds.), 2005.
Bibtex Entry:
@inproceedings{aotani2005splat,
  opturl = {http://www.daimi.au.dk/~eernst/splat05/},
  month = mar,
  address = {Chicago, IL, USA},
  editor = {Lodewijk Bergmans and Kris Gybels and Peri Tarr and Erik Ernst},
  year = 2005,
  booktitle = {Proceedings of Software-Engineering Properties of Languages and Aspect Technologies (SPLAT05)},
  author = {Tomoyuki Aotani and Hidehiko Masuhara},
  title = {Compiling Conditional Pointcuts for User-Level Semantic Pointcuts},
  pdf = {splat2005.pdf},
  keywords = {SCoPE, AspectJ},
  abstract = {We propose a compilation framework that compiles conditional pointcuts (i.e., if pointcuts) in AspectJ for allowing the programmer to define expressive pointcuts without runtime overheads. The framework automatically finds conditional pointcuts that are static with respect to join point shadows, evaluates them at compile-time, and generates compiled code that performs no runtime tests for those pointcuts. By writing conditions that examine static properties of a program, the programmer can simulate many semantic pointcuts within current AspectJ's semantics yet without runtime overheads. Our compiler implementation identifies static conditional pointcuts by using a technique similar to the binding-time analysis in partial evaluation, and employs double-compilation scheme to guarantee the same behavior to the code generated by the existing AspectJ compilers. Our experiments confirmed that the compiler is capable of compiling several semantic pointcuts, such as the ones testing class membership (e.g., has and hasfield), testing join point location (e.g., withinstaticinitialization), matching by using regular expressions, and checking high-level coding rules (e.g., the Law of Demeter).}
}
Powered by bibtexbrowser