www.kc.com k e n n e d y c a r t e r model driven architecture and executable uml: the next...

36
www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

Upload: lyndsey-tindle

Post on 02-Apr-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

www.kc.com

K E N N E D Y C A R T E R

Model Driven Architectureand eXecutable UML:

The Next Evolutionary Step?Allan Kennedy

Founder, Kennedy Carter Ltd

Page 2: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA: The Important IdeasMDA: The Important Ideas

Three primary viewpoints for modellingThree primary viewpoints for modelling The Computation Independent Model (CIM)The Computation Independent Model (CIM)

Precise business model, oriented to stakeholders, uncommitted to specific Precise business model, oriented to stakeholders, uncommitted to specific algorithms or system boundary. Also known as a Domain Model. algorithms or system boundary. Also known as a Domain Model.

The Platform Independent Model (PIM)The Platform Independent Model (PIM) Precise, computationally complete (executable), uncommitted to any specific Precise, computationally complete (executable), uncommitted to any specific

platform (portable), oriented to stakeholders (prototyping) and developers (a platform (portable), oriented to stakeholders (prototyping) and developers (a testable specification), a long life asset testable specification), a long life asset

The Platform Specific Model (PSM)The Platform Specific Model (PSM) Precise, complete, conforms to constraints of a specific (class of) platform(s), Precise, complete, conforms to constraints of a specific (class of) platform(s),

probably generated from a PIM, oriented to technology experts probably generated from a PIM, oriented to technology experts Interoperability defined at the model level, not the middleware levelInteroperability defined at the model level, not the middleware level Models are integrated in order to construct complete systemsModels are integrated in order to construct complete systems Models are derived from other models by automated transformationModels are derived from other models by automated transformation So, MDA promises to be So, MDA promises to be rigorousrigorous but but lightweightlightweight, -> , -> agile modellingagile modelling

Page 3: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Real Engineers Use A Rigorous ProcessReal Engineers Use A Rigorous Process

Construct the system from large, reusable components

Build precise,predictive models

Subject the models to rigorous testing before implementationTo build this

Establish a well-defined and automated construction process

Page 4: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Construct the system from large, reusable components

Build precise,predictive models

Subject the models to rigorous testing before implementation

To build this

Establish a well-defined and automated construction process

BUILD PLATFORM-INDEPENDENT MODELS(PIMS)

Model domain use cases

Build Static Model - Class DiagramBuild Dynamic Model - State Charts & Interactions

Build Action Model - Operations & State Actions

Compile and debug PIMS

VALIDATE PIMS

Execute domain use cases

Execute system use cases

SPECIFY SYSTEMCONSTRUCTION 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

MDA with eXecutable UML - What Real Software Engineers NeedMDA with eXecutable UML - What Real Software Engineers Need

SPECIFY DOMAINS

Identify new/reused domains

Model system use cases

Page 5: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Projects Using MDA with eXecutable UML Projects Using MDA with eXecutable UML (and 100% Code Generation)(and 100% Code Generation)

US DoD: Single Integrated Air Picture (C++, HLA/RTI) US DoD: Single Integrated Air Picture (C++, HLA/RTI) Lockheed Martin Aeronautics: F16 MMC (Ada 83, Ada 95)Lockheed Martin Aeronautics: F16 MMC (Ada 83, Ada 95) BAE Systems: Stingray torpedo MLU (Ada 95)BAE Systems: Stingray torpedo MLU (Ada 95) Thales: Nimrod MR4 crew trainers (C++)Thales: Nimrod MR4 crew trainers (C++) GD Government Systems: ATM Switch for US Army (C)GD Government Systems: ATM Switch for US Army (C) Royal Netherlands Navy: combat systems (C++) Royal Netherlands Navy: combat systems (C++) GCHQ: classified distributed application (C, objectstore)GCHQ: classified distributed application (C, objectstore) BAE Systems: Management of obsolescence (Structured Analysis, Ada)BAE Systems: Management of obsolescence (Structured Analysis, Ada) TRW Automotive: vehicle stability system (efficient C)TRW Automotive: vehicle stability system (efficient C) Siemens Metering: ‘intelligent’ gas meter (C)Siemens Metering: ‘intelligent’ gas meter (C) Nortel Networks: Passport Voice Gateway (C++)Nortel Networks: Passport Voice Gateway (C++) UK NHS: ebookings, patient control of access to medical records (C++)UK NHS: ebookings, patient control of access to medical records (C++)

