10 What is a Model? A description of (part of) a system written in a well-defined language. (Equivalent to specification.) [Kleppe, 2003] A representation of a part of the function, structure and/or behavior of a system [MDA, 2001] A description or specification of the system and its environment for some certain purpose. A model is often presented as a combination of drawings and text. [MDA Guide, 2003] A set of statements about the system. [Seidewitz, 2003] (Statement: expression about the system that can be true or false.) M is a model of S if M can be used to answer questions about S [D.T. Ross and M. Minsky, 1960] 19 What is a Model (2) 1: obsolete : a set of plans for a building 2: dialect British : copy, image 3: structural design <a home on the model of an old farmhouse> 4: a usually miniature representation of something ; also : a pattern of something to be made 5: an example for imitation or emulation 6: a person or thing that serves as a pattern for an artist ; especially : one who poses for an artist 7: archetype 8: an organism whose appearance a mimic imitates 9: one who is employed to display clothes or other merchandise 10 a: a type or design of clothing b: a type or design of product (as a car) 11: a description or analogy used to help visualize something (as an atom) that cannot be directly observed 12: a system of postulates, data, and inferences presented as a mathematical description of an entity or state of affairs; also: a computer simulation based on such a system <climate models> 13: version 14: animal model 20

11 What is a Metamodel? A model of a well-defined language [Kleppe, 2003] A model of models [MDA, 2001] A model that defines the language for expressing a model [MOF, 2000] A meta-metamodel is a model that defines the language for expressing a metamodel. The relationship between a meta-metamodel and a metamodel is analogous to the relationship between a metamodel and a model. A model of a modelling language [Seidewitz, 2003] That is, a metamodel makes statements about what can be expressed in the valid models of a certain modelling language 21 OMG s four-layers metamodel hierarchy Level M 3 Level M 2 the SPEM MM the MOF MMM the UML MM the CWM MM EBNF the Pascal grammar Level M 1 a UML model m another UML model m a Pascal program P Level M 0 a particular use of m another use of m an execution X of program P 22

18 Agenda 1. Introduction 2. Models, Metamodels and Transformations 3. Domain Specific Modeling 4. Model Driven Development and Model Driven Engineering 5. MDA primer 6. Conclusions 35 Domain Specific Languages (DSL) Languages for representing different views of a system in terms of models Higher-level abstraction than general purpose languages Closer to the problem domain than to the implementation domain Closer to the domain experts, allowing modelers to perceive themselves as working directly with domain concepts Domain rules can be included into the language as constraints, disallowing the specification of illegal or incorrect models. 36

19 Each notation is more apt for a task MCMLXVII + DLXXIX??? Desarrollo de Software Dirigido por Modelos 12 de Julio de Each notation is more apt for a task MCMLXVII + DLXXIX??? Desarrollo de Software Dirigido por Modelos 12 de Julio de

20 Each notation is more apt for a task MCMLXVII + DLXXIX MMDXLVI Desarrollo de Software Dirigido por Modelos 12 de Julio de How do you solve this problem? A 40-years-old man has a daughter and a son. If the difference of age between the kids is 4 years, and the sum of their ages is half of the age of the father, how old are they? + x y = 4 x + y = 20 2x = 24 x = 12 y = 8 Solution: the older is 12 and the younger is 8 40

21 Problems, Notations, Solutions An invariant through the history of mature disciplines is the search for notations that allow formulating problems in a language that allows their easy solution 41 Domain Specific Modeling Several notations for Domain Specific Modeling (DSM) already available Abstract and concrete syntaxes for the definition of models, metamodels and their representations Enable the rapid and inexpensive development of DSLs and associated tools (e.g., editors) Repositories of metamodels and model transformations already in place Eclipse/GMT/AM3 project MDWEnet initiative 42

22 DSLs DSLs are defined in terms of Abstract syntax (domain concepts and rules) Concrete syntax (language representation) Metamodels used to represent the abstract syntax Models conform to metamodels Metamodels are models, too A metamodel conforms to its meta-metamodel This tower usually ends at level 4 43 An example of a domain-specific model 44

