An Overview of ModelDriven Engineering and Architecture Jacques
























- Slides: 24
An Overview of Model-Driven Engineering and Architecture Jacques Robin Ontologies Reasoning Components Agents Simulations
Outline E E E What is MDA? MDA Principles MDA Process and Software Reuse OMG MDA standards Third party providers roles, standards and tools
What is Model-Driven Architecture (MDA)? E An initiative from the Object Management Group (OMG) started in 1997, www. omg. org/mda/ E New paradigm of software development E Goals: E Maxime software reuse across platforms E Solve the second order interoperability problem among different middleware (which goal was to solve the first order interoperability problem among programming languages) ERaise the level of abstraction where most development effort is spent from code to model EProvide standards to automate the entire software development process through a model transformation approach E Reuses and extends previous standards E Unified Modeling Language (UML), by OMG E Meta-Object Facility (MOF), by OMG E e. Xtensible Markup Language (XML), by W 3 C (World-Wide Web Consortium, www. w 3 c. org/xml/)
MDA Principles E The most valuable, durable, reusable assets produced during the development process is not code but models E Far more significant and cost-effective quality gains are achievable by improving design and models than by improving code E Benefits from careful, detailed, explicit modeling is not limited to the application under development but extend to all the processes, artifacts, languages, tools and platforms used for this development
MDA Principles E A high degree of software process automation can be achieved by: E Building a variety of models, each one with a different role in the process, E Making each of these models machine processable by expressing it in a semi-formal notation devoid of natural language E Defining this notation itself as an object-oriented model (called a metamodel) E Storing all models and meta-models with traceability links in a repository accessible to model manipulation software E Abstracting generic transformations between pairs of meta-models that computationally codify the know how for one software process stage E Using model transformation engines to apply these transformations to the source model of a process stage and generate the target model of that stage E Define meta-models for the meta-modeling and model transformation notations
MDA Software Process CIM Meta-model Meta-Model Domain Computation Independent Model Requirement Meta-model PSM Meta-model Application Requirement Model PIM Meta-model Application Platform Independent Model Platform Meta-model Platform Model Testing Meta-model Testing Model Application Platform Specific Model Application Source Code Testing Code Source Code Meta-Model Testing Code Meta-Model Textual Meta-Model
Artifact Reuse with MDA Process Application A Requirement Model Platform P Model Application A Platform P Specific Model Application A Platform Independent Model Domain Computation Independent Model Testing Model AP Application A Platform Q Specific Model Application B Platform Independent Model Application B Requirement Model Platform Q Model Application B Platform P Specific Model Testing Model BP Testing Model AQ Application B Platform Q Specific Model Testing Model BQ
Automated MDA Process: Design Model Transformation Meta-model Design Transformations CIM Meta-model PIM Meta-model Requirement Meta-model Application Requirement Model Domain Computation Independent Model Transformation Engine Application Platform Independent Model
Automated MDA Process: Implementation Model Transformation Meta-model PIM PSM Transformations PSM Meta-model Platform Model Application Platform Independent Model Transformation Engine Application Platform Specific Model
Automated MDA Process: Code Generation Model Transformation Meta-model PSM Meta-model Application Platform Specific Model Code Generation Transformations Model Transformation Engine Source Code Meta-Model Application Source Code
Automated MDA Process: Test Generation Model Transformation Meta-model Test Generation Transformations PSM Meta-model Testing Meta-model Requirement Meta-model Application Requirement Model Application Platform Specific Model Transformation Engine Testing Model
Automated MDA Process: Reverse Engineering Model Transformation Meta-model PIM Meta-model PSM PIM Reverse Engineering Transformations PSM Meta-model Platform Meta-model Application Platform Independent Model Transformation Engine Platform Model Application Platform Specific Model
Automated MDA Process: PIM Refactoring Model Transformation Meta-model PIM Refactoring Transformations Model Transformation Engine Legacy PIM Meta-model Refactored PIM
Automated MDA Process: PSM Refactoring Model Transformation Meta-model PSM Refactoring Transformations Model Transformation Engine Legacy PSM Meta-model Refactored PSM
Automated MDA Process: Code Refactoring Model Transformation Meta-model Source Code Meta-Model Legacy Source Code Refactoring Transformations Model Transformation Engine Source Code Meta-Model Refactored Source Code
OMG Tasks in MDA Initiative E Define meta-modeling standard: Meta-Object Facility (MOF) E Define general-purpose visual modeling standard: Unified Modeling Language (UML) E Define complementary general-purpose, semi-formal textual modeling standard to make both MOF metamodels and UML models more precise and devoid of natural language: Object Constraint Language (OCL) E Define general-purpose, both machine-processable and userreadable persistent textual format for both MOF meta-models and UML models: XML Model Interchange (XMI) E Define model manipulation standard: Query View Transform (QVT) E Each of these standards to be defined in terms of: E Abstract syntax as a MOF meta-model E Concrete syntax (visual or textual) E Formal semantics (very partial up to now)
Relationships between OMG’s MDA standards UML 2 Infrastructure Basic UML 2 Superstructure Constructs Classes Associations Attributes. . . Types. . . Packages. . . merge Behavioral merge Structural Activities Components Actions Ports. . . States. . . Transitions. . . merge XMI MOF 2 merge EMOF CMOF OCL merge QVT
Example Meta-Model 1. . * MOF Meta-Model of Use-Cases extends 0. . 1 actor +name 1. . * extends use. Case system +title +name 1. . * includes e-Store UML Model: Use-Case Diagram Order. Item Validate. Cart
Example Meta-Model MOF Meta-Model of MOF Meta-Model parameter +direction attribute +name +multi operation +name class +name association. End +name +multi package +name association +name 1. . * MOF Meta-Model of UML Use-Cases extends 0. . 1 extends actor +name 1. . * use. Case 1. . * +title system +name includes
Example of XMI Encoding extends 0. . 1 actor +name use. Case 0. . * * +title includes e-Store order. Item Client validate. Cart system +name <uml. Model> <use. Case id = “oiuc”> <title, visib = pub> “order. Item” </title> </use. Case> <use. Case id = “vcuc”> <title, visib = pub> “validate. Cart” </title> </use. Case> <actor id = “ca”> <name, visib = pub> “Client” </name> </actor> <system id = “ess”> <name, visib = pub> “e-Store” </name> </actor> <actor 2 use. Case id = “ca 2 oiuc”> <in idref = “ca”/> <out idref = “oiuc”/> </actor 2 use. Case> <actor 2 use. Case id = “ca 2 vcuc”> <in idref = “ca”/> <out idref = “vcuc”/> </actor 2 use. Case>
Other Stakeholders’ Tasks in MDA Initiative E Platform providers: E Define platform model as UML Profile or PSM meta-model in MOF E Multiple domains or wide domain application providers: E Use only standards defined by OMG and platform providers E Narrow domain application providers: E Define special-purpose modeling languages in MOF E MDA CASE tool providers: E Implement model base development and management services such as edition, syntactic validation, import, export, persistence, query, access control, versioning and traceability for: E Models in UML, OCL and MOF-specified user-defined languages E MOF meta-models E QVT and MOF-specified model transformation languages E Define APIs to program new model processing services on top of theses basic services E Implement model transformation engines based on MOF and QVT E Implement code and test generation services from PSM
MDA Third-Party Standards and Tools E Java Modeling Interface (JMI): E Standard from Java Community Process (JCP) E Defines a set of Java interfaces to process models represented as Java objects: E Reflective interfaces define general model manipulation operations that are independent of the model’s meta-model E Taylored interfaces define model manipulation operations that are specific to models that follow a given meta-model E Taylored interfaces can be automatically generated from a MOF meta-model E Eclipse Modeling Framework (EMF): E Standard from the Open Source Java-Based IDE project Eclipse (www. eclipse. org) E Plug-in for Eclipse IDE framework E Implements similar reflective and taylored interfaces than JMI E Implements generation of taylored interface from MOF meta-model E Implements generation of Eclipse-integrated model editor from MOF meta-model
Model representation as XML document and Java Objects Main Memory programmatically represents File System textually represents MOF XMI Meta-model Schema (meta-model) Java Reflective Interfaces generates programmatically represents textually represents Meta-model Java Taylored Interfaces XML Schema process create / process programmatically represents Model Java Objects import / export textually represents XML Document
Java Model Representation vs. Implementation E Java objects generated using the taylored and reflective interfaces of JMI or EMF merely represent model elements E They only provide a handle to process these elements using Java E They are completely different from Java objects that implement these model elements E Though among many other uses, theses model representation Java objects can be used as input to program in Java the generation of model implementing Java objects E But they could also be used to generate a C++ or Prolog implementation of the application or any other MDA service E Java model representation objects are useful for MDA CASE tools during the development process of an application, whereas Java model implementation objects are useful for this application E In one case, Java is used to implement CASE tools functionalities, in the second case, Java is used to implement application functionalities