Скачать презентацию Model Driven Architecture and e Xecutable UML The Скачать презентацию Model Driven Architecture and e Xecutable UML The

c4aa61c93a002c837b13db7a6a197fc2.ppt

  • Количество слайдов: 36

Model Driven Architecture and e. Xecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Model Driven Architecture and e. Xecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd www. kc. com KENNEDY CARTER

MDA: The Important Ideas · Three primary viewpoints for modelling - The Computation Independent MDA: The Important Ideas · Three primary viewpoints for modelling - The Computation Independent Model (CIM) · Precise business model, oriented to stakeholders, uncommitted to specific algorithms or system boundary. Also known as a Domain Model. - The Platform Independent Model (PIM) · Precise, computationally complete (executable), uncommitted to any specific platform (portable), oriented to stakeholders (prototyping) and developers (a testable specification), a long life asset - The Platform Specific Model (PSM) · Precise, complete, conforms to constraints of a specific (class of) platform(s), probably generated from a PIM, oriented to technology experts · Interoperability defined at the model level, not the middleware level · Models are integrated in order to construct complete systems · Models are derived from other models by automated transformation · So, MDA promises to be rigorous but lightweight, -> agile modelling K E N N E D Y C

Real Engineers Use A Rigorous Process Construct the system from large, reusable components Establish Real Engineers Use A Rigorous Process Construct the system from large, reusable components Establish a welldefined and automated construction process To build this K E N N E D Y C Build precise, predictive models Subject the models to rigorous testing before implementation

MDA with e. Xecutable UML - What Real Software Engineers Need Construct the system MDA with e. Xecutable UML - What Real Software Engineers Need Construct the system from large, reusable components SPECIFY DOMAINS Identify new/reused domains Establish a welldefined and automated construction process Build precise, predictive models Model system use cases SPECIFY SYSTEM CONSTRUCTION PROCESS BUILD PLATFORM-INDEPENDENT MODELS (PIMS) Define/Buy PIM To PSI Mapping Rules Model domain use cases Build/Buy PIM compiler Build Static Model - Class Diagram Build Dynamic Model - State Charts & Interactions Build Action Model - Operations & State Actions Compile and debug PIMS Subject the models to rigorous testing before implementation To build this GENERATE SYSTEM VALIDATE PIMS Apply PIM to PSI Mapping Rules (Execute PIM Compiler) Execute domain use cases Perform target testing K E N N E D Y C Execute system use cases

Projects Using MDA with e. Xecutable UML (and 100% Code Generation) · · · Projects Using MDA with e. Xecutable UML (and 100% Code Generation) · · · K US Do. D: Single Integrated Air Picture (C++, HLA/RTI) Lockheed Martin Aeronautics: F 16 MMC (Ada 83, Ada 95) BAE Systems: Stingray torpedo MLU (Ada 95) Thales: Nimrod MR 4 crew trainers (C++) GD Government Systems: ATM Switch for US Army (C) Royal Netherlands Navy: combat systems (C++) GCHQ: classified distributed application (C, objectstore) BAE Systems: Management of obsolescence (Structured Analysis, Ada) TRW Automotive: vehicle stability system (efficient C) Siemens Metering: ‘intelligent’ gas meter (C) Nortel Networks: Passport Voice Gateway (C++) UK NHS: ebookings, patient control of access to medical records (C++) E N N E D Y C

But Why MDA? · The usual reasons - Faster, Better, Cheaper · Faster better But Why MDA? · The usual reasons - Faster, Better, Cheaper · Faster better cheaper development processes that result in… · …systems that can be ported readily to faster better cheaper platforms as they become established K E N N E D Y C