23 An example of a (more useful) DSL 45 What is in a metamodel? A metamodel describes the concepts of the language, the relationships between them, and the structuring rules that constrain the model elements and combinations in order to respect the domain rules 46

24 Some questions It is not clear from the SimpleStateMachines metamodel what happens if an event occurs and there is no transition that can be triggered. Is the event lost, or is it held until the state machine reaches a state with a transition that can be triggered by the event? What is the behavior of the system when it contains internal transitions? How do they exactly behave? 47 Semantics These descriptions only capture the static specification of the language [Robin Milner]: A (meta)model consists of some concepts, and a description of permissible activity in terms of these concepts. [Chen et al]: Metamodel semantics Structural semantics: describe the meaning of models in terms of the structure of model instances: all of the possible sets of components and their relationships, which are consistent with the well-formedness rules Behavioral semantics: describe the evolution of the state of the modeled artifacts along some time model 48

25 Semantics of Models 49 The Meaning of Models There are only 10 types of people in the world: Those who understand binary, and those who don't 50

26 Sure? There are only 10 types of people in the world: Those who understand binary, and those who don't 51 Same model for different concepts 10 2 There are only 10 types of people in the world: Those who understand binary, and those who don't Your meaning goes here Desarrollo de Software Dirigido por Modelos 12 de Julio de

27 Different models for the same concept 10 X A 10 Desarrollo de Software Dirigido por Modelos 12 de Julio de What does this model mean? 54

28 What does this model mean? How do the models that conform to it behave? 55 Why do I need to assign meanings to models? What do I need models for? Describe the system Structure, behaviour,... Separate concepts at different conceptual levels Communicate with stakeholders Understand the system If existing (legacy applications) Validate the model Detect errors and omissions in design ASAP Mistakes are cheaper at this stage Prototype the system (execution of the model) Formal analysis of system properties Drive implementation Code skeleton and templates, complete programs (?) [Selic, 2003] 56

29 How do we assign meaning? How do we express the meaning of Structure? Behavior? Time-dependent functionality? QoS properties? Which is the best notation for each of those aspects? It depends on the purpose of the model and must have a precise meaning 57 Semantic bridges As Model Transformations!!! Types Domestic Horizontal Vertical Abstracting Refining Pruning Forgetful The relationship between domains D and D is defined by a model transformation T:D->D. [[M]] D := [[T(M)]] D Desarrollo de Software Dirigido por Modelos 12 de Julio de

31 Model Driven Development (MDD) An approach to software development in which the focus and primary artifacts are models (as opposed to programs) and model transformations (compare with current language-driven approaches, whose first-class entities are programs and compilers ) MDD implies the (semi) automated generation of implementation(s) from models Modeling languages are key to MDD Model transformation languages are also modeling languages Models conform to meta-models MDA is the OMG s proposal for MDD, using OMG standards: MOF, UML, OCL, XMI, QVT MOF and UML allow the definition of new families of languages (by using, e.g., UML Profiles) 61 Reasons for using MDE You want to provide a way for your domain-experts to formally specify their knowledge, and technology people define how this is implemented (using model transformations). You might want to provide different implementations (i.e. more concrete models) for the same model, perhaps because you want to run it on different platforms (.NET, Java, CORBA). You may want to capture knowledge about the domain, the technology, and their mapping uncluttered with details from the other areas. In general, you don t want to bother with implementation details when specifying you functionality. MDD results in a fan-out, i.e. one set of models can be the source for transformations to several targets. 62

