|
|
SESSION: Aspects and generative programming |
|
|
|
|
AspectT: aspect-oriented test case instantiation |
| |
Sebastian Benz
|
|
Pages: 1-12 |
|
doi>10.1145/1353482.1353484 |
|
Full text: PDF
|
|
Test case instantiation is the transformation of abstract test cases into executable test scripts. Abstract test cases are either created during model based test case generation or are manually defined in a suitable modeling notation. The transformation ...
Test case instantiation is the transformation of abstract test cases into executable test scripts. Abstract test cases are either created during model based test case generation or are manually defined in a suitable modeling notation. The transformation varies depending on different testing concerns, such as test goal, test setup and test phase. Thus, for each testing concern a new transformation must be defined. This paper introduces AspectT, an aspect-oriented language for the instantiation of abstract test cases. We reduce the effort of test case instantiation by modularizing testing concerns in the form of aspects to enable their reuse in different testing contexts. The approach is implemented and integrated in an existing testing framework and has been successfully applied to test an electronic control unit of an automotive infotainment system at BMW Group. expand
|
|
|
"Program, enhance thyself!": demand-driven pattern-oriented program enhancement |
| |
Eli Tilevich,
Godmar Back
|
|
Pages: 13-24 |
|
doi>10.1145/1353482.1353485 |
|
Full text: PDF
|
|
Program enhancement refers to adding new functionality to an existing program. We argue that repetitive program enhancement tasks can be expressed as patterns, and that the application of such enhancement patterns can be automated. This paper presents ...
Program enhancement refers to adding new functionality to an existing program. We argue that repetitive program enhancement tasks can be expressed as patterns, and that the application of such enhancement patterns can be automated. This paper presents a novel approach to pattern-oriented automated enhancement of object-oriented programs. Our approach augments the capabilities of an aspect compiler to capture the programmer's intent to enhance a program. In response to the programmer referencing a piece of functionality that is non-existent, our approach automatically synthesizes aspect code to supply the required functionality transparently. To improve flexibility and facilitate reuse, the synthesis and application of the new functionality is guided by declarative whenthen rules, concisely expressed using a rule base. Our extensible automated program enhancement system, called DRIVEL1, extends the AspectJ compiler with aspect generating capabilities. The generation is controlled using the DROOLS rules engine. To validate our approach and automated tool, we have created a collection of enhancement libraries and used DRIVEL to apply them to the LibX Edition Builder, a large-scale, widely-used Web application. DRIVEL automatically enhanced the LibX Edition Builder's XML processing modules with structural navigation capabilities and caching, eliminating the need to implement this functionality by hand. expand
|
|
|
Modularity first: a case for mixing AOP and attribute grammars |
| |
Pavel Avgustinov,
Torbjörn Ekman,
Julian Tibble
|
|
Pages: 25-35 |
|
doi>10.1145/1353482.1353486 |
|
Full text: PDF
|
|
We have reimplemented the frontend of the extensible AspectBench Compiler for AspectJ, using the aspect-oriented meta-compiler JastAdd. The original frontend was purely object-oriented. Each frontend extends Java with AspectJ and an additional set of ...
We have reimplemented the frontend of the extensible AspectBench Compiler for AspectJ, using the aspect-oriented meta-compiler JastAdd. The original frontend was purely object-oriented. Each frontend extends Java with AspectJ and an additional set of pointcuts in a modular fashion. In this paper we give a detailed comparison of both approaches and show a number of advantages of using JastAdd: the implementation is half the size, twice as fast, concerns are better localised, extensions are composable, and computations are automatically scheduled. JastAdd provides a very constrained form of static AOP where only inter-type declarations and method execution interception are supported. However, additional modularisation mechanisms from the compiler construction community are supported in the form of demand-driven evaluation and attribute grammars. Our implementation would not have benefited from a richer pointcut language, while both demand-drive evaluation and declarative attributes were essential in enabling composable extensions and flexible modularisation. We believe that the AOP community at large can benefit from acknowledging demand-driven evaluation as an important modularisation mechanism. Also, reference attribute grammars enhance the extensible implementation of graphbased computations that rely on context-sensitive information. expand
|
|
|
SESSION: Reasoning about aspects |
|
|
|
|
AJANA: a general framework for source-code-level interprocedural dataflow analysis of AspectJ software |
| |
Guoqing Xu,
Atanas Rountev
|
|
Pages: 36-47 |
|
doi>10.1145/1353482.1353488 |
|
Full text: PDF
|
|
Aspect-oriented software presents new challenges for the designers of static analyses. Our work aims to establish systematic foundations for dataflow analysis of AspectJ software. We propose a control- and data-flow program representation for AspectJ ...
Aspect-oriented software presents new challenges for the designers of static analyses. Our work aims to establish systematic foundations for dataflow analysis of AspectJ software. We propose a control- and data-flow program representation for AspectJ programs, as basis for subsequent interprocedural dataflow analyses. The representation is built at the source code level and captures the semantic intricacies of various pointcut designators, multiple applicable advices per joint point, dynamic advices, and general flow of data to, from, and between advices. We also propose two dataflow analyses for AspectJ software: (1) a novel object effect analysis based on a flow- and context-sensitive must-alias analysis, and (2) a dependence analysis used for constructing the system dependence graph for slicing, refactoring, change impact analysis, etc. Both analyses are representative of a general category of dataflow analyses referred to as interprocedural distributed environment (IDE) problems. The two analyses are built on top of the proposed representation, and take into account the complex flow of control and data due to aspect-oriented features. We present a study of the proposed techniques on 37 program versions, using our Ajana analysis framework which is based on the abc AspectJ compiler. The results show that the representation can be built efficiently, that it is superior to an approach based on the woven bytecode, and that it enables analyses that are both faster and more precise. These findings strongly indicate that the proposed approach is a promising candidate for a foundation upon which various inter-procedural analyses for AspectJ can be designed and built. expand
|
|
|
Reasoning about aspects with common sense |
| |
Klaus Ostermann
|
|
Pages: 48-59 |
|
doi>10.1145/1353482.1353489 |
|
Full text: PDF
|
|
There has been a lot of debate about the modularity of aspect-oriented programs, and in particular the ability to reason about such programs in a modular way, although it has never been defined precisely what modular reasoning means. This work analyzes ...
There has been a lot of debate about the modularity of aspect-oriented programs, and in particular the ability to reason about such programs in a modular way, although it has never been defined precisely what modular reasoning means. This work analyzes what it means to reason about a program, and separates "modular reasoning" into several well-defined properties of a reasoning model. A comparison of an OO language semantics with an AO language semantics with respect to these properties reveals that explanations of AOP that are based on weaving are a major obstacle to reasoning about AO programs in a modular way. We argue that a more modular semantics that is easier to reason about can be given to AO programs if we renounce the monotonicity of the corresponding reasoning system - a sacrifice that is well-known in artificial intelligence to model "common sense" reasoning. More generally, we claim that AOP should be understood as a form of nonmonotonic knowledge representation. expand
|
|
|
SESSION: Programming language design and implementation I |
|
|
|
|
StrongAspectJ: flexible and safe pointcut/advice bindings |
| |
Bruno De Fraine,
Mario Südholt,
Viviane Jonckers
|
|
Pages: 60-71 |
|
doi>10.1145/1353482.1353491 |
|
Full text: PDF
|
|
AspectJ was designed as a seamless aspect-oriented extension of the Java programming language. However, unlike Java, AspectJ does not have a safe type system: an accepted binding between a pointcut and an advice can give rise to type errors at runtime. ...
AspectJ was designed as a seamless aspect-oriented extension of the Java programming language. However, unlike Java, AspectJ does not have a safe type system: an accepted binding between a pointcut and an advice can give rise to type errors at runtime. In addition, AspectJ's typing rules severely restrict the definition of certain generic advice behavior. In this paper, we analyze the roots of these type errors, and describe measures to recover type safety for both generic and non-generic pointcut/advice declarations. Pointcuts quantify over heterogeneous sets of join points and are hence typed using type ranges in our approach, while type variables and a dual advice signature allow to express the generic and invasive nature of advices. Using these mechanisms, we can express advice that augments, narrows or replaces base functionality in possibly generic contexts. As a language engineering contribution, we integrate our proposal with the AspectJ language, and we provide a prototype implementation as a plugin for the AspectBench Compiler (abc). On a theoretical level, we present a formal definition of the proposed constructs and typing rules, and develop proofs for their type safety properties. expand
|
|
|
EJFlow: taming exceptional control flows in aspect-oriented programming |
| |
Nelio Cacho,
Fernando Castor Filho,
Alessandro Garcia,
Eduardo Figueiredo
|
|
Pages: 72-83 |
|
doi>10.1145/1353482.1353492 |
|
Full text: PDF
|
|
Many of the problems that stem from the use of exception handling are caused by the local way in which exceptions are handled. It demands that developers understand the source of an exception, the place where it is handled, and everything in between. ...
Many of the problems that stem from the use of exception handling are caused by the local way in which exceptions are handled. It demands that developers understand the source of an exception, the place where it is handled, and everything in between. As a consequence, exceptions easily get "out of control" and, as system development progresses, exceptional control flows become less well-understood, with potentially negative consequences for the program maintainability and reliability. This paper presents an innovative aspect-oriented model for exception handling implementation. In contrast to other exception handling mechanisms, our model provides abstractions to explicitly describe global views of exceptional control flows. As a result, this new model makes it possible to understand exception flows from an end-to-end perspective by looking at a single part of the program. Also, it leverages existing pointcut languages to make the association of handlers with normal code more flexible. The implementation of our proposed model, called EJFlow, extends the AspectJ programming language with the aim of promoting enhanced robustness and program modularization. We evaluate qualitatively and quantitatively the proposed exception handling model through a case study targeting a real mobile application. expand
|
|
|
Relational aspects as tracematches |
| |
Eric Bodden,
Reehan Shaikh,
Laurie Hendren
|
|
Pages: 84-95 |
|
doi>10.1145/1353482.1353493 |
|
Full text: PDF
|
|
The relationships between objects in an object-oriented program are an essential property of the program's design and implementation. Two previous approaches to implement relationships with aspects were association aspects, an AspectJ-based language ...
The relationships between objects in an object-oriented program are an essential property of the program's design and implementation. Two previous approaches to implement relationships with aspects were association aspects, an AspectJ-based language extension, and the relationship aspects library. While those approaches greatly ease software development, we believe that they are not general enough. For instance, the library approach only works for binary relationships, while the language extension does not allow for the association of primitive values or values from non-weavable classes. Hence, in this work we propose a generalized alternative implementation via a direct reduction to tracematches, a language feature for executing an advice after having matched a sequence of events. This new implementation scheme yields multiple benefits. Firstly, our implementation is more general than existing ones, avoiding most previous limitations. It also yields a new language construct, relational tracematches. We provide an efficient implementation based on the AspectBench Compiler, along with test cases and microbenchmarks. Our empirical studies showed that our implementation, when compared to previous approaches, uses a similar memory footprint with no leaking, but the generality of our approach does lead to some runtime overhead. We believe that our implementation can provide a solid foundation for future research. expand
|
|
|
Test-based pointcuts for robust and fine-grained join point specification |
| |
Kouhei Sakurai,
Hidehiko Masuhara
|
|
Pages: 96-107 |
|
doi>10.1145/1353482.1353494 |
|
Full text: PDF
|
|
We propose test-based pointcuts, a novel pointcut mechanism for AspectJ-like aspect-oriented programming languages. The idea behind the test-based pointcuts is to specify join points through unit test cases associated with the target program. ...
We propose test-based pointcuts, a novel pointcut mechanism for AspectJ-like aspect-oriented programming languages. The idea behind the test-based pointcuts is to specify join points through unit test cases associated with the target program. The test-based pointcuts improve robustness and precision of pointcut languages. The test-based pointcuts are more robust against software evolution because they do not directly rely on identifier names in a target program. The test-based pointcuts are more precise because they can distinguish fine grained execution histories including conditional branches by comparing the runtime execution histories with recorded for ones of the unit test cases. This paper presents design and implementation of the test-based pointcuts as an extension of an AspectJ compiler. We evaluated robustness and runtime efficiency of test-based pointcuts through case studies that applied test-based pointcuts to several versions of practical application programs. expand
|
|
|
SESSION: Aspects for adaptation and variability support |
|
|
|
|
Edicts: implementing features with flexible binding times |
| |
Venkat Chakravarthy,
John Regehr,
Eric Eide
|
|
Pages: 108-119 |
|
doi>10.1145/1353482.1353496 |
|
Full text: PDF
|
|
In a software product line, the binding time of a feature is the time at which one decides to include or exclude a feature from a product. Typical binding site implementations are intended to support a single binding time only, e.g., compile time ...
In a software product line, the binding time of a feature is the time at which one decides to include or exclude a feature from a product. Typical binding site implementations are intended to support a single binding time only, e.g., compile time or run time. Sometimes, however, a product line must support features with variable binding times. For instance, a product line may need to include both embedded system configurations, in which features are selected and optimized early, and desktop configurations, in which client programs choose features on demand. We present a new technique for implementing the binding sites of features that require flexible binding times. Our technique combines design patterns and aspect-oriented programming: a pattern encapsulates the variation point, and targeted aspects---called edicts---set the binding times of the pattern participants. We describe our approach and demonstrate its usefulness by creating a middleware product line capable of serving the desktop and embedded domains. Our product line is based on JacORB, a middleware platform with many dynamically configurable features. By using edicts to select features at compile time, we create a version of JacORB more suited to resource-constrained environments. By configuring four JacORB subsystems via edicts, we achieve a 32.2% reduction in code size. Our examples show that our technique effectively modularizes binding-time concerns, supporting both compile-time optimization and run-time flexibility as needed. expand
|
|
|
Support for distributed adaptations in aspect-oriented middleware |
| |
Eddy Truyen,
Nico Janssens,
Frans Sanen,
Wouter Joosen
|
|
Pages: 120-131 |
|
doi>10.1145/1353482.1353497 |
|
Full text: PDF
|
|
Many aspect-oriented middleware platforms support run-time aspect weaving, but do not support coordinating distributed changes to a set of aspects at run-time. A distributed change entails weaving or unweaving multiple inter-dependent aspects that are ...
Many aspect-oriented middleware platforms support run-time aspect weaving, but do not support coordinating distributed changes to a set of aspects at run-time. A distributed change entails weaving or unweaving multiple inter-dependent aspects that are logically or physically distributed. Coordinating such multiple weavings inside the application layer is a complex and difficult task for the application developer, because global state consistency, structural integrity and other safety properties have to be preserved. In this paper, we present the DyReS framework that offers the required coordination support on top of existing aspect-oriented middleware platforms. The framework is customizable towards application-specific requirements to achieve improved performance and reconfiguration semantics. We have validated our approach by delivering and examining two implementations of the DyReS framework: one on top of JBoss AOP and a second one for Spring AOP. expand
|
|
|
SESSION: Tool support |
|
|
|
|
Tool-supported refactoring of aspect-oriented programs |
| |
Jan Wloka,
Robert Hirschfeld,
Joachim Hänsel
|
|
Pages: 132-143 |
|
doi>10.1145/1353482.1353499 |
|
Full text: PDF
|
|
Aspect-oriented programming languages provide new composition mechanisms for improving the modularity of crosscutting concerns. Implementations of such language support use advanced program representations, like abstract syntax trees or stack traces, ...
Aspect-oriented programming languages provide new composition mechanisms for improving the modularity of crosscutting concerns. Implementations of such language support use advanced program representations, like abstract syntax trees or stack traces, to enable an indirect specification (pointcut) of executions of program elements at which aspect code (advice) is invoked. During the evolution of a program, this representations will change and, hence, advice may not be executed as intended by the developer. In this paper we present a tool-supported refactoring approach that addresses this evolution problem by automating the detection of change effects on pointcuts and the generation of pointcut updates. A new model for decomposing pointcuts into simpler expressions is used as the base for deriving the change impact on pointcuts. Based on this model, we show how program analysis can detect affected or even broken pointcuts, how suitable pointcut adjustments can be derived, and when developer feedback is unavoidable. expand
|
|
|
Tool support for understanding and diagnosing pointcut expressions |
| |
Lingdong Ye,
Kris De Volder
|
|
Pages: 144-155 |
|
doi>10.1145/1353482.1353500 |
|
Full text: PDF
|
|
In this paper, we present algorithms that compute two kinds of information that can help AspectJ developers diagnose and fix potential problems with their pointcuts. First, we present an algorithm to compute almost matched joinpoints. Second, we present ...
In this paper, we present algorithms that compute two kinds of information that can help AspectJ developers diagnose and fix potential problems with their pointcuts. First, we present an algorithm to compute almost matched joinpoints. Second, we present algorithms to compute explanations of why a pointcut does not match (or does match) a specific joinpoint. We implemented two tools using these algorithms. The first is an offline tool that analyzes a code base and produces a comprehensive report about the pointcuts in the code. Using this tool, we were able to find several real problems in existing, medium-sized AspectJ code bases. The second tool is an Eclipse plug-in called PointcutDoctor. PointcutDoctor is a natural extension of AJDT that provides developers easy access to the same information from within their already familiar development environment. expand
|
|
|
View-based maintenance of graphical user interfaces |
| |
Peng Li,
Eric Wohlstadter
|
|
Pages: 156-167 |
|
doi>10.1145/1353482.1353501 |
|
Full text: PDF
|
|
One difficulty in software maintenance is that the relationship between observed program behavior and source code is not always clear. In this paper we are concerned specifically with the maintenance of graphical user interfaces (GUIs). User interface ...
One difficulty in software maintenance is that the relationship between observed program behavior and source code is not always clear. In this paper we are concerned specifically with the maintenance of graphical user interfaces (GUIs). User interface code can crosscut the decomposition of applications making GUIs hard to maintain. A popular approach to develop and maintain GUIs is to use "What you see is what you get" editors. They allow developers to work directly with a graphical design view instead of scattered source elements. Unfortunately GUI editors are limited by their ability to statically reconstruct dynamic collaborations between objects. In this paper we investigate the combination of a hybrid dynamic and static approach to allow for view-based maintenance of GUIs. Dynamic analysis reconstructs object relationships, providing a concrete context in which maintenance can be performed. Static checking restricts that only changes in the design view which can meaningfully be translated back to source are allowed. We implemented a prototype IDE plug-in and evaluate our approach by applying it to five open source projects. expand
|
|
|
SESSION: Programming language design and implementation II |
|
|
|
|
Expressive scoping of dynamically-deployed aspects |
| |
Éric Tanter
|
|
Pages: 168-179 |
|
doi>10.1145/1353482.1353503 |
|
Full text: PDF
|
|
Several aspect languages and frameworks have recognized the need for dynamic deployment of aspects. However, they do not provide sufficiently expressive means to precisely specify the scope of deployed aspects. As a result, programmers have to resort ...
Several aspect languages and frameworks have recognized the need for dynamic deployment of aspects. However, they do not provide sufficiently expressive means to precisely specify the scope of deployed aspects. As a result, programmers have to resort to unnecessarily complex pointcut definitions that hinder the reuse potential of aspects. To address the issue of precise and expressive scoping of aspects at deployment time, we propose deployment strategies for parameterized dynamic aspect deployment. This novel mechanism gives full control over the propagation of the aspect on the call stack and within created objects or functions, and permits a deployment-specific refinement of its pointcuts. We discuss and illustrate the gain in expressiveness, and provide the operational semantics of deployment strategies with Scheme interpreters, for both functional and object-oriented based aspect languages. expand
|
|
|
Lightweight virtual machine support for AspectJ |
| |
Ryan M. Golbeck,
Samuel Davis,
Immad Naseer,
Igor Ostrovsky,
Gregor Kiczales
|
|
Pages: 180-190 |
|
doi>10.1145/1353482.1353504 |
|
Full text: PDF
|
|
Advice weaving can be efficiently supported with only lightweight enhancements to existing Virtual Machines. Performing weaving at the Java bytecode (JBC) level while preserving appropriate metadata enables the VM to understand the AspectJ-specific semantics ...
Advice weaving can be efficiently supported with only lightweight enhancements to existing Virtual Machines. Performing weaving at the Java bytecode (JBC) level while preserving appropriate metadata enables the VM to understand the AspectJ-specific semantics of the code and optimize it. This allows the overhead of advice weaving and performing non-local advice dispatch optimization to occur prior to runtime. It also allows the VM to perform optimizations that are unavailable to a bytecode level weaver. An experimental implementation shows that this approach can take advantage of previously known macro optimizations of expensive constructs, including cflow, as well as micro optimizations including those based on improved type analysis unavailable to JBC-based advice dispatch. A thorough benchmark evaluation confirms that the use of this architecture does not result in runtime performance overhead and benefits from the implemented optimizations. expand
|
|
|
Nu: a dynamic aspect-oriented intermediate language model and virtual machine for flexible runtime adaptation |
| |
Robert Dyer,
Hridesh Rajan
|
|
Pages: 191-202 |
|
doi>10.1145/1353482.1353505 |
|
Full text: PDF
|
|
A variety of dynamic aspect-oriented language constructs are proposed in recent literature with corresponding, compelling use cases. Such constructs demonstrate the need to dynamically adapt the set of join points intercepted at a fine-grained level. ...
A variety of dynamic aspect-oriented language constructs are proposed in recent literature with corresponding, compelling use cases. Such constructs demonstrate the need to dynamically adapt the set of join points intercepted at a fine-grained level. The notion of morphing aspects and continuous weaving is motivated by this need. We propose an intermediate language model called Nu, that extends object-oriented intermediate language models with two fine-grained deployment primitives: bind and remove. These primitives offer a higher level of abstraction as a compilation target for dynamic aspect-oriented language constructs, thereby making it easier to support such constructs. We present the design and implementation of the Nu model in the Sun Hotspot VM, an industrial strength virtual machine, which serves to show the feasibility of the intermediate language design. Our implementation uses dedicated caching mechanisms to significantly reduce the amortized costs of join point dispatch. Our evaluation shows that the cost of supporting a dynamic deployment model can be reduced to as little as ~1.5%. We demonstrate the potential utility of the intermediate language design by expressing a variety of aspect-oriented source language constructs of dynamic flavor such as CaeserJ's deploy, history-based pointcuts, and control flow constructs in terms of the Nu model. expand
|