Model Driven Engineering Stuart Kent University of Kent Royal Society Industry Fellow with IBM
Model Terminology encompasses more than program code design, analysis, specification, business models Driven models are first class, not just MS-office-ware model simulation and analysis tools code generation, code/model coordination Engineering models and process are intertwined Stuart Kent, May 2002 2
Conclusion: MDE needs MD 2 E instances filmstrips traces specifications PSMs programs PIMs UML models language definitions language 4 defining languages Change all the time hardly ever MD 2 E = Model Driven MDE Automation is required to deal with change effectively MD 2 E means deriving tools from language definitions Added bonus L4defL is itself a language (bootstrap) MOF is a good place to start Stuart Kent, May 2002 3
Background MDA AOSD MDE vs MDA vs AOSD Tools for MDE MD 2 E metamodeling metatooling UML 2 Ongoing & Future Work Outline Stuart Kent, May 2002 4
OMG s new vision Background: MDA MDA trademark owned by OMG www.omg.org/mda Catch phrases PIM platform independent model PSM platform specific model The MDA [] allows the same model specifying system functionality to be realized on multiple platforms [] and allows different applications to be integrated by explicitly relating their models, enabling integration and interoperability and supporting system evolution as platform technologies come and go. OMG doc. on MDA, ormsc/2001-07-01 Stuart Kent, May 2002 5
Background: AOSD Aspect-Oriented Software Development www.aosd.net Programming influence, but now moving into design Aspect-oriented programming Subject-oriented programming Catch phrases Separation and composition of concerns Cross-cutting Aspect weaving Stuart Kent, May 2002 6
Background MDA AOSD MDE vs MDA vs AOSD Tools for MDE MD 2 E metamodeling metatooling UML 2 Ongoing & Future Work Outline Stuart Kent, May 2002 7
Multi-dimensional modeling Abstract (PIM) Stakeholder Lifecycle (versions) Concrete (PSM) Subject Aspect MDA focuses on PIM / PSM dimension AOSD focuses on subject / aspect dimensions Stuart Kent, May 2002 8
MDE combines process with artefacts MDA/AOSD focus on artefacts MDE combines process with artefacts Processes can not be defined without knowing artefacts to be delivered / maintained Processes come in many shapes and sizes So different constellations of models are required for different projects Processes evolve Stuart Kent, May 2002 9
So language definitions change too instances filmstrips traces specifications PSMs programs PIMs UML models language definitions language 4 defining languages all the time Change hardly ever Automation is required to deal with change effectively Language definitions are also subject to frequent change Organisation/project-specific processes o New constellations of languages Domain specific languages New technologies and platforms Stuart Kent, May 2002 10
Background MDA AOSD MDE vs MDA vs AOSD Tools for MDE MD 2 E metamodeling metatooling UML 2 Ongoing & Future Work Outline Stuart Kent, May 2002 11
MDE needs sophisticated tools instances filmstrips traces specifications PSMs programs PIMs UML models language definitions language 4 defining languages all the time Change hardly ever Automation is required to deal with change effectively Stuart Kent, May 2002 12
x:l2sd, M:L2as y:l1sd, N:L1as (M,x) (N,M) (y,x) (N,y) (N,y) (N,M) (y,x) (M,x) Note 2-way. Diagram exemplifies PSM2PIM (1-*). This is only an illustration it needn t be that way. So asas and sdsd are closely related. Can make the picture more complicated with concrete syntax (UI?) to abstract syntax mappings. Reference Model for Tools L1as L1as L1as L2as L2as specs L2as L2sd L2as Stuart Kent, May 2002 L2sd 13 N specs M L1as L1sd x examples y examples L1sd L1sd L1sd L2sd L2sd
Tools: Model Synchronisation UML EAI UML BP L1as specs L1as L1sd examples L1sd (partial) code gen change propagation L1as L1as L2as L2as L1sd L1sd L2sd L2sd MQ UML EAI J2EE L2as RDB L2as L2sd Stuart Kent, May 2002 14 specs examples L2sd
Tools: Model Exploration & Validation UML X (counter) example satisfaction (counter) example gen. e.g. execution (partial) spec. gen. validation Snapshots Filmstrips Rich Pictures L1as specs L1as L1sd examples L1sd Stuart Kent, May 2002 L1as L1as L1sd L1sd 15
Dashboard (make use of AS to CS mappings) as specs L1as L1sd examples L1sd Snapshots Filmstrips Rich Pictures display as as EL L as as L1sd L1sd L2sd L2sd abstract as specs examples L2sd Traces of executing system L2as Stuart Kent, May 2002 L2sd 16 monitor
Combo 1: BP Improvement Dashboard + Model exp/val + Model Sync UML BP (counter) example satisfaction (counter) example gen. e.g. execution (partial) spec. gen. validation Snapshots Filmstrips Rich Pictures manipulate display L1as specs L1as L1sd examples L1sd change propagation L1as L1as L2as L2as L1sd L1sd L2sd L2sd abstract UML EAI L2as specs L2as L2sd examples Traces of executing system Stuart Kent, May 2002 17 L2sd monitor
Combo 2: Model-Driven Testing Dashboard + Model exp/val + Model Sync Test case gen. (example gen.) validation manipulate UML SPEC check results (example sat.) Snapshots Filmstrips Rich Pictures display Test script gen. L1as L1as L1as L2as L2as specs L1as L1sd examples Test data & script generation L1sd L1sd L1sd L2sd L2sd abstract J2EE L2as specs L2as L2sd examples Traces from test execution Stuart Kent, May 2002 18 L2sd monitor
Background MDA AOSD MDE vs MDA vs AOSD Tools for MDE MD 2 E metamodeling metatooling UML 2 Ongoing & Future Work Outline Stuart Kent, May 2002 19
Challenge: How to build the tools? instances filmstrips traces specifications PSMs programs PIMs UML models language definitions language 4 defining languages all the time Change hardly ever Automation is required to deal with change effectively Language definitions are also subject to frequent change Organisation/project-specific processes o New constellations of languages Domain specific languages New technologies and platforms Stuart Kent, May 2002 20
Solution: Apply MDE to itself Reflection UML MOF as specs UML MOF as UML MOF as UML MOF sd examples UML MOF sd UML X y or mn tool generation UMLL1as MOF as X Eclipse L2as Public domain tooling framework from IBM www.eclipse.org Eclipse Stuart Kent, May 2002 21 tools repository instances
Meta-Modelling Object modelling of language and process definitions OMG standards Meta Object Facility (MOF) Software Process Engineering Metamodel (SPEM) For example Stuart Kent, May 2002 22
otherend 1 Association End name : String upper : Int lower : Int * Example: Abstract Syntax sourceof * targetof source 1 allparent associationend * Class 2 owner parent * 1 Association name : String Package name : String * owner name : String class 1 1 target owner 1 * allnested * association owner package * 0..1 Plus well-formedness rules, e.g. //Names of classes in a package are unique context Package inv: class.name->asset()->asbag() = class.name Stuart Kent, May 2002 23
Example: Semantics Domain otherend 1 Link End label : String * sourceof targetof linkend source 1 Object id : String class : String target * 2 owner 1 1 * object snapshot * owner Link 1 label : String Snapshot id : String package : String * 1 link 0..1 owner owner Stuart Kent, May 2002 24
Example: Concrete Syntax content Box 0..1 0..1 container hastab : Bool label : String Diagram * box 0..1 box 1 owner owner 1 * line Line label : String 1 lineend owner 2 lineend LineEnd arrowhead : String hasarrow : Bool label : String * Stuart Kent, May 2002 25
Example: AS 2 SD mapping AS Semantics SD Package name : String Class name : String Association name : String Package Rel Snapshot scope elements relation elements Class Rel Object Class Object relation Package Snapshot scope scope Association Rel Link Association Link scope relation elements Object id : String class : String Snapshot id : String package : String Link label : String Association End name : String upper : Int lower : Int AssociationEnd Rel LinkEnd elements relation AssociationEnd LinkEnd Link End label : String Stuart Kent, May 2002 26
Example: CS 2 AS mapping CS CSAS AS Box hastab : Bool label : String Line Box Rel Package scope elements elements relation Box Rel Class Box Class relation scope Box Package scope Line Rel Association Line Association scope relation elements Package name : String Class name : String Association name : String LineEnd arrowhead : String hasarrow : Bool label : String LineEnd Rel AssociationEnd elements relation LineEnd AssociationEnd Association End name : String upper : Int lower : Int Stuart Kent, May 2002 27
Current status of MOF tooling Repository management Meta-Tooling XMI for interchange (MOF in XML syntax) Examples o NetBeans MDR mdr.netbeans.org o dmof from www.dstc.edu.au o JMI (open source ref. implementation soon to be released by Adaptive) Eclipse Java framework for constructing inter-operating software development tools Developed by IBM, now in public domain at www.eclipse.org Work in progress OCL checking o tools beginning to appear Monitoring/executing mappings o on critical path Stuart Kent, May 2002 28
Bootstrap MOF UML MOF as 1 UML MOF as Eclipse 2 Tool to generate (v1) model repository model translator Eclipse M N UML X y 3 Z 2 Tool to generate (v2) model repository model translator 3 3 Repositories Generation tools Visual editors Coordination tools Stuart Kent, May 2002 29
Background MDA AOSD MDE vs MDA vs AOSD Tools for MDE MD 2 E metamodeling metatooling UML 2 Ongoing & Future Work Outline Stuart Kent, May 2002 30
Aside: UML 2? UML currently undergoing revision 4 RFP s infrastructure, superstructure, OCL, diagram interchange Submissions include U2P (www.u2p.org) o infra/super o Telelogic, Rational, IBM, Unisys, HP, 2U (www.2uworks.org) o infra/super o Project Technology (Mellor), Adaptive, Kinetium (D Souza), Siemens, puml (Clark - Kings, Evans - York, Kent - Kent), 1 OCL submission (www.klasse.nl/ocl) o Supported by both U2P and 2U submitters & supporters Stuart Kent, May 2002 31
UML 2 submissions U2P UML 1.5 Bigger, fatter, just as precise o lots of new superstructure o metamodel of AS, English for the rest o wff rules in OCL as an afterthought 2U UML as a family of languages to support MDA / MDE o defined using package templates Integrated core (infrastructure) o metamodel definition of AS and semantics o concrete syntax if time o driven by definition of wff rules Superstructure (not so much so far) being layered on integrated core Stuart Kent, May 2002 32
MOF and UML UML (and its profiles) is a good test for MOF MOF is a member of the UML family This is an OMG requirement for MOF version 2 Get MOF right and we can evolve UML to what it should be MOF is being revised to MOF 2 concurrently with UML 2 initial submissions, main one includes Rational, IBM and most of 2U team UML is a still a powerful brand Stuart Kent, May 2002 33
Background MDA AOSD MDE vs MDA vs AOSD Tools for MDE MD 2 E metamodeling metatooling UML 2 Ongoing & Future Work Outline Stuart Kent, May 2002 34
Ongoing & Future work Infrastructure Define mappings in the metamodel o Need a language for this, or, at least, templates that capture mapping patterns ; constraints are important o (Manually) construct a tool that generates coordination tools and translators from these mappings Use mapping technology to (re)define o Meta-language (include concrete syntax diagrams, XML) o Tool generators Bootstrap meta-tools from the new definition Don t forget process (longer term) Content Model driven business integration Language family for component/port/connector paradigm o Integration with other paradigms o Informed by theory Families of constraint languages, in particular mixed diagrammatic/textual languages Stuart Kent, May 2002 35
Conclusion: MDE needs MD 2 E instances filmstrips traces specifications PSMs programs PIMs UML models language definitions language 4 defining languages Change all the time hardly ever MD 2 E = Model Driven MDE Automation is required to deal with change effectively MD 2 E means deriving tools from language definitions Added bonus L4defL is itself a language (bootstrap) MOF is a good place to start Stuart Kent, May 2002 36