Page 6: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

But Why MDA?But Why MDA?

The usual reasons - The usual reasons - Faster, Better, CheaperFaster, Better, Cheaper

Faster better cheaperFaster better cheaper development processes that result in… development processes that result in…

……systems that can be ported readily to systems that can be ported readily to faster better cheaperfaster better cheaper platforms platforms as they become establishedas they become established

Page 7: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA is about formalising your knowledge and expertise MDA is about formalising your knowledge and expertise

Whatever development method you follow, system development exposes and/or Whatever development method you follow, system development exposes and/or generates a considerable quantity of knowledge about the actual and planned generates a considerable quantity of knowledge about the actual and planned architecture (at all levels) of a system or system of systemsarchitecture (at all levels) of a system or system of systems

MDA promises to provide a set of languages for formalising that knowledge as MDA promises to provide a set of languages for formalising that knowledge as stakeholder-friendly models that can be verified for correctness…stakeholder-friendly models that can be verified for correctness… End-User knowledge about the enterpriseEnd-User knowledge about the enterprise Systems and IT knowledge about platformsSystems and IT knowledge about platforms Programmer knowledge about best development practiceProgrammer knowledge about best development practice

……and that can be leveraged to automate the production of downstream and that can be leveraged to automate the production of downstream deliverables.deliverables.

If, additionally, the models are PIM’s, then they have the potential to be If, additionally, the models are PIM’s, then they have the potential to be strategic long life assets.strategic long life assets.

Page 8: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

Lockheed Martin Aeronautics Company© 2001 Lockheed Martin Corporation

F-16 Modular Mission ComputerF-16 Modular Mission ComputerApplication SoftwareApplication Software

Model Driven Architecture and Executable UML:Model Driven Architecture and Executable UML:The Lockheed Martin ExperienceThe Lockheed Martin Experience

Lauren E. ClarkLauren E. ClarkChief EngineerChief EngineerF-16 Modular Mission Computer SoftwareF-16 Modular Mission Computer SoftwareLockheed Martin Aeronautics CompanyLockheed Martin Aeronautics Company

Terry RuthruffTerry RuthruffStaff SpecialistStaff SpecialistSoftware Engineering CoreSoftware Engineering CoreLockheed Martin Aeronautics CompanyLockheed Martin Aeronautics Company

Allan KennedyAllan KennedyManaging DirectorManaging DirectorKennedy Carter LimitedKennedy Carter Limited

Bary D. HoganBary D. HoganMethodology LeadMethodology LeadF-16 Modular Mission Computer SoftwareF-16 Modular Mission Computer SoftwareLockheed Martin Aeronautics CompanyLockheed Martin Aeronautics Company

Page 9: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

F16 MMC BackgroundF16 MMC Background

F-16 originally designed as a lightweight air superiority fighterF-16 originally designed as a lightweight air superiority fighter Jointly built by Belgium, Denmark, Netherlands, Norway, USJointly built by Belgium, Denmark, Netherlands, Norway, US

First F-16A flew Dec 76, first operational Jan 1979First F-16A flew Dec 76, first operational Jan 1979 More than 4,000 F-16s manufactured to dateMore than 4,000 F-16s manufactured to date

Modular Mission Computer (MMC) in post-July 1996 aircraftModular Mission Computer (MMC) in post-July 1996 aircraft Also to be retrofitted to 1,000 earlier aircraftAlso to be retrofitted to 1,000 earlier aircraft Replaces computers for Fire Control, Head-up display, Stores Replaces computers for Fire Control, Head-up display, Stores