MDA is about formalising your knowledge and expertise · Whatever development method you follow, MDA is about formalising your knowledge and expertise · Whatever development method you follow, system development exposes and/or generates a considerable quantity of knowledge about the actual and planned architecture (at all levels) of a system or system of systems · MDA promises to provide a set of languages formalising that knowledge as stakeholder-friendly models that can be verified for correctness… - End-User knowledge about the enterprise - Systems and IT knowledge about platforms - Programmer knowledge about best development practice · …and that can be leveraged to automate the production of downstream deliverables. · If, additionally, the models are PIM’s, then they have the potential to be strategic long life assets. K E N N E D Y C

F-16 Modular Mission Computer Application Software Model Driven Architecture and Executable UML: The Lockheed F-16 Modular Mission Computer Application Software Model Driven Architecture and Executable UML: The Lockheed Martin Experience Lauren E. Clark Chief Engineer F-16 Modular Mission Computer Software Lockheed Martin Aeronautics Company Terry Ruthruff Staff Specialist Software Engineering Core Lockheed Martin Aeronautics Company Bary D. Hogan Methodology Lead F-16 Modular Mission Computer Software Lockheed Martin Aeronautics Company Allan Kennedy Managing Director Kennedy Carter Limited © 2001 Lockheed Martin Corporation Lockheed Martin Aeronautics Company

F 16 MMC Background · F-16 originally designed as a lightweight air superiority fighter F 16 MMC Background · F-16 originally designed as a lightweight air superiority fighter - Jointly built by Belgium, Denmark, Netherlands, Norway, US · First F-16 A flew Dec 76, first operational Jan 1979 - More than 4, 000 F-16 s manufactured to date · Modular Mission Computer (MMC) in post-July 1996 aircraft - Also to be retrofitted to 1, 000 earlier aircraft - Replaces computers for Fire Control, Head-up display, Stores management - Multiple MIPS R 3000 64 -bit CPUs, 60 MB memory, 155 MIPs - 30 x throughput & memory at 60% weight, volume & power K E N N E D Y C

Agenda · The Platform · Cross-Platform Compatibility: The Goal · Implementing MDA with e. Agenda · The Platform · Cross-Platform Compatibility: The Goal · Implementing MDA with e. Xecutable UML: - Platform Independent Modeling - Platform Specific Mapping (Design Tagging) - Configurable 100% Code Generation · Benefits derived from using MDA K E N N E D Y C

Software Architecture: l Application Software Interface Software Architecture Software Execution. System Operating Platform Device Software Architecture: l Application Software Interface Software Architecture Software Execution. System Operating Platform Device Drivers Board Support Package / BIT Hardware K E N N E D Y C Low-level software providing the framework within which the Application Software executes l Provides execution control, data / message management, error handling, and various support services to the Application Software l Assumes a particular Application Software language l Unique to the hardware; but, since it must support all requirements levied by the Application Software, is not delivered with the hardware

Cross-Platform Compatibility: The Usual Approach Maintain a constant Application Software Interface Application Software Portable Cross-Platform Compatibility: The Usual Approach Maintain a constant Application Software Interface Application Software Portable Application Software Hold Constant Application Software Interface Software Architecture Device Drivers Operating System Board Support Package / BIT Hardware Platform #1 Hardware K E N Board Support Package / BIT Hardware Platform #2 N E D Y C

Cross-Platform Compatibility: The Goal Application Software Interface Software Architecture Device Drivers Operating System Board Cross-Platform Compatibility: The Goal Application Software Interface Software Architecture Device Drivers Operating System Board Support Package / BIT Hardware Platform K E N N E D Y C The goal should be to provide cross-platform compatibility of Application Software despite any Implementation, or platform specific, changes: that is, changes to the Hardware Platform, the Software Execution Platform, or the Application Software Interface

MDA with e. Xecutable UML: Development Process as supported by KC’s i. UML and MDA with e. Xecutable UML: Development Process as supported by KC’s i. UML and i. CCG Requirements Definition e. Xecutable UML Modeling Platform Specific Mapping (Design Tagging) Application Software Interface Definition K E N N E D Automatic Code Generation Y C Integration & Test

