Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Welcome Model Driven Architecture with Executable UML Cambridge, June 17 Chris Raistrick, Kennedy Carter [email_address]
Agenda <ul><li>The MDA Process </li></ul><ul><li>Domain Modelling </li></ul><ul><li>Executable UML </li></ul><ul><li>Integ...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Introduction
Important TLAs <ul><li>This presentation describes </li></ul><ul><li>a process for system development, known as </li></ul>...
Platform Independent Model <ul><li>A Platform Independent Model (PIM) is a  technology agnostic  model of some aspect of t...
What is Special about MDA with xUML? <ul><li>MDA with xUML provides an approach based upon building models that are: </li>...
Real Engineers Do It Rigorously The MDA process can be summarized as: SPECIFY DOMAINS Identify New/Reused Domains Model Sy...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 The MDA Process
MDA Maturity Scale We will focus on this maturity level Code “ What’s a model?” Code Model Visualize Code Model Synchroniz...
MDA Maturity Scale Productivity Code “ What’s a model?” Code Model Visualize Code Model Synchronize Code Model Synthesize ...
Translation-based Development The Executable MDA (xMDA) process represents an evolution of traditional development process...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Domain Modelling
Definition <ul><li>A  domain  is a separate real, hypothetical or abstract world inhabited by a distinct set of classes th...
A Standardised Domain Model Source: http://www.webopedia.com/img/OSI_Model.jpg
Pattern: Domains to Isolate Areas of Change Provides standard interface services Maps to standard interface services to te...
Pattern: Domains to Isolate Areas of Change User Interface Provides standard interface services Textual User Interface Map...
Plug and Play Weapons In a perfect world… It should be possible to load any of these weapons… … onto any of these airframe...
Plug and Play Domain Architecture Software System Weapon specific plug-ins Comms specific plug-ins Language specific plug-...
Counterparts Each real-world thing can be represented as different abstractions in various domains...the  counterpart clas...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Executable UML
Primary xUML Artefacts 5. Define Class Interfaces Domain:  Interaction Diagram 1. Capture Requirements System: Use Cases 2...
Use Case Model <ul><li>Use cases specify the  capabilities  to be provided by the system, and how they  interact with huma...
Domain Model <ul><li>Domains specify the  subject matters , or areas of expertise, on our system. </li></ul><ul><li>Domain...
Sequence Diagram <ul><li>The Sequence Diagram helps identify the  domain interfaces  needed to support each Use Case </li>...
Classes <ul><li>Classes identify the things that exist with a domain.  Ideally, they represent things in the “real world” ...
Attributes <ul><li>Attributes specify what we know about each thing (or class). </li></ul><ul><li>They are  analogous to d...
Associations <ul><li>Associations capture real-world connections between classes. </li></ul>
Operations <ul><li>Operations specify what we can do to each thing. </li></ul><ul><li>They are  analogous to code . </li><...
Operations and Methods Every operation has a  method … …which can be specified using a standard 3GL, such as C++… …or a UM...
Internal and External Interfaces <ul><li>The  Class Interaction Model  shows the interfaces within the system, and between...
The xUML Model Structure System Model Domains Classes Operations States xUML Model (PIM) Platform-Specific Configuration
Isn’t xUML with ASL Just Coding in Another Language? <ul><li>Yes…but… …as xUML “programmers”, we do not need to clutter ou...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Integrating Models
Elements of a Domain’s Interfaces <ul><li>Each domain can be thought of as an “integrated circuit” of classes (the black b...
Required Interface Attaching an association terminator to a class makes it eligible for participation in counterpart relat...
Provided Interface The Provided Interface  consists of  operations  attached to domains or classes, and  signals  attached...
The “Wiring” Is Specified in a Build Set… Air Traffic Control System Build Set Counterpart associations  can be establishe...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 System Generation
The Code Generator: Domains Populate Generate System Model Code Generator Generated Code xUML Runtime Layer Generated Syst...
The Code Generator: Classes and Methods (Part of)  Configurable Code Generator Domain Chart Code Generator Code Generator ...
Build a PIM <ul><li>The domain experts build PIMs using xUML, such as this one: </li></ul>Platform Independent Model : Cla...
Instantiate the Formalism Metamodel Domain Instance Class Instances Attribute Instances Populated Executable UML Class Mod...
The Metamodels Embody the Code Generation Rules Domain.generateCode Class.generateCode Attribute.generateCode The task of ...
Generate the Code Platform Independent Model : Class Diagram Generated C Code Generate Generate xUML-Code Mappings Code Ge...
Code Generation Overview Populate Generate xUML Model (PIM) Platform-Specific Configuration System Model xUML-Code Mapping...
Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Summary
Primary Artefacts 5. Define Class Interfaces Domain:  Interaction Diagram 1. Capture Requirements System: Use Cases 2. Par...
MDA: Models, Metamodels and Mappings M2 M1 M0 Class UML Type Of Aircraft ATC Actual Aircraft <<instance of>> Air Force 1: ...
Maintainability vs. Executability PSM (UML) manually build a  Platform Specific Model … manually code a  Platform Specific...
Key Facets of MDA with xUML Rigorous lightweight process Precise simple modelling formalism Separation of concerns Formali...
The End Model Driven Architecture with Executable UML Cambridge, June 17 Chris Raistrick, Kennedy Carter [email_address]
Upcoming SlideShare
Loading in …5
×

MDA with Executable UML

2,497 views

Published on

Provides an overview of the Model Driven Architecture process and the Executable UML notation for system modelling.

Published in: Technology
  • Be the first to comment

MDA with Executable UML

  1. 1. Welcome Model Driven Architecture with Executable UML Cambridge, June 17 Chris Raistrick, Kennedy Carter [email_address]
  2. 2. Agenda <ul><li>The MDA Process </li></ul><ul><li>Domain Modelling </li></ul><ul><li>Executable UML </li></ul><ul><li>Integrating Models </li></ul><ul><li>System Generation </li></ul>
  3. 3. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Introduction
  4. 4. Important TLAs <ul><li>This presentation describes </li></ul><ul><li>a process for system development, known as </li></ul><ul><li>Model Driven Architecture (MDA) </li></ul><ul><li>which involves building </li></ul><ul><li>Platform-Independent Models (PIMs) </li></ul><ul><li>from which we derive </li></ul><ul><li>Platform-Specific Models (PSMs) </li></ul><ul><li>and/or </li></ul><ul><li>Platform-Specific Implementations (PSIs). </li></ul><ul><li>The models are represented using the notation known as the </li></ul><ul><li>Unified Modeling Language (UML). </li></ul><ul><li>Both the MDA process and the UML notation </li></ul><ul><li>are owned by the non-profit consortium known as the </li></ul><ul><li>Object Management Group (OMG). </li></ul>see omg.org/mda
  5. 5. Platform Independent Model <ul><li>A Platform Independent Model (PIM) is a technology agnostic model of some aspect of the system under study. </li></ul><ul><li>A PIM contains no information about any of the following: </li></ul><ul><ul><li>Hardware Architecture </li></ul></ul><ul><ul><li>Operating System </li></ul></ul><ul><ul><li>Programming Language </li></ul></ul><ul><ul><li>Database Technology </li></ul></ul><ul><ul><li>Internal Communication Technology </li></ul></ul><ul><li>It is therefore much simpler than a Platform-Specific Model (PSM) </li></ul><ul><li>PIMs built using xUML can be: </li></ul><ul><ul><li>Executed to demonstrate compliance with functional requirements </li></ul></ul><ul><ul><li>Automatically translated into a complete Platform Specific Implementation using a suitable model translator </li></ul></ul><ul><ul><li>Used as executable specifications , forming the basis for contract-based procurement </li></ul></ul>
  6. 6. What is Special about MDA with xUML? <ul><li>MDA with xUML provides an approach based upon building models that are: </li></ul><ul><ul><li>precise </li></ul></ul><ul><ul><li>complete </li></ul></ul><ul><ul><li>platform-independent </li></ul></ul><ul><ul><li>testable. </li></ul></ul><ul><li>Such models allow us to follow a process with some interesting qualities… </li></ul><ul><li>… which will be revealed as the afternoon progresses… </li></ul><ul><li>… and which put software engineering on a par with other engineering disciplines. </li></ul>
  7. 7. Real Engineers Do It Rigorously The MDA process can be summarized as: SPECIFY DOMAINS Identify New/Reused Domains Model System Use Cases Establish a well-defined and automated construction process Build precise, predictive models Subject the models to rigorous testing before implementation To build this Construct the system from large, reusable components VALIDATE PIMS Execute Domain Use Cases Execute System Use Cases BUILD PLATFORM-INDEPENDENT MODELS (PIMS) Model Domain Use Cases Build Static Model - Class Diagram Build Behavioural Model - State Charts & Operations Build Action Model - State Actions & Methods Compile and Debug PIMS SPECIFY SYSTEM CONSTRUCTION PROCESS Define/Buy PIM To PSI Mapping Rules Build/Buy PIM Compiler GENERATE SYSTEM Apply PIM to PSI Mapping Rules (Execute PIM Compiler) Perform Target Testing
  8. 8. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 The MDA Process
  9. 9. MDA Maturity Scale We will focus on this maturity level Code “ What’s a model?” Code Model Visualize Code Model Synchronize Code Model Synthesize Model “ What’s code?” Model Centric Code Centric
  10. 10. MDA Maturity Scale Productivity Code “ What’s a model?” Code Model Visualize Code Model Synchronize Code Model Synthesize Model “ What’s code?” Translation Process Elaboration Process
  11. 11. Translation-based Development The Executable MDA (xMDA) process represents an evolution of traditional development processes… Write High Level Language (C++/Ada/Java…) Define High Level Language Mapping Rules Translate High Level Language Machine Code Traditional Software Development Build Platform Independent Model (xUML) Define xUML Mapping Rules Translate xUML HLL (C++/Ada/Java…) xMDA Development High Level Language HLL Mapping Rules PIM xUML Mapping Rules
  12. 12. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Domain Modelling
  13. 13. Definition <ul><li>A domain is a separate real, hypothetical or abstract world inhabited by a distinct set of classes that behave according to the rules and policies characteristic of that domain. </li></ul>AIRCRAFT It is a policy of Air Traffic Control that I must remain at least 3 miles horizontally and 1000 feet vertically from all other aircraft Class in Air Traffic Control Domain (a “real” world) ICON It is a policy of this User Interface that I must become translucent if I am in front of another icon Class in User Interface Domain (an “abstract” world)
  14. 14. A Standardised Domain Model Source: http://www.webopedia.com/img/OSI_Model.jpg
  15. 15. Pattern: Domains to Isolate Areas of Change Provides standard interface services Maps to standard interface services to technology-specific services Provides technology- specific interface services Technology Independent Domain Technology 1 Technology n
  16. 16. Pattern: Domains to Isolate Areas of Change User Interface Provides standard interface services Textual User Interface Maps to standard interface services to technology-specific services Graphical User Interface Provides technology- specific interface services displayIcon displayText display3DEntity
  17. 17. Plug and Play Weapons In a perfect world… It should be possible to load any of these weapons… … onto any of these airframes… … and make available a set of common core capabilities… … even if some weapon-specific capabilities are not available
  18. 18. Plug and Play Domain Architecture Software System Weapon specific plug-ins Comms specific plug-ins Language specific plug-ins Communications Future Comms Technology Existing Comms Technology Weapon Control Future Weapon Existing Weapon Target Hardware xUML Execution Platform Any Language Any Operating System Achieves weapon type independence Achieves execution platform independence Achieves comms platform independence
  19. 19. Counterparts Each real-world thing can be represented as different abstractions in various domains...the counterpart classes , linked via counterpart associations The Contact Class “ A correlated radar contact” The Aircraft Class “ A piloted aircraft in controlled airspace” The Icon Class A shape with context-sensitive pop-up menu options Air Traffic Control Graphical User Interface Radar Data Processing Aircraft Fuzed Track Icon The Class Class “ An encapsulation of data and operations” PIM-PSM Mapping Class
  20. 20. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Executable UML
  21. 21. Primary xUML Artefacts 5. Define Class Interfaces Domain: Interaction Diagram 1. Capture Requirements System: Use Cases 2. Partition into Domains System: Domain Model 3. Define Domain Interfaces Use Case: Sequence Diagram 4. Specify Classes Domain: Class Model Class: State Model 6. Specify Behavior
  22. 22. Use Case Model <ul><li>Use cases specify the capabilities to be provided by the system, and how they interact with humans (e.g. Pilot/Ground Crew) and equipment (e.g. Carriage/Weapon Hardware) </li></ul>
  23. 23. Domain Model <ul><li>Domains specify the subject matters , or areas of expertise, on our system. </li></ul><ul><li>Domains are organised into layers , each providing services to those above, and requiring services of those below. </li></ul><ul><li>For each domain we will build a Platform Independent Model </li></ul>
  24. 24. Sequence Diagram <ul><li>The Sequence Diagram helps identify the domain interfaces needed to support each Use Case </li></ul>Sequence Diagram for Use Case: Use Case Model Domain Model
  25. 25. Classes <ul><li>Classes identify the things that exist with a domain. Ideally, they represent things in the “real world” of that domain. </li></ul><ul><li>They establish the vocabulary of the domain, or area of expertise. </li></ul><ul><li>For example, the “Weapon Management” domain might contain this class… </li></ul>
  26. 26. Attributes <ul><li>Attributes specify what we know about each thing (or class). </li></ul><ul><li>They are analogous to data . </li></ul>
  27. 27. Associations <ul><li>Associations capture real-world connections between classes. </li></ul>
  28. 28. Operations <ul><li>Operations specify what we can do to each thing. </li></ul><ul><li>They are analogous to code . </li></ul>
  29. 29. Operations and Methods Every operation has a method … …which can be specified using a standard 3GL, such as C++… …or a UML action language as in this example Find a set of objects Invoke an object-scoped operation Create a link
  30. 30. Internal and External Interfaces <ul><li>The Class Interaction Model shows the interfaces within the system, and between the system and the outside world. </li></ul><ul><li>In this view, “Actors” are represented as <<terminator>> or <<interface>> classes. </li></ul>Class Interaction Model Internal interface External interface Use Case Diagram
  31. 31. The xUML Model Structure System Model Domains Classes Operations States xUML Model (PIM) Platform-Specific Configuration
  32. 32. Isn’t xUML with ASL Just Coding in Another Language? <ul><li>Yes…but… …as xUML “programmers”, we do not need to clutter our minds or our models with: </li></ul><ul><ul><li>Code distribution decisions, with consequential additional components such as inter-node communication skeletons and stubs </li></ul></ul><ul><ul><li>Data distribution and replication, with consequential additional components to manage the distributed collection </li></ul></ul><ul><ul><li>Data structure decisions, with consequential code to access the structures </li></ul></ul><ul><ul><li>Shared resource locking </li></ul></ul><ul><li>… and we can easily change our minds about: </li></ul><ul><ul><li>Static or dynamic memory management </li></ul></ul><ul><ul><li>Threading strategy </li></ul></ul><ul><ul><li>Data persistence </li></ul></ul><ul><ul><li>Target language </li></ul></ul><ul><li>… without changing the xUML model </li></ul>
  33. 33. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Integrating Models
  34. 34. Elements of a Domain’s Interfaces <ul><li>Each domain can be thought of as an “integrated circuit” of classes (the black box)… …with a set of provided and required interfaces (the ports)… …that can be connected together into a system (the connectors) </li></ul>Air Traffic Control required interfaces User Interface provided interfaces bridge operations
  35. 35. Required Interface Attaching an association terminator to a class makes it eligible for participation in counterpart relationships The Required Interface consists of operations attached to <<terminator>> classes Air Traffic Control required interfaces User Interface provided interfaces bridge operations Air Traffic Control Domain (part of) Class Collaboration Diagram <<association terminator>> Air Traffic Controller Aircraft requestTaxi required operation
  36. 36. Provided Interface The Provided Interface consists of operations attached to domains or classes, and signals attached to classes Air Traffic Control required interfaces User Interface provided interfaces bridge operations User Interface Domain (part of) Class Collaboration Diagram Icon <<association terminator>> Client makeIconFlash provided operation
  37. 37. The “Wiring” Is Specified in a Build Set… Air Traffic Control System Build Set Counterpart associations can be established between classes with at least one association terminator Air Traffic Control Domain (part of) Class Collaboration Diagram <<association terminator>> Air Traffic Controller Aircraft requestTaxi required operation User Interface Domain {kl=UI} (part of) Class Collaboration Diagram Icon <<association terminator>> Client makeIconFlash provided operation CPR1 counterpart association bridge: requestTaxi counterpartIcon = this -> CPR1 $USE UI [ ] = ICN2:makeIconFlash[ ] on counterpartIcon $ENDUSE Bridge operation
  38. 38. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 System Generation
  39. 39. The Code Generator: Domains Populate Generate System Model Code Generator Generated Code xUML Runtime Layer Generated System Adaptation Layer The code generator itself is a set of domain models expressed using xUML. The domains represent the various components of an xUML system. (Part of) Code Generator Domain Chart xUML Model (PIM) Platform-Specific Configuration xUML-Code Mappings Code Generator
  40. 40. The Code Generator: Classes and Methods (Part of) Configurable Code Generator Domain Chart Code Generator Code Generator xUML-Code Mappings (Part of) Executable UML Class Model the classes in each domain represent the elements that make up those components. Method to Generate Java Method to Generate Ada Method to Generate C++ Method to Generate C … $FORMAT header_file typedef struct C[I:this.class_ID]_struct { /* &quot;[T:this.class_name]&quot; Class Header */ struct s_object *next_instance; $ENDFORMAT … Each element contains operations which specify how to map that xUML element onto a specific target language.
  41. 41. Build a PIM <ul><li>The domain experts build PIMs using xUML, such as this one: </li></ul>Platform Independent Model : Class Diagram Populate Generate xUML Model (PIM) Platform-Specific Configuration System Model xUML-Code Mappings Code Generator Code Generator Generated Code xUML Runtime Layer Generated System Adaptation Layer
  42. 42. Instantiate the Formalism Metamodel Domain Instance Class Instances Attribute Instances Populated Executable UML Class Model When the Executable UML domain is populated with the PIM components, we see these instances… Populate xUML Model (PIM) Platform-Specific Configuration System Model xUML-Code Mappings Code Generator Code Generator
  43. 43. The Metamodels Embody the Code Generation Rules Domain.generateCode Class.generateCode Attribute.generateCode The task of translation involves iterating through these instances and generating suitable code from them. Code Generator Code Generator xUML-Code Mappings
  44. 44. Generate the Code Platform Independent Model : Class Diagram Generated C Code Generate Generate xUML-Code Mappings Code Generator Code Generator Generated Code xUML Runtime Layer Generated System Adaptation Layer
  45. 45. Code Generation Overview Populate Generate xUML Model (PIM) Platform-Specific Configuration System Model xUML-Code Mappings Code Generator Code Generator Generated Code xUML Runtime Layer Generated System Adaptation Layer PLATFORM SPECIFIC CONFIGURATION FILE PROCESS &quot;Process One&quot; ONE 1 127.0.0.1 1000 1600 PROCESS &quot;Process Two&quot; TWO 1 127.0.0.1 1001 1601 CLASS-PROCESS WM TGT ONE CLASS-PROCESS WM WPN TWO (part of) xUML Metamodel Domain Class Attribute owning_domain = this -> R2 $FORMAT header_file typedef struct D[I:owning_domain.domain_ID]_C[I:this.class_ID]_struct { /* &quot;[T:this.class_name]&quot; Class Header */ struct s_object *next_instance; /* Linked list of */ struct s_object *prev_instance; /* object instances */ struct s_object *rel_ptr; /* list of rel'ns */ struct s_object *cpr_ptr; /* list of cp rel'ns */ $ENDFORMAT {attributes_in_class} = this -> R3 for the_attribute in {attributes_in_class} do [] = ATT1:generateCode [header_file] on the_attribute endfor $FORMAT header_file }; $ENDFORMAT Multi-node multi-process runtime Windows Vista adaptation layer
  46. 46. Chris Raistrick [email_address] Model Driven Architecture with Executable UML Cambridge, June 17 Summary
  47. 47. Primary Artefacts 5. Define Class Interfaces Domain: Interaction Diagram 1. Capture Requirements System: Use Cases 2. Partition into Domains System: Domain Model 3. Define Domain Interfaces Use Case: Sequence Diagram 4. Specify Classes Domain: Class Model Class: State Model 6. Specify Behavior
  48. 48. MDA: Models, Metamodels and Mappings M2 M1 M0 Class UML Type Of Aircraft ATC Actual Aircraft <<instance of>> Air Force 1: Actual Aircraft ATC Objects <<instance of>> Radar Measurement RADAR Fuzed Track <<model time>> CPR Package Ada <<cgen time>> CPR Fuzed Track 50: Fuzed Track RADAR Objects <<instance of>> <<run time>> CPR
  49. 49. Maintainability vs. Executability PSM (UML) manually build a Platform Specific Model … manually code a Platform Specific Implementation PSI (Code) manually build a Platform Independent Model … PIM (UML) Elaborate Compromise between maintainability and executability In classic approaches, the PSI (code) must be built to be maintainable, typically by incorporating layering and encapsulation … …which have a detrimental effect on speed and size of the executing system PSI (Code) automatically generate a Platform Specific Implementation using PIM-PSI mappings manually build a Platform Independent Model … PIM (xUML) Translate Built for executability Built for maintainability In translation-based approaches, the maintained entity (the PIM) is built for maintainability with layering and encapsulation… … while the executable entity (the PSI) is optimized for execution efficiency
  50. 50. Key Facets of MDA with xUML Rigorous lightweight process Precise simple modelling formalism Separation of concerns Formalised design and implementation policies
  51. 51. The End Model Driven Architecture with Executable UML Cambridge, June 17 Chris Raistrick, Kennedy Carter [email_address]

×