managementmanagement Multiple MIPS R3000 64-bit CPUs, 60 MB memory, 155 MIPsMultiple MIPS R3000 64-bit CPUs, 60 MB memory, 155 MIPs 30x throughput & memory at 60% weight, volume & power30x throughput & memory at 60% weight, volume & power

Page 10: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

AgendaAgenda

The PlatformThe Platform

Cross-Platform Compatibility: The GoalCross-Platform Compatibility: The Goal

Implementing MDA with eXecutable UML:Implementing MDA with eXecutable UML: Platform Independent ModelingPlatform Independent Modeling Platform Specific Mapping (Design Tagging)Platform Specific Mapping (Design Tagging) Configurable 100% Code GenerationConfigurable 100% Code Generation

Benefits derived from using MDABenefits derived from using MDA

Page 11: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Software ExecutionPlatformDevice Drivers Operating System

Software Architecture

Software ArchitectureSoftware Architecture

HardwareHardware

Application Software

Application Software Interface

Software Architecture:

Low-level software providing the framework within which the Application Software executes

Provides execution control, data / message management, error handling, and various support services to the Application Software

Assumes a particular Application Software language

Unique to the hardware; but, since it must support all requirements levied by the Application Software, is not delivered with the hardware

Software Architecture:

Low-level software providing the framework within which the Application Software executes

Provides execution control, data / message management, error handling, and various support services to the Application Software

Assumes a particular Application Software language

Unique to the hardware; but, since it must support all requirements levied by the Application Software, is not delivered with the hardwareBoard Support Package / BIT

Software ArchitectureSoftware Architecture

Page 12: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Hardware Platform #2Hardware Platform #2

Application Software

Board Support Package / BITBoard Support Package / BIT

Device DriversDevice Drivers Operating SystemOperating System

Software ArchitectureSoftware Architecture

Application Software Interface

HoldConstant

HardwareHardware

Cross-Platform Compatibility: The Usual ApproachCross-Platform Compatibility: The Usual Approach

Hardware Platform #1Hardware Platform #1

Application Software

Application Software Interface

Device Drivers Operating System

Software Architecture

Board Support Package / BIT

Maintain a constant Application Software InterfaceMaintain a constant Application Software Interface

Portable

Page 13: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Hardware PlatformHardware Platform

Cross-Platform Compatibility: The GoalCross-Platform Compatibility: The Goal

Application Software

Device DriversDevice Drivers Operating SystemOperating System

Software ArchitectureSoftware Architecture

Application Software Interface

Board Support Package / BITBoard Support Package / BIT

The goalThe goalshould be to provideshould be to provide

cross-platform compatibilitycross-platform compatibilityof Application Softwareof Application Software

despite despite anyanyImplementation,Implementation,

or platform specific, changesor platform specific, changes::

that is, changes tothat is, changes tothe Hardware Platform,the Hardware Platform,

the Software Execution Platform,the Software Execution Platform,or theor the

Application Software InterfaceApplication Software Interface

Page 14: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with eXecutable UML: Development ProcessMDA with eXecutable UML: Development Process

eXecutable UMLeXecutable UMLModelingModeling

RequirementsRequirementsDefinitionDefinition

IntegrationIntegration& Test& Test

Platform SpecificPlatform SpecificMappingMapping

(Design Tagging)(Design Tagging)

AutomaticCode Generation

ApplicationSoftwareInterfaceDefinition

as supported byas supported byKC’s iUML and iCCGKC’s iUML and iCCG

Page 15: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Construct the system from large, reusable components

Build precise,predictive models

Subject the models to rigorous testing before implementation

To build this

Establish a well-defined and automated construction process

BUILD PLATFORM-INDEPENDENT MODELS(PIMS)

Model domain use cases

