42651260073ddafab1b0f8d1fc0b3998.ppt
- Количество слайдов: 24
Model Driven Architecture and e. Xecutable UML Allan Kennedy Founder, Kennedy Carter Ltd Co-chair, OMG Object Reference Model sub-committee www. kc. com KENNEDY CARTER
Agenda: · MDA: Key Themes · The MDA Value Proposition · The MDA Guide and the MDA Reference Model · Supporting MDA with e. Xecutable UML · Model Transformation and Code Generation · Integration with the HLA/RTI KENNEDY CARTER
MDA: Some Key Themes KENNEDY CARTER · 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 (partially) automated transformation · So, MDA promises to be rigorous but lightweight, -> agile modelling
MDA Models are Strategic Long-Life Assets KENNEDY CARTER · “A 20 year, standards-based software architecture” · Wouldn’t it be nice to know that your strategic assets are correct ? · They need to be tested · They need to be executable · UML becomes executable when used with an action language · x. UML models are finished when they execute their acceptance test correctly · x. UML models are validated specifications which offer a strong contractual basis for implementation by external contractors or in-house teams
MDA Models: Integration and Interoperability KENNEDY CARTER · “Integrate what you have built with what you will build” · Models of legacy assets, COTS products and new developments · …are integrated to create platform independent models of entire systems or services. · Models can exist as legacy code or a set of executable interface definitions - UML is not the only suitable formalism · Interoperability is defined at the model level not the middleware level
MDA Models Are Future Proof KENNEDY CARTER · “Tracking the next best thing” · Platform Independence makes models future proof, capable of being ported to faster, better, cheaper platforms as they become available · Standardised mappings for common platforms are built into MDA tools · Specialised mappings to target any platform are specified with configurable model transformation tools. · Automated mappings can guarantee interoperability between systems deployed on different platforms · Automated mappings simplify the creation of a safety argument
Supporting MDA with e. Xecutable UML KENNEDY CARTER · e. Xecutable UML – A precise modelling formalism: - Subset of UML - Action Semantics compliant Action Language - ASL (UML 1. 5) # navigate from this account instance to the owning customer instance owning. Customer = this -> R 1 # unlink this instance from the owning customer via R 1 unlink this R 1 owning. Customer # find the set of all other account instances owned by that customer {other. Owned. Accounts} = owning. Customer -> R 1 # if there are no other owned accounts for this customer, then # send a deletion event to the customer instance if countof {other. Owned. Accounts} = 0 then generate delete. Customer() to owning. Customer endif # delete this instance of account delete this …. the result is a fully executable model
Supporting MDA with e. Xecutable UML KENNEDY CARTER SPECIFY DOMAINS Identify new/reused domains · e. Xecutable UML – A proven development process oriented towards. . . Model system use cases - Executable modelling - Large-scale reuse - Pattern based design FORMALISE ABSTRACT PLATFORM SPECIFIC MODEL Select or develop suitable patterns and mechanisms (Build/Buy x. UML compiler) BUILD PLATFORM INDEPENDENT DOMAIN MODELS Model Domain Use Cases Build Static Model Build Dynamic Models Specify Actions Execute and debug x. UML models PRODUCE TARGET CODE VALIDATE PIMs Apply design patterns to x. UML models (manually or automatically) Execute domain use cases Perform target testing Execute system use cases
MDA with x. UML: Domain Model KENNEDY CARTER 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 © 2001 Lockheed Martin Corporation
MDA with x. UML: Class Diagrams KENNEDY CARTER Class Diagrams: l l © 2001 Lockheed Martin Corporation 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 KENNEDY CARTER State Charts: l l Class lifecycles are modeled using signal-driven state machines l © 2001 Lockheed Martin Corporation Behavior is formalized during state modeling Class operations are defined
MDA with x. UML: Action Language KENNEDY CARTER Action Specification Language: l l ASL is a higher order and much simpler language than a typical high order language (e. g. C++) l ASL deals with UML concepts, not implementation concepts l © 2001 Lockheed Martin Corporation State actions and class operations are specified using the Action Specification Language (ASL) ASL was a major influence on the newly adopted Precise Action Semantics for the UML
MDA with x. UML: Testing and Debugging PIM’s · The i. UML Simulator provides a model execution environment - Single stepping, breakpoints, browsing of run time objects · Can integrate with legacy code · Batch (regression) testing of models KENNEDY CARTER
MDA with x. UML: Integrating Models KENNEDY CARTER 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 <<required interface>> Air Traffic Controller Air Traffic Control Domain <<provided interface>> Client make. Icon Flash Icon provided operation User Interface Domain
MDA with x. UML: PIM to PSM Mappings KENNEDY CARTER · 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 x. UML Metamodel Define Mapping Design Metamodel Define Mapping Implementation Metamodel
MDA with x. UML: Mark-ups KENNEDY CARTER 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 © 2001 Lockheed Martin Corporation . . . Source Code Files . .
The i. CCG Framework KENNEDY CARTER Configurable Code Generator: l l © 2001 Lockheed Martin Corporation 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: Systematic Mappings KENNEDY CARTER · Systematic Mappings can always be expressed by Action Language operating on the (meta) model of x. UML…. has Class name key. Letter Mapping Rules in ASL R 2 is provided by 0. . * Operation Name type C++ Code Pattern class Class<Class. Name> {all. Classes} = find-all Class { for each. Class in {all. Classes} do public: $FORMAT code_file <return. Type 1> <operation. Name 1>(); class Class[T: each. Class. name] <return. Type 2> <operation. Name 2>(); { //………. public: private: $ENDFORMAT static char *class. Name; {the. Operations} = each. Class -> R 2 static char *class. Key. Letter; for each. Operation in {the. Operations} do //……. $FORMAT code_file <attribute 1 Type> <attribute. Name 1>; [T: each. Operation. type] [T: each. Operation. name](); <attribute 2 Type> <attribute. Name 2>; $ENDFORMAT <attribute 3 Type> <attribute. Name 3>; endfor <attribute 4 Type> <attribute. Name 4>; $FORMAT code_file //……. private: }; static char *[T: each. Class. name]; static char *[T: each. Class. key. Letter]; $ENDFORMAT endfor
Extending i. CCG with a Platform Model KENNEDY CARTER Code Generator Development: l l © 2001 Lockheed Martin Corporation 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. 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 number current speed R 17 Operation Name type i. CCG Provided Metamodels i. CCG Code Generator Valve number state R 2 name key. Letter Project written mappings in ASL Wheel KENNEDY CARTER Project’s code Generate an executable using an existing code generator Project Code Generator Project domain models Can support very sophisticated mappings
Supporting MDA with e. Xecutable UML i. UML Product Suite ü Requirements Engineering and Use Case Analysis ü e. Xecutable 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 (i. CCG) ü Uses e. Xecutable UML models to build the code generator KENNEDY CARTER
Projects Using MDA with e. Xecutable UML · · · Lockheed Martin Aeronautics: F 16 MMC (Ada 83, Ada 95) BAE Systems: Stingray torpedo MLU (Ada 95) TRW Automotive: vehicle stability system (efficient C) Siemens Metering: ‘intelligent’ gas meter (C) Thales: Nimrod MR 4 crew trainers (C++) GD Government Systems: ATM Switch for US Army (C) Royal Netherlands Navy: combat systems (C++) Nortel Networks: Passport Voice Gateway (C++) GCHQ: classified distributed application (C, objectstore) UK NHS: patient control of access to medical records (C++) US Do. D: Single Integrated Air Picture (C++, HLA/RTI) BAE Systems: migration of legacy systems to x. UML (Ada 83) KENNEDY CARTER
Questions to Ask Your Tool Vendor KENNEDY CARTER Can I (and if so, how do I)…. . · test my PIMS? · integrate multiple PIMS with each other and with legacy components? · specify my preferred mapping from my PIMS to my particular platform? · generate 100% of my deployable system? In other words: · Are you offering me a genuine MDA solution?
So, What Next? · Take the literature: - Supporting MDA with e. Xecutable UML - Configurable Code Generation in MDA with i. CCG - The ASL Reference Manual · Visit the web-site: - www. kc. com - Download i. UMLite (full product, limited only by model size) - Experiment with MDA and executable models · Questions, Queries? - Email me, allan. kennedy@kc. com · Quotes? - Email sales@kc. com KENNEDY CARTER
42651260073ddafab1b0f8d1fc0b3998.ppt