34 MDA Concepts Viewpoint A viewpoint on a system is a technique for abstraction using a selected set of architectural concepts and structuring rules, in order to focus on particular concerns within that system View A viewpoint model or view of a system is a representation of that system from the perspective of a chosen viewpoint Implementation An implementation is a specification, which provides all the information needed to construct a system and to put it into operation Platform A set of subsystems/technologies that provide a coherent set of functionality through interfaces and specified usage patterns that any subsystem that depends on the platform can use without concern for the details of how the functionality provided by the platform is implemented. 67 MDA models (1/2) Computation Independent Model (CIM) A view from a system from the Computational Independent Viewpoint. A CIM Focuses on the system and its environment; the details of the structure of the system are hidden or as yet undetermined. A CIM is sometimes called a domain model or a business model, and is specified using a vocabulary that is familiar to the practitioners of the domain in question It may hide much or all information about the use of automated data processing systems. Platform Independent Model (PIM) A platform independent model is a view of a system from the platform independent viewpoint. A PIM exhibits platform independence and is suitable for use with a number of different platforms of similar type. 68

35 MDA models (2/2) Platform Specific Model (PSM) A platform specific model is a view of a system from the platform specific viewpoint. A PSM combines the specifications in the PIM with the details that specify how that system uses a particular type of platform. Platform Model (PM) A platform model provides a set of technical concepts, representing the different kinds of parts that make up a platform and the services provided by that platform. It also provides, for use in a platform specific model, concepts representing the different kinds of elements to be used in specifying the use of the platform by an application. 69 Examples of MDA models CIM Use case models capturing the system requirements PIM The software architecture of the system, that describes how the functionality of the system is decomposed into (architectural) components and connectors PSM A model of the J2EE implementation of the system, expressed using the EJB Profile that describes how the (architectural) components need to be implemented by EJBs Code The EJBs themselves, their configuration files, etc., ready to be deployed. 70

39 Generación de bridges CORBA Model Platform- Independent Model Los bridges se construyen a partir de los modelos XML/SOAP Model Los bridges (puentes) pueden generarse de forma automática en la mayoría de los casos, tanto dentro de la propia empresa, como para lograr interoperabilidad entre sistemas de diferentes compañías CORBA System Interop Bridge XML/SOAP System 77 The MDA pattern can be [has to be usually] applied several times in succession What is a PSM resulting from one application of the pattern, will be a PIM in the next application Each plataform can then address one particular aspect of the system, and are successively applied This process is modular and ordered Applying the MDA Pattern several times 78

40 Advantages Each model is independent from the rest Separately defined Each model defines its own entities, and resides at a well-defined level of abstraction Software development becomes model transformation Each step transforms (one or more) PIM at one level into (one or more) PSM at the next level...until a final system implementation (PSM) is reached Transformations can be automated We gain modularity, flexibility, and facilitate evolution Application models capturing business logic and IP become corporate assets, independent from the final implementation technologies 79 The MDA way Define the system PIMs (structure, behavior, navigation, presentation, components, distribution,...) Select the target platform(s) Web pages (navigation), Java (Travel Agency), WSDL and JWSDP (external services: banks, airlines,...),... Define the transformations Either using transformation rules between the PIM metamodels (the PIM languages) and the target platforms metamodels Or by marking the PIM elements using the marks defined by the mappings Apply the mappings to the PIM elements Using a transformation engine, or manually This will produce a set of elements of different PSM Bridges (e.g., calls) between elements in heterogeneous target PSMs should be defined! 80

