CMU-ISRI-04-141
Institute for Software Research International
School of Computer Science, Carnegie Mellon University



CMU-ISRI-04-141

Open Modules: Modular Reasoning about Advice

Jonathan Aldrich

December 2004

This technical report is an expanded version of a paper submitted for publication.
It supercedes Institute for Software Research International Technical Report
CMU-ISRI-04-108, published in March 2004 and revised in July 2004.

CMU-ISRI-04-141.ps
CMU-ISRI-04-141.pdf


Keywords: Open modules, modular reasoning, pointcuts, advice, aspect-oriented programming, TinyAspect, contextual equivalence, operational semantics, type theory, type soundness, sealing, logical equivalence, bisimulation, component-based software engineering


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.

21 pages


Return to: SCS Technical Report Collection
School of Computer Science homepage

This page maintained by reports@cs.cmu.edu