Build Static Model - Class DiagramBuild Dynamic Model - State Charts & Interactions

Build Action Model - Operations & State Actions

Compile and debug PIMS

VALIDATE PIMS

Execute domain use cases

Execute system use cases

SPECIFY SYSTEMCONSTRUCTION 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

MDA with eXecutable UML - What Real Software Engineers NeedMDA with eXecutable UML - What Real Software Engineers Need

SPECIFY DOMAINS

Identify new/reused domains

Model system use cases

Page 16: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

eXecutable UML Modeling: Domain ModeleXecutable UML Modeling: Domain Model

Domain Model(Package Diagram):

The software application space is partitioned into multiple platform independent domain models Mappings between the domains are defined as contracts for required and provided services

Domain Model(Package Diagram):

The software application space is partitioned into multiple platform independent domain models Mappings between the domains are defined as contracts for required and provided services

Page 17: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: Class DiagramsMDA with xUML: Class Diagrams

Class Diagrams:

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

Class Diagrams:

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

Page 18: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: State ChartsMDA with xUML: State Charts

State Charts:

Behavior is formalized during state modeling

Class lifecycles are modeled using signal-driven state machines

Class operations are defined

State Charts:

Behavior is formalized during state modeling

Class lifecycles are modeled using signal-driven state machines

Class operations are defined

Page 19: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: Action LanguageMDA with xUML: Action Language

Action Specification Language:

State actions and class operations are specified using Kennedy Carter’s Action Specification Language (ASL)

ASL is a higher order and much simpler language than a typical high order language (e.g. C++)

ASL deals with UML concepts, not implementation concepts

ASL was a major influence on Precise Action Semantics for the UML adopted with UML 1.5

Action Specification Language:

State actions and class operations are specified using Kennedy Carter’s Action Specification Language (ASL)

ASL is a higher order and much simpler language than a typical high order language (e.g. C++)

ASL deals with UML concepts, not implementation concepts

ASL was a major influence on Precise Action Semantics for the UML adopted with UML 1.5

Page 20: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: Testing PIM’sMDA with xUML: Testing PIM’s

Simulation:

Since a precise Action Specification Language is used, models are executable and therefore may be simulated

Simulation features resemble those of a high order language debugger

Models may be validated long before they are implemented

Simulation:

Since a precise Action Specification Language is used, models are executable and therefore may be simulated

Simulation features resemble those of a high order language debugger

Models may be validated long before they are implemented

Page 21: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: Integrating ModelsMDA with xUML: Integrating Models

Air Traffic Control System Build Set

counterpartIcon = this -> CPR1$USE UI [ ] = makeIconFlash[ ] on counterpartIcon$ENDUSE

CPR1

Bridge operation

counterpart association

Air Traffic Control Domain

<<required interface>>

Air Traffic Controller

Aircraft

requestPermissionToTaxi

requiredoperation

User Interface Domain

Icon<<provided interface>>

Client

makeIconFlash

providedoperation

Page 22: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Construct the system from large, reusable components

Build precise,predictive models

Subject the models to rigorous testing before implementation

To build this

Establish a well-defined and automated construction process

BUILD PLATFORM-INDEPENDENT MODELS(PIMS)

Model domain use cases

Build Static Model - Class DiagramBuild Dynamic Model - State Charts & Interactions

Build Action Model - Operations & State Actions

Compile and debug PIMS

VALIDATE PIMS

Execute domain use cases

Execute system use cases

SPECIFY SYSTEMCONSTRUCTION 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

MDA with eXecutable UML - What Real Software Engineers NeedMDA with eXecutable UML - What Real Software Engineers Need

SPECIFY DOMAINS

Identify new/reused domains

Model system use cases

Page 23: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: PIM to PSM MappingsMDA with xUML: PIM to PSM Mappings

xUML Process supports fully automatic transformation to PSMsxUML Process supports fully automatic transformation to PSMs Mapping rules can be specified …Mapping rules can be specified …

