scispace - formally typeset
Search or ask a question
Journal ArticleDOI

Execution levels for aspect-oriented programming: Design, semantics, implementations and applications

TL;DR: This paper introduces execution levels in order to address the issue of infinite regression of aspect-oriented programs, and adopts a defensive default that avoids infinite regression, and gives advanced programmers the means to override this default using level-shifting operators.
About: This article is published in Science of Computer Programming.The article was published on 2014-02-01 and is currently open access. It has received 21 citations till now. The article focuses on the topics: Study Execution & Aspect-oriented programming.
Citations
More filters
Journal Article
TL;DR: AspectJ as mentioned in this paper is a simple and practical aspect-oriented extension to Java with just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns.
Abstract: Aspect] is a simple and practical aspect-oriented extension to Java With just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns. In AspectJ's dynamic join point model, join points are well-defined points in the execution of the program; pointcuts are collections of join points; advice are special method-like constructs that can be attached to pointcuts; and aspects are modular units of crosscutting implementation, comprising pointcuts, advice, and ordinary Java member declarations. AspectJ code is compiled into standard Java bytecode. Simple extensions to existing Java development environments make it possible to browse the crosscutting structure of aspects in the same kind of way as one browses the inheritance structure of classes. Several examples show that AspectJ is powerful, and that programs written using it are easy to understand.

2,947 citations

01 Jan 1988
Abstract: In an important series of papers [8, 9], Brian Smith has discussed the nature of programs that know about their text and the context in which they are executed. He called this kind of knowledgereflection. Smith proposed a programming language, called 3-LISP, which embodied such self-knowledge in the domain of metacircular interpreters. Every 3-LISP program is interpreted by a metacircular interpreter, also written in 3-LISP. This gives rise to a picture of an infinite tower of metacircular interpreters, each being interpreted by the one above it. Such a metaphor poses a serious challenge for conventional modes of understanding of programming languages. In our earlier work on reflection [4], we showed how a useful species of reflection could be modeled without the use of towers. In this paper, we give a semantic account of the reflective tower. This account is self-contained in the sense that it does not employ reflection to explain reflection.

82 citations

Journal ArticleDOI
TL;DR: The results show that documentation of patterns, size of pattern classes, and the scattering degree of patterns have clear impact on quality, and Studying how to improve patterns modularity is recommended for future research.
Abstract: The impact of design patterns on quality attributes has been extensively evaluated in studies with different perspectives, objectives, metrics, and quality attributes, leading to contradictive and hard to compare results. The authors' objective is to explain these results by considering confounding factors, practices, metrics, or implementation issues that affect quality. Furthermore, there is a lack of research that connects design patterns evaluations to patterns development studies. Accordingly, they also aim at providing an initiate on how patterns structure and implementation can be improved, to promote software quality. To achieve their goals, conducted a systematic literature review by searching the literature for related studies. The study covers the period between years 2000 and 2018. They identified 804 candidate papers. After applying inclusion and exclusion criteria, they were left with 50 primary studies. Their results show that documentation of patterns, size of pattern classes, and the scattering degree of patterns have clear impact on quality. In case studies, researchers used different metrics applied to different modules. Controlled experiments have major design differences. Reaching consensuses on the effect of patterns requires considering influencing factors, using unified metrics, and an agreement on what modules to measure. Studying how to improve patterns modularity is recommended for future research.

21 citations

Book ChapterDOI
01 Jan 2014
TL;DR: This work brings type-based reasoning about effects for the first time in the pointcut/advice model, in a framework that is both expressive and extensible; thus allowing development of robust aspect-oriented systems as well as being a useful research tool for experimenting with new aspect semantics.
Abstract: Aspect-oriented programming (AOP) aims to enhance modularity and reusability in software systems by offering an abstraction mechanism to deal with crosscutting concerns. However, in most general-purpose aspect languages aspects have almost unrestricted power, eventually conflicting with these goals. In this work we present Effective Aspects: a novel approach to embed the pointcut/advice model of AOP in a statically typed functional programming language like Haskell. Our work extends EffectiveAdvice, by Oliveira, Schrijvers, and Cook; which lacks quantification, and explores how to exploit the monadic setting in the full pointcut/advice model. Type soundness is guaranteed by exploiting the underlying type system, in particular phantom types and a new anti-unification type class. Aspects are first-class, can be deployed dynamically, and the pointcut language is extensible, therefore combining the flexibility of dynamically typed aspect languages with the guarantees of a static type system. Monads enables us to directly reason about computational effects both in aspects and base programs using traditional monadic techniques. Using this we extend Aldrich’s notion of Open Modules with effects, and also with protected pointcut interfaces to external advising. These restrictions are enforced statically using the type system. Also, we adapt the techniques of EffectiveAdvice to reason about and enforce control flow properties. Moreover, we show how to control effect interference using the parametricity-based approach of EffectiveAdvice. However, this approach falls short when dealing with interference between multiple aspects. We propose a different approach using monad views, a recently developed technique for handling the monad stack. Finally, we exploit the properties of our monadic weaver to enable the modular construction of new semantics for aspect scoping and weaving. These semantics also benefit fully from the monadic reasoning mechanisms present in the language. This work brings type-based reasoning about effects for the first time in the pointcut/advice model, in a framework that is both expressive and extensible; thus allowing development of robust aspect-oriented systems as well as being a useful research tool for experimenting with new aspect semantics.

