StrongAspectJ: Flexible and Safe Pointcut/Advice Bindings

Bruno De Fraine, Mario Sudholt, Viviane Jonckers

Research output: Chapter in Book/Report/Conference proceedingConference paper

26 Citations (Scopus)

Abstract

AspectJ was designed as a seamless aspect-oriented extension of the Java programming language. However, unlike Java, AspectJ does not have a safe type system: an accepted binding between a pointcut and an advice can give rise to type errors at runtime. In addition, AspectJ's typing rules severely restrict the definition of certain generic advice behavior.

In this paper, we analyze the roots of these type errors, and describe measures to recover type safety for both generic and non-generic pointcut/advice declarations. Pointcuts quantify over heterogeneous sets of join points and are hence typed using type ranges in our approach, while type variables and a dual advice signature allow to express the generic and invasive nature of advices. Using these mechanisms, we can express advice that augments, narrows or replaces base functionality in possibly generic contexts.

As a language engineering contribution, we integrate our proposal with the AspectJ language, and we provide a prototype implementation as a plugin for the AspectBench Compiler (abc). On a theoretical level, we present a formal definition of the proposed constructs and typing rules, and develop proofs for their type safety properties.
Original languageEnglish
Title of host publicationProceedings of the Seventh International Conference on Aspect-Oriented Software Development (AOSD2008)
EditorsMira Mezini
PublisherACM
Pages60-71
Number of pages12
ISBN (Print)978-1-60558-044-9
Publication statusPublished - 31 Mar 2008
EventFinds and Results from the Swedish Cyprus Expedition: A Gender Perspective at the Medelhavsmuseet - Stockholm, Sweden
Duration: 21 Sep 200925 Sep 2009

Publication series

NameProceedings of the Seventh International Conference on Aspect-Oriented Software Development (AOSD2008)

Conference

ConferenceFinds and Results from the Swedish Cyprus Expedition: A Gender Perspective at the Medelhavsmuseet
CountrySweden
CityStockholm
Period21/09/0925/09/09

Bibliographical note

Mira Mezini

Keywords

  • Aspect-Oriented Programming
  • Typing
  • Pointcut
  • Advice
  • Generics

Fingerprint Dive into the research topics of 'StrongAspectJ: Flexible and Safe Pointcut/Advice Bindings'. Together they form a unique fingerprint.

Cite this