Open modules: modular reasoning about advice

  • Authors:
  • Jonathan Aldrich

  • Affiliations:
  • Carnegie Mellon University, Pittsburgh, PA

  • Venue:
  • ECOOP'05 Proceedings of the 19th European conference on Object-Oriented Programming
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Advice is a mechanism used by advanced object-oriented and aspect-oriented programming languages to augment the behavior of methods in a program. Advice can help to make programs more modular by separating crosscutting concerns more effectively, but it also challenges existing ideas about modularity and separate development. We study this challenge using a new, simple formal model for advice as it appears in languages like AspectJ. We then add a module system designed to leave program functionality as open to extension through advice as possible, while still enabling separate reasoning about the code within a module. Our system, Open Modules, can either be used directly to facilitate separate, component-based development, or can be viewed as a model of the features that certain AOP IDEs provide. We define a formal system for reasoning about the observational equivalence of programs under advice, which can be used to show that clients are unaffected by semantics-preserving changes to a module's implementation. Our model yields insights into the nature of modularity in the presence of advice, provides a mechanism for enforceable contracts between component providers and clients in this setting, and suggests improvements to current AOP IDEs.