Classpects: Unifying Aspect- and Object-Oriented Language Design

By: Hridesh Rajan and Kevin J. Sullivan

PDF Download Download Paper

Abstract

The contribution of this work is the design, implementation, and early evaluation of a programming language that unifies classes and aspects. We call our new module construct the classpect. We make three basic claims. First, we can realize a unified design without significantly compromising the expressiveness of current aspect languages. Second, such a design improves the conceptual integrity of the programming model. Third, it significantly improves the compositionality of aspect modules, expanding the program design space from the two-layered model of AspectJ-like languages to include hierarchical structures. To support these claims, we present the design and implementation of Eos-U, an AspectJ-like language based on C# that supports classpects as the basic unit of modularity. We show that Eos-U supports layered designs in which classpects separate integration concerns flexibly at multiple levels of composition. The underpinnings of our design include support for aspect instantiation under program control, instance-level advising, advising as a general alternative to object-oriented method invocation and overriding, and the provision of a separate join-point-method binding construct.

ACM Reference

Rajan, H. and Sullivan, K.J. 2005. Classpects: Unifying Aspect- and Object-Oriented Language Design. ICSE ’05: Proceedings of the 27th International Conference on Software Engineering (New York, NY, USA, 2005).

BibTeX Reference

@inproceedings{rajan2005classpects,
  author = {Hridesh Rajan and Kevin J. Sullivan},
  title = {Classpects: Unifying Aspect- and Object-Oriented Language Design},
  booktitle = {ICSE '05: Proceedings of the 27th International Conference on Software Engineering},
  year = {2005},
  location = {St. Louis, MO},
  publisher = {ACM},
  address = {New York, NY, USA},
  entrysubtype = {conference},
  abstract = {
    The contribution of this work is the design, implementation, and early
    evaluation of a programming language that unifies classes and aspects. We call
    our new module construct the classpect. We make three basic claims. First, we
    can realize a unified design without significantly compromising the
    expressiveness of current aspect languages. Second, such a design improves the
    conceptual integrity of the programming model. Third, it significantly
    improves the compositionality of aspect modules, expanding the program design
    space from the two-layered model of AspectJ-like languages to include
    hierarchical structures. To support these claims, we present the design and
    implementation of Eos-U, an AspectJ-like language based on C# that supports
    classpects as the basic unit of modularity. We show that Eos-U supports
    layered designs in which classpects separate integration concerns flexibly at
    multiple levels of composition. The underpinnings of our design include
    support for aspect instantiation under program control, instance-level
    advising, advising as a general alternative to object-oriented method
    invocation and overriding, and the provision of a separate join-point-method
    binding construct.
  }
}