(part of)xUML

Class

Attribute

Signal

DesignMetamodel

DesignMetamodel

ImplementationMetamodel

ImplementationMetamodel

DefineMapping

xUMLMetamodel

xUMLMetamodel

DefineMapping

(part of)Design Metamodel

(object-based)

Class

PrivateDatum

PublicMethod

(part of) Ada 83 Metamodel

Package

BodyVariable

SpecSubprogram

Page 24: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Design Tags

Class Allocation Program Allocation Max Instance Count Event Rate Event Queue Throw Away Initialization Source Type Subtype of etc.

Design Tags

Class Allocation Program Allocation Max Instance Count Event Rate Event Queue Throw Away Initialization Source Type Subtype of etc.

MDA with xUML: Mark-upsMDA with xUML: Mark-ups

Source Code Files

...

...

......Automatic

Code Generator

xUML Models

...

...

Application Software Interface Definition

Software ExecutionPlatform Specific

Software ExecutionPlatform Specific

LanguageSpecific

LanguageSpecific

Defines

Page 25: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Modelof

xUML

...

...xUML Elements:(e.g. Class, Attribute,

Association,Tag, etc.)

xUML Elements:(e.g. Class, Attribute,

Association,Tag, etc.)

Supplied byKennedy

Carter

Supplied byKennedy

Carter

Automatic Code Generation: Simulation CodeAutomatic Code Generation: Simulation Code

Step 1:Step 1: Populate instances Populate instancesof of xUML MetamodelxUML Metamodel with with

Model of ApplicationModel of Application

Code Generation:Code Generation:Generation ofGeneration of

Simulation CodeSimulation Codefor Developmentfor Development

PlatformPlatform(e.g. UNIX C Code)(e.g. UNIX C Code)

Modelof

Application

...

...ApplicationElements:

(e.g. Aircraft, Missile,Target, etc.)

ApplicationElements:

(e.g. Aircraft, Missile,Target, etc.)

Developedby

Program

Developedby

Program

When we say that “xUML models are executable” we mean that“executable code can be automatically generated from them”

Page 26: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Modelof

Platform

...

...ImplementationElements:

(e.g. Procedure, Array,Program, Event

Queue, etc.)

ImplementationElements:

(e.g. Procedure, Array,Program, Event

Queue, etc.)

Developedby

Program

Developedby

Program

Modelof

xUML

...

...xUML Elements:(e.g. Class, Attribute,

Association,Tag, etc.)

xUML Elements:(e.g. Class, Attribute,

Association,Tag, etc.)

Supplied byKennedy

Carter

Supplied byKennedy

Carter

Automatic Code Generation: Target CodeAutomatic Code Generation: Target Code

Step 1:Step 1: Populate instances Populate instancesof of xUML MetamodelxUML Metamodel with with

Model of ApplicationModel of Application

Modelof

Application

...

...ApplicationElements:

(e.g. Aircraft, Missile,Target, etc.)

ApplicationElements:

(e.g. Aircraft, Missile,Target, etc.)

Developedby

Program

Developedby

Program

Step 2:Step 2: Populate instances Populate instancesof of Model of ImplementationModel of Implementation

with with populated xUMLpopulated xUMLMetamodel instancesMetamodel instances

Code Generation:Code Generation:Generation ofGeneration ofSource CodeSource Code

for Targetfor Target(Embedded)(Embedded)

PlatformPlatform(e.g. Ada/C++ Code)(e.g. Ada/C++ Code)

Page 27: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

The Code GeneratorThe Code Generator

Modelof

Platform

...

...ImplementationElements:

(e.g. Procedure, Array,Program, Event

Queue, etc.)

ImplementationElements:

(e.g. Procedure, Array,Program, Event

Queue, etc.)

Developedby

Program

Developedby

Program

Modelof

xUML

...

...xUML Elements:(e.g. Class, Attribute,

Association,Tag etc.)