MDA with e. Xecutable UML - What Real Software Engineers Need Construct the system MDA with e. Xecutable UML - What Real Software Engineers Need Construct the system from large, reusable components SPECIFY DOMAINS Identify new/reused domains Establish a welldefined and automated construction process Build precise, predictive models Model system use cases SPECIFY SYSTEM CONSTRUCTION PROCESS BUILD PLATFORM-INDEPENDENT MODELS (PIMS) Define/Buy PIM To PSI Mapping Rules Model domain use cases Build/Buy PIM compiler Build Static Model - Class Diagram Build Dynamic Model - State Charts & Interactions Build Action Model - Operations & State Actions Compile and debug PIMS Subject the models to rigorous testing before implementation To build this GENERATE SYSTEM VALIDATE PIMS Apply PIM to PSI Mapping Rules (Execute PIM Compiler) Execute domain use cases Perform target testing K E N N E D Y C Execute system use cases

e. Xecutable UML Modeling: Domain Model (Package Diagram): The software application space is partitioned e. Xecutable UML Modeling: Domain Model (Package Diagram): The software application space is partitioned into multiple platform independent domain models l Mappings between the domains are defined as contracts for required and provided services l K E N N E D Y C

MDA with x. UML: Class Diagrams: l l K E N N E D MDA with x. UML: Class Diagrams: l l K E N N E D Y C Within each platform independent domain model, conceptual entities are modeled first: classes, attributes, and associations are abstracted Behavior, though considered, is not modeled explicitly in this view

MDA with x. UML: State Charts: l l E N N E D Y MDA with x. UML: State Charts: l l E N N E D Y C Class lifecycles are modeled using signal-driven state machines l K Behavior is formalized during state modeling Class operations are defined

MDA with x. UML: Action Language Action Specification Language: l l N N E MDA with x. UML: Action Language Action Specification Language: l l N N E D Y C ASL deals with UML concepts, not implementation concepts l E ASL is a higher order and much simpler language than a typical high order language (e. g. C++) l K State actions and class operations are specified using Kennedy Carter’s Action Specification Language (ASL) ASL was a major influence on Precise Action Semantics for the UML adopted with UML 1. 5

MDA with x. UML: Testing PIM’s Simulation: l l E N N E D MDA with x. UML: Testing PIM’s Simulation: l l E N N E D Y C Simulation features resemble those of a high order language debugger l K Since a precise Action Specification Language is used, models are executable and therefore may be simulated Models may be validated long before they are implemented

MDA with x. UML: Integrating Models Air Traffic Control System Build Set counterpart association MDA with x. UML: Integrating Models Air Traffic Control System Build Set counterpart association CPR 1 counterpart. Icon = this -> CPR 1 $USE UI [ ] = make. Icon. Flash[ ] on counterpart. Icon $ENDUSE Bridge operation request. Permission To. Taxi Aircraft required operation <> Air Traffic Controller Air Traffic Control Domain K E N N E D Y C <> Client make. Icon Flash Icon provided operation User Interface Domain

MDA with e. Xecutable UML - What Real Software Engineers Need Construct the system MDA with e. Xecutable UML - What Real Software Engineers Need Construct the system from large, reusable components SPECIFY DOMAINS Identify new/reused domains Establish a welldefined and automated construction process Build precise, predictive models Model system use cases SPECIFY SYSTEM CONSTRUCTION PROCESS BUILD PLATFORM-INDEPENDENT MODELS (PIMS) Define/Buy PIM To PSI Mapping Rules Model domain use cases Build/Buy PIM compiler Build Static Model - Class Diagram Build Dynamic Model - State Charts & Interactions Build Action Model - Operations & State Actions Compile and debug PIMS Subject the models to rigorous testing before implementation To build this GENERATE SYSTEM VALIDATE PIMS Apply PIM to PSI Mapping Rules (Execute PIM Compiler) Execute domain use cases Perform target testing K E N N E D Y C Execute system use cases

