Title: From Principles to Implementation:
1 From Principles to Implementation Some Lessons
Learned in the Building of the AMMA Model
Engineering Platform Jean Bézivin
Jean.BezivinnoSpamAtuniv-nantes.fr ATLAS
Group (INRIA LINA),University of Nantes,
France http//www.sciences.univ-nantes.fr/lina/atl
/
2Model Driven Engineering
- Schedule
- Scope Applicability
- Principles
- Deployment (AMMA)
- Credits
- Modelware
- Microsoft
- IBM
- TNI
- Sodifrance
3Basic entities
Technical Space a representation system for
models and a set of technical solutions to handle
them.
System a group of interacting, interrelated, or
interdependent elements forming a complex whole.
repOf
System
Model
Model an abstract representation of a system
created for a specific purpose.
4The playground
sNets, 1990
UML, 1995
Principles
Tools
MOF, 2000
Standards
today, AMMA
tomorrow
Teaching
5Principles, standards and tools
Principles
Standards
Tools
6IBM on MDA Three complementary ideas
- Direct representation
- Automation
- Standards
Direct representation gt multiple
languages Danger of fragmentation Need
coordination How to coordinate? Short answer
metametamodel But what is a metametamodel?
7Agenda
8Introduction
- The industrial evolution (OMG MDA, IBM EMF,
Microsoft Software Factories) and the MDE trend - The need for sound principles (models as first
class entities) - Technical spaces or why MDE is not sufficient.
Multiple Technical Spaces inside MDE
EMF?
9The initial move from Middleware to Modelware
10Latest tentative to define MDA
11Steve Cook (OOPSLA 2004 panel)
- Suggests that MDA proponents fall into the
following three camps - The UML PIM camp MDA involves the use of UML to
build Platform Independent Models (PIMs) which
are transformed into Platform Specific Models
(PSMs) from which code is generated. - The MOF camp MDA does not involve the use of
UML, but instead the crucial technology is MOF,
and the definition of modelling languages and
language transformations using MOF. - The Executable UML camp MDA involves building a
UML compiler, making it a first class programming
language.
Ref Steve Cook Blog _at_ http//blogs.msdn.com/ste
vecook
12MDA in a nutshell PSM f(PIM)
M3
M2
- One unique Metametamodel (the MOF) - An
important library of compatible Metamodels, each
defining a DSL - Each of the models is defined
in the language of its unique metamodel
M1
13The initial MDA conjecture PSM f(PIM)
PDM branch
PIM branch
weaving
PIMs (Platform Independent Models)
?
Merging phase
PSMs (Platform Specific Models)
PDMs (Platform Description Models)
PSM branch
14Two missing links in the OMG architecture
PIM
PDM
PSM f(PIM, PDM) or after currying PSM
fPDM(PIM)
numeric values PDM DotNet PDM EJB
PSM
15Microsoft Software Factories
- SDK (Team System) released in late 2004
- First presentation at OOPSLA, Vancouver, Oct.
2004 - See S. Cook, S. Kent, J. Greenfield and K. Short
Blogs - Aims to be closer to a metaCASE tool than Eclipse
- (however follow GMF Borland)
- Not UML-based (nor MOF, nor XMI)
- Models strongly tied to code
- Reverse engineering/synchronization
- Reliance on Microsofts platforms (Visual studio)
- Modeling is the future
- Bill Gates
16MDE_at_Microsoft
- Microsoft is releasing a suite of tools to make
it easy to construct graphical designers hosted
in Visual Studio for editing domain specific
languages (DSL).
17Creating a Petri net DSL
Metamodel a couple of logical and visual
definitions
18Creating a Petri net DSL
- Mapping on DotNet standard tools (C, CLS, CLR,
etc.) - We are far from the initial OMG PIM/PSM naive
separation - However this is really MDE in 2005
19A first attempt to reverse engineer the DSL
Metametamodel
20Microsoft DSI (Dynamic System Initiative) March
2005
System Definition Model is a language, or a
meta-model, that is used to create models of
distributed systems. A distributed system is a
set of related software or software and hardware
resources running on one or more computers that
are working together to accomplish a common
function
- A system model captures an entire system's
composition in terms of all interrelated software
and hardware components. - A system model captures knowledge as prescriptive
configurations and best practices, allowing the
effects of changes to the system to be tested
before the changes are implemented. - Administrators do not need to operate directly on
real-world systems but rather can model changes
before committing to them. In this way, what if
scenarios can be tried without impact to a
business. - A system model becomes the point of coordination
and consistency across administrators who have
separate but interdependent responsibilities.
21The notion of TS (Technology Space) as a tool for
collaboration
- A Technology Space corresponds to
- A uniform representation system
- Syntactic trees
- XML trees
- Sowa graphs
- UML graphs
- MOF graphs
- Categories
- Graph Grammars
- A working context
- A set of concepts
- A shared knowledge and know how
- etc.
- It is usually related to a given community with
an established expertise, know-how and research
problems - It has a set of associated tools and practices,
etc. - Protégé, Rational Rose,
XML documentware
MDA Modelware
22Abstract Syntax Systems Compared
Technology 2 (MOF OCL)
Technology 1 (formal grammars attribute
grammars, etc.)
M3
EBNF
MOF
M2
etc.
Pascal Language Grammar
The UML meta-Model
M1
A specific Pascal Program
A Specific UML Model
A specific execution of a Pascal program
A Specific phenomenon corresponding to a UML Model
23- A technical space is organized around a set of
concepts - TSpaces may be connected via bridges
- TSpaces are often similarly organized
But also
24Technical Spaces and Working Contexts
- Technical Spaces
- Examples MDE, MDA, MS/SF, EBNF, XML, DBMS,
ontologies, etc. - Conjecture
- Each TS is represented by a metametamodel
- Each TS is organized in a 3 metalevel
architecture - Working contexts
- Local
- MM specific
- Global
- TS specific, MM independent
- Universal
- Across several TSs (extended MIME notation)
- Mof1.4/UML/mymodel
- MicrosoftDSL/PetriNet/MyNet
- ECORE/PetriNet/MyNet
- EBNF/Pascal/MyProg
- XML/MusicML/MyMusic
- M3/M2/M1
25Models revisited
- Everything is a model
- A ?-model
- ? meaning any specific TSpace
- An XML document is an XML-model
- A Java source program is a Java-model
- An UML model is a MDA-model
- etc.
- Each TSpace is rooted in a metametamodel (M3)
defining a representation scheme and basic type
system. - Distinguish between intra-space and inter-space
operations
26Model transformation across Technical Spaces
A TS
B TS
C TS
D TS
- There is a need for inter-TS model transformation.
27Agenda
28Some examples of transformations
- Classical
- UML2Java
- UML2RDBMS
- But also tool to tool (more important)
- UML Activity Diagrams to MS Project
29The KM3 metamodel (simplified)
30KM3 definition of the KM3 metamodel
NOT XMI (Emfatic-like)
- package KM3
- abstract class ModelElement extends
LocatedElement - attribute name String
- reference "package" Package
oppositeOf contents -
- class Package extends ModelElement
- reference contents ordered
container ModelElement oppositeOf "package" -
- class Classifier extends ModelElement
- class DataType extends Classifier
- class Class extends Classifier
- attribute isAbstract Boolean
- reference supertypes Class
- reference structuralFeatures
ordered container StructuralFeature
31Java to Excel Transformation (call graph)
32Java and Table Metamodels
33UMLDI2SVG
34Tool Interoperability
- Tool interoperability
- Build a metamodel of each tool
- Write a transformation
- Two kinds of Metamodels
- Data stream oriented
- Event oriented
35Agenda
36What about the stability of MDA?
- Missing foundations may cause big problems ahead
37Just an academic issue anyway?
38Enter the "metamuddle"
39Model of a model
40The MDA metamuddle
- A very rapidly growing industrial application
field since november 2000, - but
- We badly need a unifying theory of models
41Credits and MDA compliance
MDE
Ontology engineering
42The "representation" relation
?
repOf
System and System elements
Model and Model elements
Simple set interpretation of the repOf
relation is probably as correct as simple set
interpretation of the instanceOf relation in
object technology.
43The "conformance" relation
meta
c2
the MOF
M3
source
Class
Association
destination
meta
meta
meta
meta
c2
M2
meta
meta
c2
M1
44Summary a Petri Net model
conformsTo
outGo
inCom
outGo
inCom
M3
outGo
inCom
conformsTo
inCom
outGo
System
outGo
M2
inCom
Classical representation
conformsTo
P1
repOf
T1
arcPT
arcTP
P2
M1
45conformsTo
ltxselement nameelement"gt
ltxscomplexTypegt ltxsattribute namename
typexsstring"/gt
lt/xscomplexTypegt lt/xselementgt
M3
conformsTo
ltxselement nameplace"gt ltxscomplexTypegt
ltxsattribute namename
typexsstring"/gt lt/xscomplexTypegt
lt/xselementgt
System
M2
Classical representation
conformsTo
ltpetrinetgt ltplace nameP1/gt ltplace
nameP2/gt lttransition nameT1/gt ltarcPT
sourceP1 targetT1/gt ltarcTP sourceT1
targetP2/gt lt/petrinetgt
P1
repOf
T1
P2
M1
46Agenda
47AMMA A Lightweight Architectural Style for for
Generic Model Management Platforms
- ATLAS Model Management Architecture
- Build around a minimal set of sound principles
- Defines the conventions for the various connected
tools to interoperate - Lightweight Not reinventing CORBA (Model-based
interoperability and not Middelware-based
interoperability) - Four basic blocks
AMMA
ATP
ATL
AMW
AM3
M. Transformation
M. Composition
M. Global Management
Inter TSpaces Bridge
48Atlas Model Management Architecture
- Modeling in the small
- Working at the level of model and metamodel
elements - Modeling in the large
- Working with models and metamodels as global
entities, for what they represent, and their
mutual relations, independently of their content - A megamodel is a model which elements represents
models, metamodels and other global entities (ako
model registry with metadata on models and
metamodels). A megamodel has a metamodel.
49ATL a model transformation language, engine and
IDE
- ATL a MOF/QVT like model transformation language
- For more info see http//www.sciences.univ-nantes
.fr/lina/atl/
50Model Transformation with ATL
conformsTo
conformsTo
conformsTo
conformsTo
conformsTo
51ATL editor (part of ATL Integrated Development
Environment)
52ATL Development Tools source-level debugger
53The standard OMG model transformation language
ATL is a QVT-like language If QVT is the
solution, then what was the problem?
54The Model Weaver principles
Stub MM
extends
Left MM
Weaving MM
Right MM
OperationPort
mapsTo
OperationType
c2
- Fixed mapping metamodels are not sufficient -
We need support for extensible variable metamodels
Weaving model
55Models
- Model
- set of elements and associations
- Associations (intra model relationships)
-
- Model Composition (inter model relationships)
Model
hasA
Semantic defined in the metamodel
inherits
E2
E1
E4
references
E3
Model 1
Model 2
isA
E2
E2
E1
E1
isA
E3
E4
E3
Undefined line semantics
56Metamodel extensions
- Several possible mapping DSLs (Domain Specific
Languages) - Adding extra semantics
- Concatenation, foreign keys, nested, ordered,
equals, containment, - supplier/consumer, etc.
Model 2
Model 1
E2
Equals
E1
E1
E4
E2
Concat
E3
E2
String
57AMW example RDBMS to XML
Semantics
XML schema represented in Ecore
SQL schema represented in Ecore
58Weaving metamodel Visualization (DSL tools and
EMF)
59Weaving metamodel
- Minimal weaving metamodel
- links and correspondences
- extended to be used in different applications
60AM3 ATLAS MegaModel Management Tool
versionOf
- Megamodel a model with elements corresponding to
models, metamodels, services, tools and more
generally to any global resource available in the
scope of an AMMA session. - A registry for model engineering resources as
well as a metadata repository - Megamodel with different metamodels
- Megamodels beyond typing systems
MM
MM
extensionOf
typeOf
M
MM
typeOf
input
Service
Parameter
output
output
implements
T
M
Tool
intput
etc.
61Representing zones with Megamodels
Megamodel Metamodel
c2
c2
Megamodel MgA
Megamodel MgB
repOf
repOf
ZoneB
ZoneA
Fred ATL Nantes
Ivan Mistral Enschede
62Representing zones with Megamodels
Megamodel Metamodel
c2
c2
Megamodel MgB ? MgC
Megamodel MgA
repOf
repOf
ZoneBC
ZoneA
ZoneB
ZoneC
63Initial Metamodel Proposal for AMMA Megamodel
Components
64Megamodel Resource Navigator for model components
65ATP TS and projectors
MS/Office Simulink Matlab etc.
XMI JMI CMI etc.
TSpace 2 EBNF
ATLAS Technical Projectors
p1
TSpace 4 SQL
TSpace 1 MDA
TSpace 3 XML
p2
p3
Java Corba SVG NLP, etc.
66Examples of projections from ME to XML and EBNF
TSs
XML TS
EBNF TS
ME TS
MOF
EBNF
XSD
M3
M2
MMa
KM3.g
MMa.xsd
Ma
MMa.km3
Ma.xmi
M1
KM3
XMI
67Conclusions
- Transformations are models
- Weavings (correspondences) are models
- Megamodels are models
- (meta-)Models everywhere
- A file format
- A tool internal data
- A Visio stencil
- An Infopath Form
- An API
- etc.
- Pragmatics of model transformation are important
- EMF and MS/DSL may be considered as two TSpaces,
based on different M3
68Conclusions AMMA on top of Eclipse and MS/DSL
tools
MTF
ATL
Emfatic
KM3
etc.
etc.
69How adaptable is MDA?
- MDA already evolved a lot in the last five
years. - MDA will have to evolve much more rapidly in the
near future if OMG wants to meet the real needs
of the user community. - Strong competition will be coming from other
technical spaces like XML, Microsoft DSLs, EMF,
etc. - End users are no more accepting huge,
approximatively defined and committee-driven
standards they are asking for an available,
adapted and agile set of small standards similar
to XML. - If MDA does not evolve rapidly, it will become
one small niche in the MDE landscape it will be
quoted as the first historical one many
competing families of model engineering
technologies will emerge and develop. - What is important is assessing the basic
principles of MDE The decisions of OMG, W3C,
OASIS, Microsoft, IBM and others on how to map
these principles on implementation frameworks
(e.g. Java, C, XML, etc.) or on paper
recommendations is only the responsibility of
these organizations the end user will be the
final judge.
70Thanks
http//www.sciences.univ-nantes.fr/lina/atl/