xUML Elements:(e.g. Class, Attribute,

Association,Tag etc.)

Supplied byKennedy

Carter

Supplied byKennedy

Carter

Automatic Code Generation: The Code GeneratorAutomatic Code Generation: The Code Generator

Modelof

Application

...

...ApplicationElements:

(e.g. Aircraft, Missile,Target, etc.)

ApplicationElements:

(e.g. Aircraft, Missile,Target, etc.)

Developedby

Program

Developedby

Program

GeneratedGeneratedSource CodeSource Code

for Targetfor TargetPlatformPlatform

The Code Generator includes all implementation-dependent detailsThe Code Generator includes all implementation-dependent details(those dependent upon the Application Software Interface – specific to the (those dependent upon the Application Software Interface – specific to the Hardware, the Software Execution Platform, the Implementation Language)Hardware, the Software Execution Platform, the Implementation Language)

Page 28: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

The iCCG FrameworkThe iCCG Framework

Configurable Code Generator:

Code Generator is developed using the same eXecutable MDA strategy

Kennedy Carter supplies a set of xUML models (known as the Configurable Code Generator) that serve as a generic translation framework

Configurable Code Generator:

Code Generator is developed using the same eXecutable MDA strategy

Kennedy Carter supplies a set of xUML models (known as the Configurable Code Generator) that serve as a generic translation framework

Page 29: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

MDA with xUML: PIM-PSM Mapping Rules in ASLMDA with xUML: PIM-PSM Mapping Rules in ASL

Systematic Mappings are expressed by Action Language operating Systematic Mappings are expressed by Action Language operating on the xUML (meta)model:on the xUML (meta)model:

Mapping Rules in ASL