MDA with x. UML: PIM to PSM Mappings · x. UML Process supports fully MDA with x. UML: PIM to PSM Mappings · x. UML Process supports fully automatic transformation to PSMs · Mapping rules can be specified … (part of) x. UML (part of) Design Metamodel (object-based) (part of) Ada 83 Metamodel Class Package Attribute Private. Datum Body. Variable Signal Public. Method Spec. Subprogram Define Mapping x. UML Metamodel K E N N E D Y C Design Metamodel Define Mapping Implementation Metamodel

MDA with x. UML: Mark-ups Design Tags Class Allocation l Program Allocation l Max MDA with x. UML: Mark-ups Design Tags Class Allocation l Program Allocation l Max Instance Count l Event Rate Software Execution l Event Queue Platform Specific l Throw Away l Initialization l Source Type Language l Subtype of Specific l etc. l x. UML Models . . . Defines Automatic Code Generator Application Software Interface Definition K E N N E D Y C . . . Source Code Files . .

Automatic Code Generation: Simulation Code When we say that “x. UML models are executable” Automatic Code Generation: Simulation Code When we say that “x. UML models are executable” we mean that “executable code can be automatically generated from them” Model of Application Developed by Program Model of x. UML Supplied by Kennedy Carter . . . Code Generation: Generation of Simulation Code for Development Platform (e. g. UNIX C Code) . . Application Elements: (e. g. Aircraft, Missile, Target, etc. ) K E N N E D Y C x. UML Elements: (e. g. Class, Attribute, Association, Tag, etc. ) Step 1: Populate instances of x. UML Metamodel with Model of Application

Automatic Code Generation: Target Code Model of Application Developed by Program Model of x. Automatic Code Generation: Target Code Model of Application Developed by Program Model of x. UML Supplied by Kennedy Carter Model of Platform Developed by Program . . . Code Generation: Generation of Source Code for Target (Embedded) Platform (e. g. Ada/C++ Code) . . . . Application Elements: (e. g. Aircraft, Missile, Target, etc. ) K E N N E D Y Implementation Elements: (e. g. Procedure, Array, Program, Event Queue, etc. ) C x. UML Elements: (e. g. Class, Attribute, Association, Tag, etc. ) Step 1: Populate instances of x. UML Metamodel with Model of Application Step 2: Populate instances of Model of Implementation with populated x. UML Metamodel instances

Automatic Code Generation: The Code Generator Model of Application Developed by Program Model of Automatic Code Generation: The Code Generator Model of Application Developed by Program Model of x. UML Supplied by Kennedy Carter Model of Platform Developed by Program . . . Generated Source Code for Target Platform . . . . Application Elements: (e. g. Aircraft, Missile, Target, etc. ) K E N N E D Y Implementation Elements: (e. g. Procedure, Array, Program, Event Queue, etc. ) C x. UML Elements: (e. g. Class, Attribute, Association, Tag etc. ) The Code Generator includes all implementation-dependent details (those dependent upon the Application Software Interface – specific to the Hardware, the Software Execution Platform, the Implementation Language)

The i. CCG Framework Configurable Code Generator: l l K E N N E The i. CCG Framework Configurable Code Generator: l l K E N N E D Y C Code Generator is developed using the same e. Xecutable MDA strategy Kennedy Carter supplies a set of x. UML models (known as the Configurable Code Generator) that serve as a generic translation framework