42 Conclusions MDD and DSM seem to be the right way to go Conceptually clean and well defined Protect investment and IP by separating the business model from the supporting technologies Model centric! but MDD is not the panacea Many skeptical positions and critiques No manual coding is not 100% achievable in general We need to identify the domains in which MDD can be effectively used, and develop tools for it (e.g., Web-based systems) In any case, it is working *NOW* for many domains 83 MDA Tools (see also ATL ATLAS Transformation Language is language for general transformation within the MDA framework MIA Model-in-Action is a tool that implements the concepts of MDA. OptimalJ is a MDA tool for J2EE. ArcStyler is a MDA tool for J2EE and.net. UMT UML Model Transformation is a tool for model transformation and code generation of UML/XMI models MTL Model transformation at Inria ModelWare ModFact is an Open Source project for the MDA at LIP6 AndroMDA is an open source code generation framework that follows the MDA paradigm Middlegen is a free general-purpose database-driven code generation engine based on JDBC, Velocity, Ant and XDoclet OpenModel is a java-based framework for generating executable applications from UML models and it complements ArgoUML MCC is a MDA tool supporting J2EE and.net(in the works). Codagen Architect is MDA tool for J2EE and.net. UMLX is an experimental graphical transformation language. MDA Transf is a MDA transformation engine GMT (Generative Model Transformer) is a project to build MDA tools such as UMLX JAMDA (Java Model Driven Architecture) is an open-source framework for building applications generators which create Java code from a model of the business domain PathMATE Model Automation & Transformation Environment is an industry's MDA environment providing tools for analysis, and model transformation engine GReAT is a metamodel based graph transformation language useful for the specification and implementation of model-to-model transformation 84

manual de servicio nissan murano z51 Reference Manual To understand featuring to use and how to totally exploit manual de servicio nissan murano z51 to your great advantage, there are several sources of

Welcome to lesson 2 of the The Spanish Cat Home learning Spanish course. Bienvenidos a la lección dos. The first part of this lesson consists in this audio lesson, and then we have some grammar for you

& An explanation by Sr. Jdan direct object pronouns We usually use Direct Object Pronouns to substitute f it them in a sentence when the it them follows the verb. Because of gender, him and her could also

A la caza de vocabulario: come se dice en español? Entrevista: el medio ambiente 1. There are a lot of factories 2. The destruction of the ozone layer 3. In our city there is a lot of rubbish 4. Endangered

Edgar Quiñones HHRR: Common Sense Does Not Mean Business Objective Share experiences & insight gained in the last two decades in the management consulting business regarding why Common Sense Does Not Mean

IBM Rational for Power i The business-driven development lifecycle Agenda Business Driven Development Rational Development Lifecycle DEMO 2 The business-driven development lifecycle Prioritize Plan Manage

Get an early start. Read this first. Use these Back-to-School flyers to reach parents early in the school year. Choose your favorite style, complete the form, then make enough copies to distribute them

Real Time Systems Part 2: Cyclic schedulers Scheduling To organise the use resources to guarantee the temporal requirements A scheduling method is composed by: An scheduling algorithm that calculates the

TOUCH MATH What is it and why is my child learning this? Memorizing math facts is an important skill for students to learn. Some students have difficulty memorizing these facts, even though they are doing

The following is an explanation of the procedures for calling a special meeting of the shareholders. Enclosed are copies of documents, which you can use for your meeting. If you have any questions about

Hoja 1 DE 9 Connecting Cloudino Connector to FIWARE IoT 1. What is FIWARE IoT FIWARE is an open software ecosystem provided by the FIWARE Community (htttp://www.fiware.org). FIWARE exposes to developers

Guide to Health Insurance Part II: How to access your benefits and services. 1. I applied for health insurance, now what? Medi-Cal Applicants If you applied for Medi-Cal it will take up to 45 days to find

Ayuda de trabajo Nueva confirmación de pedido de compra con cambios: proveedor ES Step 1. This Supplier portal activity lists the steps necessary for confirming a new purchase order with changes on price,

Learning Masters Fluent: Wind, Water, and Sunlight What I Learned List the three most important things you learned in this theme. Tell why you listed each one. 1. 2. 3. 22 Wind, Water, and Sunlight Learning

Your response will be used by Facebook to improve your experience. You can't edit the details of this audience because it was created by someone else and shared with you. La respuesta será usada por Facebook

Memo To: ERF Members The Employees Retirement Fund has been asked by Deferred Compensation to provide everyone that has signed up to retire with the attached information. Please read the information from

Reflexive verbs In this presentation, we are going to look at a special group of verbs called reflexives. Let s start out by thinking of the English verb wash. List several things that you can wash. Some