{allClasses} = find-all Classfor eachClass in {allClasses} do $FORMAT code_file class Class[T:eachClass.name] { public: $ENDFORMAT {theOperations} = eachClass -> R2 for eachOperation in {theOperations} do $FORMAT code_file [T:eachOperation.type] [T:eachOperation.name](); $ENDFORMAT endfor $FORMAT code_file private: static char *[T:eachClass.name]; static char *[T:eachClass.keyLetter]; $ENDFORMATendfor

C++ Code Archetype

class Class<ClassName> { public: <returnType1> <operationName1>(); <returnType2> <operationName2>(); //………. private: static char *className; static char *classKeyLetter; //……. <attribute1Type> <attributeName1>; <attribute2Type> <attributeName2>; <attribute3Type> <attributeName3>; <attribute4Type> <attributeName4>; //…….};

is provided by

0..*

Class

namekeyLetter

Operation

Nametype

has

0..*R2

Page 30: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Extending iCCG with a Platform ModelExtending iCCG with a Platform Model

Code Generator Development:

The Configurable Code Generator (iCCG) 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 develop- ment may be performed concurrently with the same methods and tools

Code Generator Development:

The Configurable Code Generator (iCCG) 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 develop- ment may be performed concurrently with the same methods and tools

Page 31: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Configurable Code Generation -SummaryConfigurable Code Generation -Summary

iCCG Code

Generator

Class

namekeyLetter

Operation

Nametype

R2

iCCG Provided Metamodels

Wheel

numbercurrent speed

Valve

numberstate

R17

Project domain models

Project’s code

{allClasses} = find-all Classfor eachClass in {allClasses} do $FORMAT code_file class Class[T:eachClass.name] { public: $ENDFORMAT {theOperations} = eachClass -> R2 for eachOperation in {theOperations} do $FORMAT code_file [T:eachOperation.type] [T:eachOperation.name](); $ENDFORMAT endfor $FORMAT code_file private: static char *[T:eachClass.name]; static char *[T:eachClass.keyLetter]; $ENDFORMATendfor

Project written mappings in ASL

Can support very sophisticated mappings

Project Code

Generator

Generate an executable using an existing code

generator

Page 32: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Automatic Code Generator

Portable Application Software ProductsPortable Application Software Products

Source CodeSource Code

ApplicationSoftwareInterface

eXecutable UMLeXecutable UMLModelsModels

Program SpecificProgram SpecificMappingMapping

(Design Tag Values)(Design Tag Values)

Automatic Code Generator

Program SpecificProgram SpecificMappingMapping

(Design Tag Values)(Design Tag Values)

Source CodeSource Code

ApplicationSoftwareInterface

eXecutable UMLeXecutable UMLModelsModels

The Portable ProductsThe Portable Products(and therefore the Configured Products(and therefore the Configured Productsto be placed in an Enterprise-Level to be placed in an Enterprise-Level Software Reuse Library)Software Reuse Library)

Page 33: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Advantages of the MDA with xUML ApproachAdvantages of the MDA with xUML Approach

The majority of software developers are The majority of software developers are isolated from implementation details, allowing isolated from implementation details, allowing them to focus on a thorough analysis of the them to focus on a thorough analysis of the application spaceapplication space

Maintenance of the application source code is Maintenance of the application source code is eliminated, while maintenance of the xUML eliminated, while maintenance of the xUML models is ensuredmodels is ensured

Defect injection (and the resulting rework) is Defect injection (and the resulting rework) is reduced by automating the software phase in reduced by automating the software phase in which most defects are injectedwhich most defects are injected On a typical program, after Requirements On a typical program, after Requirements

Definition approximately 2/3 of the defects Definition approximately 2/3 of the defects are injected during implementation (coding)are injected during implementation (coding)

Increased QualityIncreased Quality

Page 34: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Advantages of the MDA with xUML ApproachAdvantages of the MDA with xUML Approach

Rework is reducedRework is reduced Early validation through simulation reduces Early validation through simulation reduces

reworkrework Increase in eXecutable UML modeling span Increase in eXecutable UML modeling span

time is more than offset by decrease in time is more than offset by decrease in Integration & Test span timeIntegration & Test span time

Higher quality implementation (due to Higher quality implementation (due to automation) reduces reworkautomation) reduces rework

Software development span time is reduced by Software development span time is reduced by automating the implementation phaseautomating the implementation phase Application Software development schedule Application Software development schedule

is reduced by at least 20%is reduced by at least 20% The code generator, not each software The code generator, not each software

developer, performs the majority of developer, performs the majority of implementation-specific design tasksimplementation-specific design tasks 40-60% of physical source code40-60% of physical source code

Increased ProductivityIncreased Productivity

Page 35: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Advantages of the MDA with xUML ApproachAdvantages of the MDA with xUML Approach

One Application Software xUML Model One Application Software xUML Model database may be reused (as is) on any platform database may be reused (as is) on any platform for which a mapping is defined (ie: a code for which a mapping is defined (ie: a code generator is developed)generator is developed) xUML models are compatible with any xUML models are compatible with any

hardware platform, any Software Execution hardware platform, any Software Execution Platform, and any Application Software Platform, and any Application Software InterfaceInterface

xUML models are compatible with any xUML models are compatible with any implementation languageimplementation language

Cross-Platform CompatibilityCross-Platform Compatibility

The Goal of Cross-Platform Compatibility of Application SoftwareThe Goal of Cross-Platform Compatibility of Application Softwareis Attainable with the OMG’s MDA supported by eXecutable UMLis Attainable with the OMG’s MDA supported by eXecutable UML

The Goal of Cross-Platform Compatibility of Application SoftwareThe Goal of Cross-Platform Compatibility of Application Softwareis Attainable with the OMG’s MDA supported by eXecutable UMLis Attainable with the OMG’s MDA supported by eXecutable UML

Page 36: Www.kc.com K E N N E D Y C A R T E R Model Driven Architecture and eXecutable UML: The Next Evolutionary Step? Allan Kennedy Founder, Kennedy Carter Ltd

K E N N E D Y C A R T E R

Further Reading:Further Reading:

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.