9 citations


Cites methods from "Execution levels for aspect-oriente..."

  • ...For instance, it becomes possible to prevent aspect and/or base computation to use effects provided by the ELT monad transformer, thus ensuring that the default semantics of execution levels is preserved (and therefore that the program is free of aspect loops [42])....

    [...]

Journal ArticleDOI
14 Feb 2020
TL;DR: Reflectivity, its API, its implementation and its usage in Pharo are presented, and it is shown how it has been used as a basic building block of many innovative ideas, as well as a mature framework for unanticipated, non-intrusive and partial behavioral reflection based on AST annotation.
Abstract: Context. Refining or altering existing behavior is the daily work of every developer, but that cannot be always anticipated, and software sometimes cannot be stopped. In such cases, unanticipated adaptation of running systems is of interest for many scenarios, ranging from functional upgrades to on-the-fly debugging or monitoring of critical applications. Inquiry. A way of altering software at run time is using behavioral reflection, which is particularly well-suited for unanticipated adaptation of real-world systems. Partial behavioral reflection is not a new idea, and for years many efforts have been made to propose a practical way of expressing it. All these efforts resulted in practical solutions, but which introduced a semantic gap between the code that requires adaptation and the expression of the partial behavior. For example, in Aspect-Oriented Programming, a pointcut description is expressed in another language, which introduces a new distance between the behavior expression (the Advice) and the source code in itself. Approach. Ten years ago, the idea of closing the gap between the code and the expression of the partial behavior led to the implementation of the Reflectivity framework. Using Reflectivity, developers annotate Abstract Syntax Tree (AST) nodes with meta-behavior which is taken into account by the compiler to produce behavioral variations. In this paper, we present Reflectivity, its API, its implementation and its usage in Pharo. We reflect on ten years of use of Reflectivity, and show how it has been used as a basic building block of many innovative ideas. Knowledge. Reflectivity brings a practical way of working at the AST level, which is a high-level representation of the source code manipulated by software developers. It enables a powerful way of dynamically add and modify behavior. Reflectivity is also a flexible mean to bridge the gap between the expression of the meta-behavior and the source code. This ability to apply unanticipated adaptation and to provide behavioral reflection led to many experiments and projects during this last decade by external users. Existing work use Reflectivity to implement reflective libraries or languages extensions, featherweight code instrumentation, dynamic software update, debugging tools and visualization and software analysis tools. Grounding. Reflectivity is actively used in research projects. During the past ten years, it served as a support, either for implementation or as a fundamental base, for many research work including PhD theses, conference, journal and workshop papers. Reflectivity is now an important library of the Pharo language, and is integrated at the heart of the platform. Importance. Reflectivity exposes powerful abstractions to deal with partial behavioral adaptation, while providing a mature framework for unanticipated, non-intrusive and partial behavioral reflection based on AST annotation. Furthermore, even if Reflectivity found its home inside Pharo, it is not a pure Smalltalk-oriented solution. As validation over the practical use of Reflectivity in dynamic object-oriented languages, the API has been ported to Python. Finally, the AST annotation feature of Reflectivity opens new experimentation opportunities about the control that developers could gain on the behavior of their own software.

8 citations


Cites background from "Execution levels for aspect-oriente..."

  • ...In AOP [28], developers inject cross-cutting behavior (advices) at key points in the base code (pointcuts)....

    [...]

  • ...Tanter discussed execution levels in the context of AOP [60]....

    [...]

  • ...5:5 Tanter discussed execution levels in the context of AOP [60]....

    [...]

  • ...A discussion of the relationship between AOP and Partial Behavioral Reflection is out of the scope of this paper and has been discussed by Tanter [62]....

    [...]

  • ...Tools that rely on bytecode instrumentation are tedious to develop either because of the use of low-level bytecode manipulation libraries or because of the AOP join point model....

    [...]

