Flexible Pointcut Implementation: An Interpreted Approach

Ali Assaf 1, 2 Jacques Noyé 1, 2, *
* Corresponding author
2 ASCOLA - Aspect and composition languages
Inria Rennes – Bretagne Atlantique , Département informatique - EMN, LINA - Laboratoire d'Informatique de Nantes Atlantique
Abstract : One of the main elements of an Aspect-Oriented Programming (AOP) language or framework is its pointcut language. A pointcut is a predicate which selects program execution points and determines at which points the execution should be affected by an aspect. Experimenting with AspectJ shows that two basic primitive pointcuts, call and execution, dealing with method invoca- tion from the caller and callee standpoints, respectively, lead to confusion. This is due to a subtle interplay between the use of static and dynamic types to select execution points, dynamic lookup, and the expectation to easily select the caller and callee execution points related to the same invocation. As a result, alternative semantics have been proposed but have remained paper design. In this article, we reconsider these various semantics in a practical way by implementing them using CALI, our Common Aspect Language Interpreter. This framework reuses both Java as a base language and AspectJ as a way to select the program execution points of interest. An additional interpretation layer can then be used to prototype interesting AOP variants in a full-blown environment. The paper illustrates the benefits of applying such a setting to the case of the call and execution pointcuts. We show that alternative semantics can be implemented very easily and exercised in the context of AspectJ without resorting to complex compiler technology.
Document type :
Conference papers
Complete list of metadatas

https://hal.inria.fr/inria-00460796
Contributor : Noyé Jacques <>
Submitted on : Tuesday, March 2, 2010 - 2:52:01 PM
Last modification on : Friday, June 22, 2018 - 9:29:18 AM

Identifiers

  • HAL Id : inria-00460796, version 1

Citation

Ali Assaf, Jacques Noyé. Flexible Pointcut Implementation: An Interpreted Approach. Langages et Modèles à Objets (LMO 2009), Olivier Zendra, Mar 2009, Nancy, France. pp.45-60. ⟨inria-00460796⟩

Share

Metrics

Record views

813