hyper/j and concern manipulation environment

31
Hyper/J and Concern Hyper/J and Concern Manipulation Environment Manipulation Environment

Upload: zulema

Post on 06-Jan-2016

17 views

Category:

Documents


0 download

DESCRIPTION

Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment. AOSD requires a variety of tools Life cycle – support all stages of artifact development Task directed – constraint enforcement, performance, feature addition etc. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Hyper/J and Concern Manipulation Environment

Hyper/J and Concern Hyper/J and Concern Manipulation EnvironmentManipulation Environment

Page 2: Hyper/J and Concern Manipulation Environment

The need for AOSD tools The need for AOSD tools and development and development environmentenvironment

AOSD requires a variety of tools Life cycle – support all stages of

artifact development Task directed – constraint

enforcement, performance, feature addition etc.

Paradigm specific – concern composition, aspect attachment

Page 3: Hyper/J and Concern Manipulation Environment

ProblemsProblems

Lack of framework for initial tool development

Integration is difficult – most tools are implemented from scratch

Customization is nearly impossible

Page 4: Hyper/J and Concern Manipulation Environment

PossiblePossible solutionsolution

Abstraction of basic concepts of concern oriented modeling

Reusable components for tool developers

Layered architecture

Page 5: Hyper/J and Concern Manipulation Environment

ConcernConcern ManipulationManipulation EnvironmentEnvironment Developed by IBM research labs Presented at AOSD 2004 Supports next generation of HyperJ Extensible, reusable, open,

customizable base for tool developers Some ready for use tools and

integration with Eclipse Open source

Page 6: Hyper/J and Concern Manipulation Environment

CMECME ArchitectureArchitecture 4 main layers – tools, components,

framework and engines Communication between layers are

through API and interfaces defined by CME Partial implementation of the most

important modules of each layer is provided by CME

Each layer is open for extension by tool developers

Page 7: Hyper/J and Concern Manipulation Environment
Page 8: Hyper/J and Concern Manipulation Environment

ToolsTools LayerLayer End user tools + GUI Customized for tasks, lifecycle stages,

artifacts, AOSD paradigms, environments Intended for extension by tool developers

more than other layers

Page 9: Hyper/J and Concern Manipulation Environment

ToolsTools layerlayer –– existingexisting itemsitems Concern explorer for Eclipse – creation and manipulation of

concern models and composition for Java Package explorer style view Visualize code affected by concern Query interface

Concern modeler – express the concerns and their relations visually

For example all methods that relate to a certain feature can be grouped together to form a concern

Define concern in terms of other concern, overlap concerns, constraints on units relationship

Hyper/J2 - compositor tool for Hyper/J style concern definition and composition

Create hyperslices and hypermodules, then integrate them into existing artifact

HyperProbe – insert problem detection probes into existing software

Debugging tool implemented using aspects

Page 10: Hyper/J and Concern Manipulation Environment

Using CMEUsing CME – installation– installation in Eclipse 3.0Eclipse 3.0++

Click 'Help' -> 'Software Updates' -> 'Find and Install'. Select 'Search for new features to install' and click 'Next'. Click 'Add Update Site'. Enter a name for the new update site you are creating, such as "CME Update Site", and enter the URL "http://download.eclipse.org/technology/cme/update". Click 'OK'.

Fully expand the CME Update Site node that appears, and select 'CME'. Click 'Next'. Select 'The Concern Manipulation Environment x.x.x' (where "x.x.x" is the CME version number shown).

Accept the license agreement

Page 11: Hyper/J and Concern Manipulation Environment

Using CME – UserUsing CME – User InterfaceInterface The CME perspective is designed to be used

for software exploration in which use of an editor (such as a code editor) is important

Page 12: Hyper/J and Concern Manipulation Environment

Using CME – Working with Using CME – Working with a projecta project To add the CME nature

to a project, right click on that project in the Package Explorer and select 'Add CME Nature'.

CME will create a new concern model for the project

The Concern Explorer view allows you to examine the current concern model. It deliberately resembles Eclipse's Package Explorer, so navigating it should be intuitive for Java developers. For example:

Page 13: Hyper/J and Concern Manipulation Environment

UsingUsing CMECME –– QueriesQueries To perform a query, the CME Search View is

used. You can enter a query manually in the available text box, or you can use the CME Search dialog, which assists with the creation of basic queries

To use the CME Search dialog Click the button in the CME Search view's toolbar The dialog has three tabs, which split the queries you

can create into three categories - Concern Model oriented, Artifact oriented and AspectJ-style

E.g. Searching for method calls with the AspectJ tab

Page 14: Hyper/J and Concern Manipulation Environment
Page 15: Hyper/J and Concern Manipulation Environment

