Advanced Software Engineering course - Guest Lecture
Weaving Models
This presentation has been developed in the context of the Advanced Software Engineering course at the DISIM Department of the University of L’Aquila (Italy).
http://www.di.univaq.it/malavolta
Unleash Your Potential - Namagunga Girls Coding Club
Megamodeling
1. Università degli Studi dell’Aquila
Megamodeling
Ivano Malavolta
DISIM Department, University of L’Aquila
ivano.malavolta@univaq.it
2. The material in these slides may be freely reproduced
and distributed, partially or totally, as far as an explicit
reference or acknowledge to the material author is
preserved.
Ivano Malavolta
4. According to MDE, software development and maintenance are
based on chains of model transformations
• Model-to-Model
• Model-to-Text
Examples of those
• Text-to-Model
transformations?
If we have a single transformation everything goes well
However...
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
5. In real life A LOT of models and transformations are involved
7. Involved models can be of very various natures:
• UML models,
• XML documents,
• models conforming to different metamodels
• ...
Moreover, these models are often linked to each other and are
also involved in complex chains of operations which
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
8. Managing global resources in the field of Model-Driven
Engineering (MDE)
These resources should be accessed and used without
increasing the accidental complexity of MDE
These resources are:
1. numerous 3. interrelated
2. distributed 4. heterogeneous
5. complex
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
9. How can we abstract from all that complexity?
The simplest way is to apply general MDE principles to the
handling of models
This is the main idea of MEGAMODELING
models which elements represent model themselves
GMM offers a generic way to create, store and modify the
metadata on all the global resources (e.g. models) that may be
involved in developing a complete solution
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
10. The activitiy of representing references to models and
relationships between them as a model called MEGAMODEL
Introduced in 2004
A megamodel is a model of which at least some elements
represent and/or refer to models or metamodels
Use a megamodel as a metadata repository on all these artifacts
11. Intuitively, a megamodel can be seen as a MAP to find and link
together all the involved models
Megamodel
VS
Metamodel??
Do you
remember
weaving models?
http://wiki.eclipse.org/AM3/Use_Cases/PetStore_Navigability
12. The goal of AM3 (AtlanMod MegaModel Management) is to
provide a practical support for modeling in the large
it is a concrete implementation of megamodeling
Provides facilities to create, handle, manage and use
megamodels
It is designed to be metamodel-agnostic in order to handle
different kinds of artifacts and relationships
13. Technically, it is a…
METAMEGAMODEL!
The basis of AM3
It allows to specify (typed) relationships between the modeling
artifacts contained into a megamodel
It represents any possible
concept that may exist within
a megamodel
represents the various
models within the
megamodel can link any entity it distinguishes
within the megamodel between the
elements it links
14. This part nicely represents the relationship between the
artifacts involved in MDE
represents the real system
and conforms to some
defines the
metamodels
“rules” to
construct
models
special kinds of terminal
provides generic defines domain- model, each of them
concepts for specific concepts conform to a given MM
metamodels and and conform to
conforms to itself metametamodels
15. The AM3 user interface is generic since it does not depend
either on the models, metamodels or other artifacts within the
megamodel
Generic Editor Page
Megamodel
Navigator
http://docatlanmod.emn.fr/AM3/Documentation/D2-11-
b_Global_Model_Management_Supporting_Tool_v3-0.pdf
16. The main part of the IDE
It is an Eclipse View
LEFT. Navigation across the
different elements of the
metamegamodel, considering
all the dynamically loaded
metamodel extensions
RIGHT. Browse the currently
loaded megamodel
http://docatlanmod.emn.fr/AM3/Documentation/D2-11-
b_Global_Model_Management_Supporting_Tool_v3-0.pdf
17. Specific editor for each element of the megamodel
Displays the fields defined in the (extended) metamegamodel
With a given
extension point, AM3
allows developers to
create their own
editor pages
http://docatlanmod.emn.fr/AM3/Documentation/D2-11-
b_Global_Model_Management_Supporting_Tool_v3-0.pdf
18. The AM3 platform is based on Eclipse and provides a set of
layers to manage megamodels and models
This is
where the
AM3 Core
Metamodel
resides
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
19. How to identify
Language for querying Locates models (file
The GUI models within
Display megamodel (OCL) system, other repos,…)
the megamodel
facilities and
some editing
functions Unifies how
the services
have to
communicat
e with
The Core AM3 model
Meta- handlers
megamodel and
repositories
Defines how to add,
Dirty work on how models retrieve,
can be manipulated in the Existing Eclipse plugins delete and browse entities
megamodel on repositories
20. The AM3 platform can be extended for managing your own
entities for your specific needs
Main extension points:
Metamodel
Allows extensions of the metamodel of megamodel to be specified by providing
the new concepts and linking them to a previously defined metamegamodel
UI Page
Allows specific editor pages for the concepts added in the extension to be
defined by explicitly identifying the concept it has to be associated with for each
page. In this way, the new pages are automatically made available when
editing megamodel elements conforming to these concepts
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
21. Other extension points:
Locator
Allows extensions to provide new locators for indicating the physical
location of entities within the megamodel
Model Handler
Allows extensions to provide new functionalities on how to access & modify
specific kinds of models
http://docatlanmod.emn.fr/AM3/Documentation/D2-1-
a_Global_Model_Management_Principles_v1-1.pdf
22. AM3 has been used for:
• Management of model transformations (single and composite)
• Management of Domain-Specific Languages (DSLs) and related
artifacts
• Inter-model navigability/traceability see next slides
• Cartography of complex systems
• Management of software developments
• Representing Architecture Descriptions see next slides
http://docatlanmod.emn.fr/AM3/Documentation/AM3_Flyer-Poster_v1-0.pdf
23. It shows how megamodeling can be used to manage and
navigate the different development artifacts
http://wiki.eclipse.org/AM3/Use_Cases/PetStore_Navigability
24. Two kinds of links:
1. model-level links are stored within the megamodel and are
directly navigable
2. model element-level links are considered as a refinement of the
model-level links and are stored in separate weaving models
http://wiki.eclipse.org/AM3/Use_Cases/PetStore_Navigability
25. The extended AM3 Core metamodel
Model-level
links
Model element
level links
http://dl.acm.org/citation.cfm?doid=1774088.1774511
26. The screenshots show how the different links are managed by the
AM3 megamodel editor
Model-level Model element level
links links
http://wiki.eclipse.org/AM3/Use_Cases/PetStore_Navigability
28. Picture from International Standard for Systems and
Software Engineering – Architectural Description
(ISO/IEC /IEEE42010)
Stakeholders
Developer
Architect
End-user
Tester
Project manager
Concerns
functionality, feasibility, usage,
structure, behavior, performance,
resource utilization, security, cost,
data accessibility, privacy,
compliance to regulation, business
goals and strategies
29. Architecture Frameworks
4+1 views
MODAF
Picture from International Standard for Systems and
TOGAF Software Engineering – Architectural Description
… (ISO/IEC/IEEE 42010)
30. Stakeholder concerns can vary tremendously
nature of the system
project-specific constraints
organizational constraints
domain of the system
…
http://goo.gl/I4FCr
31. We require a way to It is common practice
capture stakeholder’s to use multiple views
specific architectural and viewpoints to
concerns deal with different
concerns
however...
Current frameworks and ADLs are for the most part closed
http://goo.gl/I4FCr
32. Hilliard, R. Malavolta, I. Muccini, H. Pelliccione, P., On the
Composition and Reuse of Viewpoints across Architecture
Frameworks, Software Architecture (WICSA) and European
Conference on Software Architecture (ECSA), 2012 Joint
Working IEEE/IFIP Conference on, 131-140, 2012, IEEE
An MDE approach to create new architecture frameworks by
means of mechanisms:
1. to store, retrieve, and combine existing viewpoints, by
properly selecting and reusing models previously defined
and resident in MEGAF;
2. to define correspondences among views, viewpoints,
stakeholders, system concerns and their elements;
3. to enforce consistency and completeness checks based on
defined architectural relationships and rules among
elements.
http://goo.gl/I4FCr
33. Model Kinds Architectural Languages
System Concerns
Stakeholders
Correspondences
Viewpoints
Architectural Assets
Repository
Architecture
Framework
Architecture Architecture Architecture
Description Description Description
A B C
34. Model Kinds
System Concerns Architectural Languages
Stakeholders sc mk
al
stk Architecture Correspondences
af
Framework
Viewpoints c1
vp Architecture
Description
Architecture
ad
Description
Architecture
Description
A B C
How to manage models that contains classes
http://goo.gl/I4FCr
and other models?
35. In MEGAF, a
megamodel stores
all the AD elements
Megamodels in combination with weaving models for
coordinating sets of architectural models and viewpoints
Builds on the navigability and traceability extension