Combining the Power of Meta-Programming and Meta-Modeling within the OMG MDA Framework. Jean Bézivin & Nicolas Ploquin Université de Nantes - CRGNA Faculté des Sciences et Techniques 2, rue de la Houssinière BP 92208 44322 Nantes cedex 3, France [email protected]2 nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
31
Embed
Combining the Power of Meta-Programming and Meta-Modeling ... · Meta-Programming and Meta-Modeling within the OMG MDA Framework. ... C# & DotNet ? 2nd Workshop on UML ... PIMs ,
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Combining the Power ofMeta-Programming and Meta-Modeling
within the OMG MDA Framework.
Jean Bézivin & Nicolas PloquinUniversité de Nantes - CRGNAFaculté des Sciences et Techniques2, rue de la Houssinière BP 9220844322 Nantes cedex 3, [email protected]
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Outline
zWhy the MDA?üRapid paradigm shift from objects to models
zBasic concepts of the MDAüRevisiting the 4-layer architecture
zTooling the MDAüA tour of models and tools
zModel extractionüStatic MXüJIT/MP
zConclusion
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Why the MDA?
zObjects failed to bring conceptual simplicityzPlatform migration is too frequent and too
costlyzNew models are emergingzModels for humans and models for computerszThe unique (object) model is replaced by the
multiple modelzConsequence : The middle-war is over
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
The middleware war is over
COM+DCOM
CORBAIIOP
MicrosoftC# & DotNet
XMLSOAP
Sun's JavaEJB
HTTPHTML
z There is no clear winner nor loser
z The next battlefield will be model transformation
z The OMG's Model Driven Architecture (MDA) initiative is aimed at using modelling and meta-modelling to drive the design and implementation of distributed systems. + the Next Wonderful
Middleware Platform (~2005)
Sun's reaction toC# & DotNet ?
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
New models are emerging
zFrom object to components …z… and then to:üRules,üWorkflow,üServices,ü…
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Consequence: having to deal simultaneouslywith several models of different semantics
UMLmodel
Javamodel
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
From human-readable to computer-understandable (XMI)
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Basic concepts of the MDA
zRevisiting the 4-layer organization
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Abstract Syntax Systems Compared
MOF
The UMLmeta-Model
A SpecificUML Model
A Specificphenomenon
corresponding toa UML Model
EBNF
Pascal LanguageGrammar
A specificPascal Program
A specificexecution
of a Pascal program
A XMLdocument
A XML DTDOr Schema
A XMLdocument
A XML DTDor Schema
Technology #2(MOF + OCL)
Technology #3(XML Meta-Language)
M3
M2
M1
KIFTheories
Upper LevelOntologies
Technology #4(Ontology engineering)
[XMI=MOF+XML+OCL]Model serialisation
Technology #1(formal grammars
attribute grammars,etc.)
+DescriptionLogics
+ConceptualGraphs+etc.
+Xpath, XSLT+RDF, OIL, DAML+etc.
:from contemplativeto productive.
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Technologies evaluation grid
Abstractsyntax
systemsMeta-models XML Ontologies
modularitytransformation
renderingexecutabilityverificationnavigation
etc.
Data bases
Differenttechnological families
Differentproblems
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Systems and models
A model M is a simplified representation of theworld, as a matter of fact of only a part Sof the world called thesystem.
MM
SS
isRepresentedByM0(the world)
M1(the modeling space)
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Limited Substituability Principle
z The purpose of a model is always to be able to answer some questions in place of the system, exactly in the same way the system itself would have answered similar questions.
Model
ask()
System
ask()
represents
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
The global MDA model space
z The development software cycle is populated with modelsü Models are of unequal importanceü The model space is structuredü Models are linked in a complex organization networkü The content of each model is defined (constrained) by a corresponding
meta-model (ontology)ü The model space is constantly broadening starting from the essential
models (Domain, Service, Resource)z Many different kinds of models
ü Business models and computer modelsü Models of product & models of processesü Object, component, rule, workflow, service models among othersü Legacy (Cobol, RDB) and NT (Web, SOAP, etc) modelsü PSMs , PIMs , PDMs, ü etc.
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Various kinds of modelsz Products and processesz Legacy and componentsz Static and dynamicz etc.
Model
ask()
System
ask()
represents
Dynamic System
StaticSystem DynamicModel
StaticModel
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
What is a Meta-Model?
ModelSystem
Meta-Modelterminologyassertions
represents
S
M*
M
The correspondence between a model and a systemis defined by a meta-model.
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
The 3+1 Layers
the MOFMMM
the UMLMM
a UMLmodel m
a particularuse of m
the UPMMM (SPEM)
the CWMMM
another UMLmodel m’
anotheruse of m
Level M3
Level M2
Level M1
Level M0 (This is nota modeling layer,it is the real world.)
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Local and global definitions
Nodemeta
Link
instanceOf
meta
meta
StkInstance
meta
StkClass
meta
aCat Cat
meta meta
instanceOfM1
M2
M3
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
MetaClass : Person class Class : PersoninstanceOf instanceOf Instance : Mary
representedBy
Mary,the real Stk object
in a given computer, at a given addredd,unique in time and space.
M1
M0
M2
M3
NODE : MetaClass
NODE : NODE
NODE : Class NODE : Instance
META META META
META META META
META
MOF
Smalltalk
Meta-m
odelSmalltalk
model
Real world
Global organization
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
JIT/MP : a new concept
z Just In Time Model Productionz An execution of a program dynamically produces an (XMI) model
of its current situationü on demand,ü Periodically,ü on given events (internal or externals), …
z The produced model corresponds to an (XMI) MM that has been directly read by the program
z Produced models may be concurrently used and combinedz The nature of the produced models may change in time (MM-
driven)
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Combining the power of meta-modeling and meta-programming
a C# programexecution
a C#meta-model
a C#model
read XMI
write XMI
[This may be the basic strategyfor modern software maintenance]
sem
Introspection at workThis isa dynamic
model.
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Challenge
zHow to associate instructions to different elements of the meta-model that will specify how the model may be extractedzHint : these instructions are C# code
that uses the introspection API of C#zThis allows defining complex heuristics
(e.g. finding patterns, etc.)
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise
Interesting question
a C# sourceprogram
a modelMM-driven modelextraction
a C# programexecution
a modelJIT modelproduction
?
2nd Workshop on UML for Enterprise Applications: Model Driven Solutions for the Enterprise