An Overview of UML 2.0 (And MDA)

An Overview of UML 2.0 (And MDA)

® IBM Software Group An Overview of UML 2.0 (and MDA) Bran Selic [email protected] IMPORTANT DISCLAIMER! The technical material described here is still under development and is subject to modification prior to full adoption by the Object Management Group 2 IBM Software Group | 1 Tutorial Objectives 1. To introduce the major new features of UML 2.0 2. To explain the design intent and rationale behind UML 2.0 3. To describe the essence of model-driven development (as realized with UML 2.0) 3 IBM Software Group | Tutorial Overview Introduction: Modeling and Dynamic Semantics Software Interaction Modeling Model-Driven Development Capabilities A Critique of UML 1.x Activities and Actions Requirements for UML 2.0 State Machine Innovations Foundations of UML 2.0 Other New Features Architectural Modeling Summary and Conclusion Capabilities 4 IBM Software Group | 2 A Skeptic’s View of Software Models… PH reached X start Monitor Control ble Current PH PH ena PH ble stop disa Raise PH Input valve control “…bubbles and arrows, as opposed to programs, …never crash” -- B. Meyer “UML: The Positive Spin” American Programmer, 1997 5 IBM Software Group | The Problem with Bubbles… PH reached X start Monitor Control ble Current PH PH ena PH ble stop disa Raise PH Input valve control ? main () { BitVector typeFlags (maxBits); char buf [1024]; cout << msg; while (cin >> buf) { if ... 6 IBM Software Group | 3 Models in Traditional Engineering As old as engineering (e.g., Vitruvius) Traditional means of reducing engineering risk 7 IBM Software Group | What Engineers Do Before they build the real thing... …they first build models…and then learn from them ➼ 8 IBM Software Group | 4 Engineering Models Engineering model: A reduced representation of some system that is easier to understand than the actual system Modeled system Model 9 IBM Software Group | Characteristics of Useful Models Abstract Emphasize important aspects while removing irrelevant ones Understandable Expressed in a form that is readily understood by observers Accurate Faithfully represents the modeled system Predictive Can be used to derive correct conclusions about the modeled system Inexpensive Much cheaper to construct and study than the modeled system To be useful, engineering models must satisfy all of these characteristics! 10 IBM Software Group | 5 How Models are Used To detect errors and omissions and to determine key tradeoffs in complex designs before committing full resources to realization Through (formal) analysis and experimentation Investigate and compare alternative solutions Minimize engineering risk To communicate with stakeholders Clients, users, implementers, testers, documenters, etc. To drive implementation 11 IBM Software Group | A Problem with Models Semantic Gap due to: . • Idiosyncrasies of actual . construction materials • Construction methods • Scaling effects • Skill sets • Misunderstandings Can lead to serious errors and discrepancies in the realization 12 IBM Software Group | 6 Models of Software SC_MODULE(producer) SC_CTOR(consumer) { { sc_outmaster<int> out1; SC_SLAVE(accumulate, in1); sc_in<bool> start; // to kick-start the sum = 0; // initialize the producer accumulator}}; void generate_data () SC_MODULE(top) // structural module { { for(int i =0; i <10; i++).{ producer *A1; out1 =i ; //this will invoke the slave;} consumer *B1; } sc_link_mp<int> link1; SC_CTOR(producer) SC_CTOR(top) { { SC_METHOD(generate_data); A1 = new producer(“A1”); sensitive << start;}}; A1.out1(link1); SC_MODULE(consumer) B1 = new consumer(“B1”); { B1.in1(link1);}}; sc_inslave<int> in1; int sum; // declare as a module state variable void accumulate (){ sum += in1; «sc_method» «sc_link_mp» «sc_slave» cout << “Sum = “ << sum << endl;} producer consumer start out1link1 in1 13 IBM Software Group | Software Model Evolution: Adding Detail void generate_data() «sc_method» producer {for (int i=0; i<10; i++) producer {out1 = I;}} start out1 NotStarted producer start/generate_data( ) NotStarted Started start St1 St2 Started Detail can be added continuously until the specification is complete 14 IBM Software Group | 7 The Remarkable Thing About Software Software has the rare property that it allows us to directly evolve models into full-fledged implementations without changing the engineering medium, tools, or methods! ⇒ This ensures perfect accuracy of software models; since the model and the system that it models are the same thing The model is the implementation 15 IBM Software Group | Introduction: modeling and Dynamic Semantics software Interaction Modeling Model-Driven Development Capabilities A Critique of UML 1.x Activities and Actions Requirements for UML 2.0 State Machine Innovations Foundations of UML 2.0 Other New Features Architectural Modeling Summary and Conclusion Capabilities 16 IBM Software Group | 8 Model-Driven Style of Development (MDD) An approach to software development in which the focus and primary artifacts of development are models (as opposed to programs) Implies automatic generation of programs from models Using modeling languages directly as implementation tools “The model is the implementation” 17 IBM Software Group | Modeling versus Programming Languages Cover different ranges of abstraction high ∆ : HI statecharts, interaction diagrams, architectural Modeling Level of structure, etc. Languages Abstraction (UML,…) Programming Languages (C/C++, Java, …) ∆ : LO data layout, arithmetical and logical operators, low etc. 18 IBM Software Group | 9 Covering the Full Range of Detail “Action” languages (e.g., Java, C++) for fine-grain detail high Modeling Level of Languages Abstraction (UML,…) Programming Fine-grain logic, Languages arithmetic (Any) Action implementation (C/C++, Java, …) formulae, level detail Language etc. (application specific) low 19 IBM Software Group | Example Spec Appropriate languages for each abstraction level Fine-grain S1 logic in a traditional 3G e1[q=5]/ e2/ language {d = msg->data(); High-level {printf(q);} parts described send(oa,5, d);} using high-level abstractions S2 Advantage: exploits S21 e32/ • Existing tools S21 • Code libraries end/ • Developer experience {printf(“bye”);} 20 IBM Software Group | 10 How We Learn From Models By inspection ? mental execution Ξ = cos (η + π/2) Ξ =+ cos ξ∗5(η + π/2) + ξ∗5 unreliable By formal analysis ? Ξ = cos (η + π/2) mathematical methods Ξ =+ cos ξ∗5(η + π/2) + ξ∗5 reliable (theoretically) software is very difficult to ? model mathematically! By experimentation (execution) Ξ = cos (η + π/2) Ξ =+ cos ξ∗5(η + π/2) more reliable than inspection + ξ∗5 direct experience/insight 21 IBM Software Group | MDD Implications Ultimately, it should be possible to: Execute models Translate them automatically into implementations …possibly for different implementation platforms Platform independent models (PIMs) Modeling language requirements The semantic underpinnings of modeling languages must be precise and unambiguous It should be possible to easily specialize a modeling language for a particular domain It should be possible to easily define new specialized languages 22 IBM Software Group | 11 OMG’s Model-Driven Architecture (MDA) An OMG initiative A framework for a set of standards in support of MDD Inspired by: The widespread public acceptance of UML and The availability of mature MDD technologies OMG moving beyond middleware (CORBA) Purpose: Enable inter-working between complementary tools Foster specialization of tools and methods Good overview paper: http://www.omg.org/cgi-bin/doc?ormsc/2001-07-01 23 IBM Software Group | The Languages of MDA Set of modeling languages for specific purposes UML “bootstrap” General Real-Time Standard UML profile For general OO MetaObject modeling Facility (MOF) EAI profile MOF Common “core” Warehouse Metamodel (CWM) Software process profile A modeling language For exchanging for defining modeling information languages about business data etc. etc. 24 IBM Software Group | 12 The “4-Layer” Architecture <sawdust> 01011 <2 tons> 01011 <lard> 01011 Real Objects <Ben&Jerry’s> (M0) <5 tons> (computer memory, run-time environment) «modeledBy» «modeledBy» «modeledBy» Customer CustomerOrder Model (M1) id item (model repository) quantity «specifiedBy» «specifiedBy» . (M2 = UML, Class Association Meta-Model (modeling tool) CWM) «specifiedBy» Class(MOF) . Meta-Meta-Model (M3 = MOF) (modeling tool) 25 IBM Software Group | UML: The Foundation of MDA 3Q2003 UML 2.0 (MDA) UML 1.5 1Q2003 2001 UML 1.4 (action semantics) 1998 UML 1.3 (extensibility) 1997 UML 1.1 (OMG Standard) 1996 Rumbaugh Booch Jacobson Foundations of OO (Nygaard, Goldberg, Meyer, Stroustrup, Harel, Wirfs-Brock, Reenskaug,…) 1967 26 IBM Software Group | 13 Introduction: modeling and Dynamic Semantics software Interaction Modeling Model-Driven Development Capabilities A Critique of UML 1.x Activities and Actions Requirements for UML 2.0 State Machine Innovations Foundations of UML 2.0 Other New Features Architectural Modeling Summary and Conclusion Capabilities 27 IBM Software Group | UML 1.x: What Went Right Timeliness (meeting a real need) Emphasis on semantics as opposed to notation model-based approach (versus view-based) detailed semantic specifications Higher-level abstractions beyond most current OO programming language technology state machines and activity diagrams support for specifying inter-object behavior (interactions) use cases Customizability (extensibility) 28 IBM Software Group | 14 Traditional

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    62 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us