References
More filters
Journal Article
TL;DR: AspectJ as mentioned in this paper is a simple and practical aspect-oriented extension to Java with just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns.
Abstract: Aspect] is a simple and practical aspect-oriented extension to Java With just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns. In AspectJ's dynamic join point model, join points are well-defined points in the execution of the program; pointcuts are collections of join points; advice are special method-like constructs that can be attached to pointcuts; and aspects are modular units of crosscutting implementation, comprising pointcuts, advice, and ordinary Java member declarations. AspectJ code is compiled into standard Java bytecode. Simple extensions to existing Java development environments make it possible to browse the crosscutting structure of aspects in the same kind of way as one browses the inheritance structure of classes. Several examples show that AspectJ is powerful, and that programs written using it are easy to understand.

2,947 citations

Book ChapterDOI
18 Jun 2001
TL;DR: AspectJ provides support for modular implementation of a range of crosscutting concerns, and simple extensions to existing Java development environments make it possible to browse the crosscutting structure of aspects in the same kind of way as one browses the inheritance structure of classes.
Abstract: AspectJ? is a simple and practical aspect-oriented extension to Java?. With just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns. In AspectJ's dynamic join point model, join points are well-defined points in the execution of the program; pointcuts are collections of join points; advice are special method-like constructs that can be attached to pointcuts; and aspects are modular units of crosscutting implementation, comprising pointcuts, advice, and ordinary Java member declarations. AspectJ code is compiled into standard Java bytecode. Simple extensions to existing Java development environments make it possible to browse the crosscutting structure of aspects in the same kind of way as one browses the inheritance structure of classes. Several examples show that AspectJ is powerful, and that programs written using it are easy to understand.

2,810 citations

Book
01 Aug 1991
TL;DR: A new approach to programming language design is presented, which resolves fundamental tensions between elegance and efficiency, and a metaobject protocol is presented that gives users the ability to incrementally modify the language's behavior and implementation.

1,291 citations


"Execution levels for aspect-oriente..." refers background in this paper

  • ...The issue of infinite regression in metalevel architectures has long been identified [19,30]....

    [...]

Book
30 Jul 1991
TL;DR: In this article, the authors present a new approach to programming language design, which resolves fundamental tensions between elegance and efficiency, called metaobject protocols, which are interfaces to the lanaguage that give users the ability to incrementally modify the language's behavior and implementation, as well as to write programs within the language.
Abstract: From the Publisher: This book presents a new approach to programming language design, which resolves fundamental tensions between elegance and efficiency. Metaobject protocols are interfaces to the lanaguage that gives users the ability to incrementally modify the language's behavior and implementation, as well as the ability to write programs within the language. In this way, a metaobject protocol allows users to adjust the lanaguage to better suit their needs.

1,100 citations

Book
01 Jan 2003
TL;DR: This is a practical guide to AOP and Aspect J, which enables AOP programming in Java by adding a few new language constructs and re-usable code examples will enable quick implementation of functionality.
Abstract: This is a practical guide to AOP and Aspect J. The re-usable code examples will enable quick implementation of functionality.*ApectJ enables AOP programming in Java by adding a few new language constructs.By using Java as the base language and creating a final system that is compatible with Java byte code specification, AspectJ passes on all the benefits of Java. *The use of Java as the base language also makes AspectJ a relatively easy language to learn. *Book is divided into three parts: Introduction, Examples and everyday situations in which to use. A software system is the realization of a set of concerns. One of the central premises of object-oriented programming is that each concern should be implemented as a separate module. However, there are certain system-wide concerns, such as logging, security, performance and so forth, that often need to be addressed in many, if not all of the modules. Consequently, the code to handle these system-wide concerns may be mixed in with the core logic of a huge number of modules, resulting in lower productivity, poor quality and systems that are hard to evolve.Aspect-oriented programming overcomes these problems by modularizing the system-wide concerns. AspectJ enables AOP programming in Java by adding a few new language constructs. By using Java as the base language and creating a final system that is compatible with Java byte code specification, AspectJ passes on all the benefits of Java. The use of Java as the base language also makesd AspectJ a relatively easy language to learn.

520 citations