UsingUsing CMECME –– QueriesQueries (cont.)(cont.) A preview of the

query will be created

Queries can be saved/loaded from the dialog box

Click evaluate to perform the search

Result dialog will appear

Page 16: Hyper/J and Concern Manipulation Environment

UsingUsing CMECME –– VisualizerVisualizer The Visualiser tool provides many functions

and shows an overview of where search results occur in source files

Page 17: Hyper/J and Concern Manipulation Environment

UsingUsing CMECME –– AddingAdding aa featurefeature toto existingexisting softwaresoftware Choose the package(s) you want to

modify Develop the feature in a separate

package, using the same classes and adding new ones if required. This is equivalent to creating a new hyperslice for the feature and implementing it

Create a new concern for the feature and integrate using the composer

Page 18: Hyper/J and Concern Manipulation Environment

Using CME – adding a Using CME – adding a feature (cont.)feature (cont.) Sample code from original package:

Page 19: Hyper/J and Concern Manipulation Environment

UsingUsing CMECME –– addingadding aa featurefeature (cont.)(cont.) Feature code written in a

separate package:

Page 20: Hyper/J and Concern Manipulation Environment

UsingUsing CME – adding a CME – adding a feature (cont.)feature (cont.) Highlight the

packages in the concern explorer

Right click and select "Compose New Concern“

This brings up the Compose Concern Wizard which has been filled in to compose the two concerns you selected and to handle conflicts by merging

Page 21: Hyper/J and Concern Manipulation Environment

UsingUsing CME – adding a CME – adding a feature (cont.)feature (cont.) Select name for the

new concern, its location and click next

On the next screen click finish

A new package will appear in the concern explorer with both old and new functionality inside

Page 22: Hyper/J and Concern Manipulation Environment

UsingUsing CME – adding a CME – adding a feature (cont.)feature (cont.) Code after merge –

a new class placed in a new package in the concern explorer

Page 23: Hyper/J and Concern Manipulation Environment

AspectJ in CME vs. AspectJ in CME vs. standalone plug-instandalone plug-in AspectJ composer in CME

No need to write aspect code directly – code can be assembled from model

Pointcut definition through query engine Uses own view perspective Visualizer

AspectJ plug-in Everything must be written explicitly Pointcut definition is done through AspectJ

code Standard Eclipse package explorer view Visualizer

Page 24: Hyper/J and Concern Manipulation Environment

ComponentsComponents LayerLayer Reusable components for tool builders Separate paradigms and concrete tools aimed

at specific tasks from concern representation Separate concern representation from

language constructs API for tool developers

Page 25: Hyper/J and Concern Manipulation Environment

ComponentsComponents –– existingexisting itemsitems Concern Composition Component (CCC) –

supports different composition semantics and weaving techniques

Defines interface for tools to specify what should be done where. AspectJ tool can use the API to define pointcuts

Control flow relations – before/after Concern Space Management Component

(Conman) – Modeling tool which represents concerns and their relationships in paradigm independent way

For example we want to state that certain concern is dependent on another as a prerequisite, and we want both the AspectJ tool and the HyperJ tool know about it

Page 26: Hyper/J and Concern Manipulation Environment

FrameworksFrameworks LayerLayer Low level concern representation model Language independent – dealing with abstract object

oriented language Pluggable for use with language specific drivers (engines) Defines how an artifact will be manipulated to adapt to a

concern

Page 27: Hyper/J and Concern Manipulation Environment

FrameworksFrameworks –– existingexisting itemsitems Concern Assembler Toolkit (CAT) – provides support for

assembling artifacts. XML based concern assembly language

Specify methods to be created Specify how methods should be combine to achieve the

desired result Concern Informant Toolkit (CIT) – common interface

providing information about OO elements Inheritance relations Accesibility of certain types within others Method properties

Pattern Matcher (PUMA) – extensible query language processor for artifact elements

Search for classes, methods, relationships, concerns Regular expressions

Page 28: Hyper/J and Concern Manipulation Environment

EnginesEngines LayerLayer Language dependent Designed to serve specific framework components Access to source code, binary or UML/XMI Most existing engines aim at Java related technology

Page 29: Hyper/J and Concern Manipulation Environment

EnginesEngines –– existingexisting itemsitems

Java binary manipulator Java source manipulator XMI file manipulator XML Serializer Multiple engine attachment

interface

Page 30: Hyper/J and Concern Manipulation Environment

ConclusionConclusion

Pros Non intrusive Can be used with existing artifacts Extensible by tool developers Open source

Page 31: Hyper/J and Concern Manipulation Environment

ConclusionConclusion

Cons AOSD is still a new concept Many components are not yet

implemented Limited deployment in real world

projects Heavy emphasis on specific

technology, even though claimed to support wide variety