MDA with x. UML: PIM-PSM Mapping Rules in ASL · Systematic Mappings are expressed MDA with x. UML: PIM-PSM Mapping Rules in ASL · Systematic Mappings are expressed by Action Language operating on the x. UML (meta)model: has Class name key. Letter R 2 is provided by Mapping Rules in ASL 0. . * {all. Classes} = find-all Class for each. Class in {all. Classes} do $FORMAT code_file class Class[T: each. Class. name] { public: $ENDFORMAT {the. Operations} = each. Class -> R 2 for each. Operation in {the. Operations} do $FORMAT code_file [T: each. Operation. type] [T: each. Operation. name](); $ENDFORMAT endfor $FORMAT code_file private: static char *[T: each. Class. name]; static char *[T: each. Class. key. Letter]; $ENDFORMAT endfor K E N N E D Y C 0. . * Operation Name type C++ Code Archetype class Class { public: (); (); //………. private: static char *class. Name; static char *class. Key. Letter; //……. ; ; ; ; //……. };

Extending i. CCG with a Platform Model Code Generator Development: l l K E Extending i. CCG with a Platform Model Code Generator Development: l l K E N N E D Y C The Configurable Code Generator (i. CCG) may be adapted to the meet the requirements of any Platform Specific Implementation (i. e. of any Application Software Interface) Code Generator and Application Software development may be performed concurrently with the same methods and tools

Configurable Code Generation -Summary {all. Classes} = find-all Class for each. Class in {all. Configurable Code Generation -Summary {all. Classes} = find-all Class for each. Class in {all. Classes} do $FORMAT code_file class Class[T: each. Class. name] { public: $ENDFORMAT {the. Operations} = each. Class -> R 2 for each. Operation in {the. Operations} do $FORMAT code_file [T: each. Operation. type] [T: each. Operation. name](); $ENDFORMAT endfor $FORMAT code_file private: static char *[T: each. Class. name]; static char *[T: each. Class. key. Letter]; $ENDFORMAT endfor Class name key. Letter R 17 number current speed Valve number state Operation Name type i. CCG Provided Metamodels i. CCG Code Generator Project written mappings in ASL Wheel R 2 Project’s code Generate an executable using an existing code generator Project Code Generator Project domain models K E N N E D Y C Can support very sophisticated mappings

Portable Application Software Products The Portable Products e. Xecutable UML Models (and therefore the Portable Application Software Products The Portable Products e. Xecutable UML Models (and therefore the Configured Products to be placed in an Enterprise-Level Software Reuse Library) Program Specific Mapping (Design Tag Values) Automatic Code Generator Source Code K E N N E D Y C Application Software Interface

Advantages of the MDA with x. UML Approach Increased Quality · The majority of Advantages of the MDA with x. UML Approach Increased Quality · The majority of software developers are isolated from implementation details, allowing them to focus on a thorough analysis of the application space · Maintenance of the application source code is eliminated, while maintenance of the x. UML models is ensured · Defect injection (and the resulting rework) is reduced by automating the software phase in which most defects are injected - On a typical program, after Requirements Definition approximately 2/3 of the defects are injected during implementation (coding) K E N N E D Y C

Advantages of the MDA with x. UML Approach Increased Productivity · Rework is reduced Advantages of the MDA with x. UML Approach Increased Productivity · Rework is reduced - Early validation through simulation reduces rework · Increase in e. Xecutable UML modeling span time is more than offset by decrease in Integration & Test span time - Higher quality implementation (due to automation) reduces rework · Software development span time is reduced by automating the implementation phase - Application Software development schedule is reduced by at least 20% - The code generator, not each software developer, performs the majority of implementation-specific design tasks · 40 -60% of physical source code K E N N E D Y C

Advantages of the MDA with x. UML Approach Cross-Platform Compatibility · One Application Software Advantages of the MDA with x. UML Approach Cross-Platform Compatibility · One Application Software x. UML Model database may be reused (as is) on any platform for which a mapping is defined (ie: a code generator is developed) - x. UML models are compatible with any hardware platform, any Software Execution Platform, and any Application Software Interface - x. UML models are compatible with any implementation language The Goal of Cross-Platform Compatibility of Application Software is Attainable with the OMG’s MDA supported by e. Xecutable UML K E N N E D Y C

Further Reading: K E N N E D Y C Further Reading: K E N N E D Y C