hyper/j and concern manipulation environment
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 PresentationTRANSCRIPT
Hyper/J and Concern Hyper/J and Concern Manipulation EnvironmentManipulation 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
ProblemsProblems
Lack of framework for initial tool development
Integration is difficult – most tools are implemented from scratch
Customization is nearly impossible
PossiblePossible solutionsolution
Abstraction of basic concepts of concern oriented modeling
Reusable components for tool developers
Layered architecture
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
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
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
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
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
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
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:
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
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
UsingUsing CMECME –– VisualizerVisualizer The Visualiser tool provides many functions
and shows an overview of where search results occur in source files
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
Using CME – adding a Using CME – adding a feature (cont.)feature (cont.) Sample code from original package:
UsingUsing CMECME –– addingadding aa featurefeature (cont.)(cont.) Feature code written in a
separate package:
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
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
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
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
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
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
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
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
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
EnginesEngines –– existingexisting itemsitems
Java binary manipulator Java source manipulator XMI file manipulator XML Serializer Multiple engine attachment
interface
ConclusionConclusion
Pros Non intrusive Can be used with existing artifacts Extensible by tool developers Open source
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