View
213
Download
0
Category
Tags:
Preview:
Citation preview
www.kc.com
K E N N E D Y C A R T E R
Model Driven Architectureand eXecutable UML
Allan KennedyFounder, Kennedy Carter Ltd
Co-chair, OMG Object Reference Model sub-committee
K E N N E D Y C A R T E RAgenda:Agenda:
MDA: Key ThemesMDA: Key Themes
The MDA Value PropositionThe MDA Value Proposition
The MDA Guide and the MDA Reference ModelThe MDA Guide and the MDA Reference Model
Supporting MDA with eXecutable UMLSupporting MDA with eXecutable UML
Model Transformation and Code GenerationModel Transformation and Code Generation
Integration with the HLA/RTIIntegration with the HLA/RTI
K E N N E D Y C A R T E RMDA: Some Key ThemesMDA: Some Key Themes
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 algorithms or Precise business model, oriented to stakeholders, uncommitted to specific algorithms or system boundary. Also known as a Domain Model. 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 platform Precise, computationally complete (executable), uncommitted to any specific platform
(portable), oriented to stakeholders (prototyping) and developers (a testable specification), (portable), oriented to stakeholders (prototyping) and developers (a testable specification), a long life asset 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), probably Precise, complete, conforms to constraints of a specific (class of) platform(s), probably
generated from a PIM, oriented to technology experts 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 (partially) automated transformationModels are derived from other models by (partially) automated transformation So, MDA promises to be rigorous but lightweight, -> agile modellingSo, MDA promises to be rigorous but lightweight, -> agile modelling
K E N N E D Y C A R T E RMDA Models are Strategic Long-Life AssetsMDA Models are Strategic Long-Life Assets
““A 20 year, standards-based software architecture”A 20 year, standards-based software architecture”
Wouldn’t it be nice to know that your strategic assets are correct ?Wouldn’t it be nice to know that your strategic assets are correct ?
They need to be testedThey need to be tested
They need to be executableThey need to be executable
UML becomes executable when used with an action languageUML becomes executable when used with an action language
xUML models are finished when they execute their acceptance test correctlyxUML models are finished when they execute their acceptance test correctly
xUML models are validated specifications which offer a strong contractual basis for xUML models are validated specifications which offer a strong contractual basis for implementation by external contractors or in-house teamsimplementation by external contractors or in-house teams
K E N N E D Y C A R T E RMDA Models: Integration and InteroperabilityMDA Models: Integration and Interoperability
““Integrate what you have built with what you will build”Integrate what you have built with what you will build”
Models of legacy assets, COTS products and new developmentsModels of legacy assets, COTS products and new developments
……are integrated to create platform independent models of entire systems or are integrated to create platform independent models of entire systems or services.services.
Models can exist as legacy code or a set of executable interface definitions - UML is Models can exist as legacy code or a set of executable interface definitions - UML is not the only suitable formalismnot the only suitable formalism
Interoperability is defined at the model level not the middleware levelInteroperability is defined at the model level not the middleware level
K E N N E D Y C A R T E RMDA Models Are Future ProofMDA Models Are Future Proof
““Tracking the next best thing”Tracking the next best thing”
Platform Independence makes models future proof, capable of being ported to faster, Platform Independence makes models future proof, capable of being ported to faster, better, cheaper platforms as they become availablebetter, cheaper platforms as they become available
Standardised mappings for common platforms are built into MDA toolsStandardised mappings for common platforms are built into MDA tools
Specialised mappings to target any platform are specified with configurable model Specialised mappings to target any platform are specified with configurable model transformation tools.transformation tools.
Automated mappings can guarantee interoperability between systems deployed on Automated mappings can guarantee interoperability between systems deployed on different platformsdifferent platforms
Automated mappings simplify the creation of a safety argument Automated mappings simplify the creation of a safety argument
K E N N E D Y C A R T E RSupporting MDA with eXecutable UMLSupporting MDA with eXecutable UML
eXecutable UML – A precise modelling formalism:eXecutable UML – A precise modelling formalism: Subset of UMLSubset of UML Action Semantics compliant Action Language - ASL (UML 1.5)Action Semantics compliant Action Language - ASL (UML 1.5)
# navigate from this account instance to the owning customer instanceowningCustomer = this -> R1# unlink this instance from the owning customer via R1unlink this R1 owningCustomer# find the set of all other account instances owned by that customer{otherOwnedAccounts} = owningCustomer -> R1# if there are no other owned accounts for this customer, then# send a deletion event to the customer instanceif countof {otherOwnedAccounts} = 0 then generate deleteCustomer() to owningCustomerendif# delete this instance of accountdelete this
….the result is a fully executable model
K E N N E D Y C A R T E RSupporting MDA with eXecutable UMLSupporting MDA with eXecutable UML
eXecutable UML – A proven eXecutable UML – A proven development process oriented development process oriented towards...towards... Executable modellingExecutable modelling Large-scale reuseLarge-scale reuse Pattern based designPattern based design
SPECIFY DOMAINS
Identify new/reused domains
Model system use cases
VALIDATE PIMs
Execute domain use cases
Execute system use cases
BUILD PLATFORMINDEPENDENT
DOMAIN MODELS
Model Domain Use CasesBuild Static Model
Build Dynamic ModelsSpecify Actions
Execute and debug xUML models
FORMALISE ABSTRACT PLATFORM SPECIFIC MODEL
Select or develop suitable patterns and mechanisms
(Build/Buy xUML compiler)
PRODUCE TARGET CODE
Apply design patterns to xUML models(manually or automatically)
Perform target testing
K E N N E D Y C A R T E RMDA with xUML: Domain ModelMDA with xUML: 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
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RMDA 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
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RMDA 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
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RMDA with xUML: Action LanguageMDA with xUML: Action Language
Action Specification Language:
State actions and class operations are specified using the 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 the newly adopted Precise Action Semantics for the UML
Action Specification Language:
State actions and class operations are specified using the 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 the newly adopted Precise Action Semantics for the UML
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RMDA with xUML: Testing and Debugging PIM’sMDA with xUML: Testing and Debugging PIM’s
The iUML Simulator provides a model execution environmentThe iUML Simulator provides a model execution environment Single stepping, breakpoints, browsing of run time objectsSingle stepping, breakpoints, browsing of run time objects
Can integrate with legacy codeCan integrate with legacy code Batch (regression) testing of modelsBatch (regression) testing of models
K E N N E D Y C A R T E RMDA 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
K E N N E D Y C A R T E RMDA 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
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
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RThe 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
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RMDA with xUML: Systematic MappingsMDA with xUML: Systematic Mappings
Systematic Mappings can always be expressed by Action Language Systematic Mappings can always be expressed by Action Language operating on the (meta) model of xUML….operating on the (meta) model of xUML….
is provided by
0..*
Class
namekeyLetter
Operation
Nametype
has
0..*R2
class Class<ClassName> { public: <returnType1> <operationName1>(); <returnType2> <operationName2>(); //………. private: static char *className; static char *classKeyLetter; //……. <attribute1Type> <attributeName1>; <attribute2Type> <attributeName2>; <attribute3Type> <attributeName3>; <attribute4Type> <attributeName4>; //…….};
C++ Code Pattern
{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
Mapping Rules in ASL
K E N N E D Y C A R T E RExtending 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
© 2001 Lockheed Martin Corporation
K E N N E D Y C A R T E RConfigurable 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
K E N N E D Y C A R T E RSupporting MDA with eXecutable UMLSupporting MDA with eXecutable UML
iUML Product Suite Requirements Engineering and Use Case Analysis
eXecutable UML Modelling
Model Simulation and Testing
Built-in Configuration Management
Scalable Multi-user Repository
Off-the-shelf Code Generation
TA-5 C++ Single Task
TA-5/HLA C++ targeting the HLA/RTI
TA-6 very efficient embedded C
Fully Configurable Code Generation (iCCG)
Uses eXecutable UML models to build the code
generator
K E N N E D Y C A R T E RProjects Using MDA with eXecutable UMLProjects Using MDA with eXecutable UML
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) 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) 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++) Nortel Networks: Passport Voice Gateway (C++)Nortel Networks: Passport Voice Gateway (C++) GCHQ: classified distributed application (C, objectstore)GCHQ: classified distributed application (C, objectstore) UK NHS: patient control of access to medical records (C++)UK NHS: patient control of access to medical records (C++) US DoD: Single Integrated Air Picture (C++, HLA/RTI)US DoD: Single Integrated Air Picture (C++, HLA/RTI) BAE Systems: migration of legacy systems to xUML (Ada 83)BAE Systems: migration of legacy systems to xUML (Ada 83)
K E N N E D Y C A R T E RQuestions to Ask Your Tool VendorQuestions to Ask Your Tool Vendor
test my PIMS?test my PIMS?
integrate multiple PIMS with each other and with legacy components?integrate multiple PIMS with each other and with legacy components?
specify my preferred mapping from my PIMS to my particular platform?specify my preferred mapping from my PIMS to my particular platform?
generate 100% of my deployable system?generate 100% of my deployable system?
In other words:In other words:
Are you offering me a genuine MDA solution?Are you offering me a genuine MDA solution?
Can I (and if so, how do I)…..Can I (and if so, how do I)…..
K E N N E D Y C A R T E RSo, What Next?So, What Next?
Take the literature:Take the literature: Supporting MDA with eXecutable UMLSupporting MDA with eXecutable UML Configurable Code Generation in MDA with iCCGConfigurable Code Generation in MDA with iCCG The ASL Reference ManualThe ASL Reference Manual
Visit the web-site:Visit the web-site: www.kc.comwww.kc.com Download iUMLite (full product, limited only by model size)Download iUMLite (full product, limited only by model size) Experiment with MDA and executable modelsExperiment with MDA and executable models
Questions, Queries?Questions, Queries? Email me, Email me, allan.kennedy@kc.comallan.kennedy@kc.com
Quotes?Quotes? Email Email sales@kc.comsales@kc.com
Recommended