Skip to main content
QUICK REVIEW

[Paper Review] A classification of invasive patterns in AOP

Freddy Muñoz, Benoît Baudry|ArXiv.org|Apr 10, 2008
Elevator Systems and Control9 references7 citations
TL;DR

This paper proposes a fine-grained classification system for invasive patterns in Aspect-Oriented Programming (AOP), focusing on how aspects modify base program structures and behaviors. By analyzing AspectJ's mechanisms, it categorizes invasiveness into behavioral, data access, and structural dimensions, enabling developers to reason about aspect risks and improve modularity and safety in AOP systems.

ABSTRACT

Aspect-Oriented Programming (AOP) improves modularity by encapsulating crosscutting concerns into aspects. Some mechanisms to compose aspects allow invasiveness as a mean to integrate concerns. Invasiveness means that AOP languages have unrestricted access to program properties. Such kind of languages are interesting because they allow performing complex operations and better introduce functionalities. In this report we present a classification of invasive patterns in AOP. This classification characterizes the aspects invasive behavior and allows developers to abstract about the aspect incidence over the program they crosscut.

Motivation & Objective

  • To address the lack of systematic characterization of invasive behaviors in AOP, which can compromise encapsulation and introduce unintended side effects.
  • To provide developers with a structured way to reason about the impact and risks of aspects on base programs.
  • To enable better specification and verification of AOP systems by identifying and categorizing invasive behaviors.
  • To support the development of safer, more predictable AOP frameworks through formalized classification of aspect interactions.

Proposed method

  • Analyzing AspectJ's invasive mechanisms to identify core patterns of program modification.
  • Categorizing invasive behaviors into three dimensions: behavioral (augmentation, replacement, conditional replacement), data access (read, write, argument passing), and structural (hierarchy, field addition, operation addition).
  • Using a running example (MyArrayList with MyAspect) to illustrate each classification category in practice.
  • Deriving a taxonomy based on access patterns to fields, method arguments, and class structure, emphasizing how aspects break encapsulation.
  • Comparing the proposed classification with existing work to validate its granularity and utility.
  • Formulating a framework for future specification of aspects and base programs based on these invasive patterns.

Experimental results

Research questions

  • RQ1How can invasive behaviors in AOP be systematically classified to support reasoning about their impact on base programs?
  • RQ2What are the distinct patterns through which aspects can modify program structure, behavior, and data access?
  • RQ3How do invasive AOP mechanisms differ from non-invasive or safe aspects in terms of control flow and field access?
  • RQ4To what extent can this classification improve the specification and verification of aspect-oriented programs?
  • RQ5What are the limitations of existing classification approaches in capturing the full spectrum of invasive AOP behaviors?

Key findings

  • The paper introduces a comprehensive classification of invasive AOP patterns into three dimensions: behavioral, data access, and structural.
  • The behavioral dimension includes patterns such as Augmentation, Replacement, and Conditional Replacement, which alter method execution flow.
  • The data access dimension identifies patterns like Read, Write, and Argument Passing, which involve accessing or modifying object fields or method parameters.
  • The structural dimension covers modifications to class hierarchy, field addition, and method addition, which alter the class structure itself.
  • The classification reveals that some patterns are mutually exclusive (e.g., Replacement and Conditional Replacement cannot coexist in the same advice), while others are complementary (e.g., Write implies Augmentation).
  • The classification is more fine-grained than prior work, such as Katz’s three-category model (spectative, regulatory, invasive), and provides a foundation for future specification frameworks in AOP.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.