Fine-Grained Generic Aspects

In theory, join points can be arbitrary places in the structure or execution of a program. However, most existing aspect languages do not support the full expressive power of this concept, limiting their pointcut languages to a subset of the theoretically possible join points. In this paper we explore a minimal language design based on only three built-in fine-grained pointcuts, which enable expressing the entire spectrum of structures of an underlying base language, from types to statements and expressions. The combination of fine-grained pointcuts with uniform genericity in our LogicAJ 2 language yields the concept of fine-grained generic aspects. We demonstrate their power by showing how they allow programmers to express and extend the static primitive pointcuts of AspectJ and how they can model applications that previously required run-time reflection or special purpose language extensions.

[1]  Thomas Ledoux,et al.  Aspect-Oriented Software Development , 2003 .

[2]  Kris De Volder Aspect-Oriented Logic Meta Programming , 1998, ECOOP Workshops.

[3]  Günter Kniesel,et al.  JMangler - a framework for load-time transformation of Java class files , 2001, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation.

[4]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[5]  Gregor Kiczales,et al.  A semantics for advice and dynamic join points in aspect-oriented programming , 2001, TOPL.

[6]  John R. Gurd,et al.  Using AspectJ to separate concerns in parallel scientific Java code , 2004, AOSD '04.

[7]  Karl J. Lieberherr,et al.  A case for statically executable advice: checking the law of demeter with AspectJ , 2003, AOSD '03.

[8]  Dean Wampler,et al.  Contract4J for Design by Contract in Java: Design Pattern-Like Protocols and Aspect Interfaces , 2006 .

[9]  Hidehiko Masuhara,et al.  A Compilation and Optimization Model for Aspect-Oriented Programs , 2003, CC.

[10]  Günter Kniesel,et al.  Generic Aspect Languages – Needs, Options and Challenges , 2005 .

[11]  Eelco Visser,et al.  Program Transformation with Stratego/XT: Rules, Strategies, Tools, and Systems in Stratego/XT 0.9 , 2003, Domain-Specific Program Generation.

[12]  Karl J. Lieberherr,et al.  Object-oriented programming: an objective sense of style , 1988, OOPSLA '88.

[13]  Fernando Castor,et al.  A Language for Specifying Java Transformations , 2001 .

[14]  Günter Kniesel,et al.  CC4J - Code Coverage for Java , 2002, Component Deployment.

[15]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[16]  Ondrej Lhoták,et al.  abc: an extensible AspectJ compiler , 2005, AOSD '05.

[17]  John R. Gurd,et al.  A join point for loops in AspectJ , 2006, AOSD '06.