840 likes | 1.04k Views
Ingénierie des modèles : des principes aux outils Jean Bézivin & Marcos Didonet del Fabro [Jean.Bezivin|Marcos.Didonet]{noSpamAt}univ-nantes.fr ATLAS Group (INRIA & LINA), University of Nantes, France http://www.sciences.univ-nantes.fr/lina/atl/. Schedule. Model Driven Engineering:
E N D
Ingénierie des modèles :des principes aux outils Jean Bézivin & Marcos Didonet del Fabro[Jean.Bezivin|Marcos.Didonet]{noSpamAt}univ-nantes.fr ATLAS Group (INRIA & LINA),University of Nantes, France http://www.sciences.univ-nantes.fr/lina/atl/
Schedule • Model Driven Engineering: • Scope & Applicability • Principles • Deployment (AMMA) • An example of MDE tool • The ATLAS Model Weaver
The playground sNets, 1990 UML, 1995 Tools Principles MOF, 2000 Standards today, AMMA tomorrow Teaching
Model-Driven Engineering (MDE) MDA™ Model-Driven Architecture (OMG) MIC Model Integrated Computing Other Standards Software Factories (MS) Eclipse EMF GMF GME Microsoft Visual Studio Team system DSL Tools Other Tools Principles, standards and tools Principles Standards Tools
IBM on MDA : Three complementary ideas • Direct representation • Automation • Standards Direct representation => multiple languages Danger of fragmentation Need coordination How to coordinate? Short answer: metametamodel But what is a metametamodel?
Agenda Scope & Applicability
Introduction • The industrial evolution (OMG MDA™, IBM EMF, Microsoft Software Factories) and the MDE trend • The need for sound principles (models as first class entities) • Technology spaces or why MDE is not sufficient
Steve 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 @: http://blogs.msdn.com/stevecook
The MOF(Meta Object Facility) M3 meta-meta model The UML and a collection of metamodels M2 metamodel Some UML and other models. M1 model Various usages of these models M0 "the real world" OMG Proposal
MDA 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
M The 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
Two 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
Microsoft 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 Microsoft’s platforms (Visual studio) … Modeling is the future … Bill Gates
MDE@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).
Creating the Petri net DSL (Hillairet-Piers project) • Petri metamodel
Creating the Petri net DSL (Hillairet-Piers project) • On lance un nouveau projet DSL. • On choisit le template Blank Language pour commencer notre métamodèle. • On nomme notre projet ReseaudePetri.
Creating the Petri net DSL (Hillairet-Piers project) • Une fois le métamodèle totalement défini, on effectue les opération suivantes • Generate all code : génère le code C# qui va être utilisé par l’éditeur de modèle, il est généré à partir des fichiers .dmd et .dd. • Build solution : compilation du code généré. • Start : lancement de l’éditeur de modèles.
Prolog Description logic Java Ontologies Corba C++ RDBMS Corba etc. OOBMS Linux Grammarware Semantic WEB Graph Theory WWW The 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
Abstract Syntax Systems Compared Technology #1 (formal grammars attribute grammars, etc.) Technology #2 (MOF + OCL) Technology #3 (XML Meta-Language) Technology #4 (Ontology engineering) M3 EBNF MOF M2 Pascal Language Grammar etc. 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
Syntax XML Meta-Model MDA Ontology engineering DBMS Program Grammar Data Schema Model Document Schema Ontology Top Level O. A technical space is organized around a set of concepts Spaces may be connected via bridges Spaces are often similarly organized
Program Grammar Drawing Stencil Model Document Schema Content FORM But also: UML MM ~ Visio Stencil Syntax XML Meta-Model MDA InfoPath Visio
Models 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 defining a representation scheme and basic type system. • Distinguish between intra-space and inter-space operations
Technical 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
Agenda Applicability
Some examples of transformations • Classical • UML2Java • UML2RDBMS • But also tool to tool (more important) • UML Activity Diagrams to MS Project
The KM3 metamodel* *The KM3 metamodel used in this presentation has been simplified. However, it still contains enough concepts to be usable.
KM3 definition of the KM3 metamodel NOT XMI 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 oppositeOf owner; } -- continued on next slide
UMLDI2SVG Semantic Preserving Transformation?
Tool X Tool Y AMMA ATP AMW AM3 ATL Tool Interoperability • Tool interoperability • Build a metamodel of each tool • Write a transformation • Two kinds of Metamodels • Data stream oriented • Event oriented
Agenda Principles
What about the stability of MDA? • Missing foundations may cause big problems ahead
The MDA metamuddle • A very rapidly growing industrial application field since november 2000, • … but … • We badly need a unifying theory of models
Language engineering Credits and MDA compliance MDE Ontology engineering
The "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.
the UML MetaModel The MOF M3 meta-meta model 1 Class * Attribute The UML metamodel M2 metamodel Some UML Models a UML Model M1 Client model Name : String Various usages of these models M0 "the real world" The "conformance" relation meta c2 the MOF M3 source Class Association destination meta meta meta meta c2 M2 meta meta c2 M1
Research agenda: Everything is a model • What is a model? • A model is a representation of a system • A model is written in the language of its unique metamodel • A metamodel is written in the language of its unique metametamodel • The unique MMM of the MDA is the MOF • MS/DSLTools has an implicit MMM • A model is a constrained directed labeled graph • A model may have a visual representation • Where do models come from? • What are the various kinds of models?
MMb MMa MMt Mb Ma Mt Transformation Engine Uniform access to models and metamodels
Summary • The definition of a model is TSpace-dependent • Generally a model is a graph • Which kind of graph is defined by the metametamodel (M3) of the technical space. • For MOF-models it is non oriented graphs with labeled end of edges • For ECORE-models it is slightly different • For Microsoft-DSL-models it is completely different • It is thus possible to cope with different M3 • Then it will be important to distinguish between M2 level transformations and M3 level transformations
Agenda Deployment