Modeling Behavior with UML Interactions and Statecharts

Total Page:16

File Type:pdf, Size:1020Kb

Modeling Behavior with UML Interactions and Statecharts Modeling Behavior with UML Interactions and Statecharts Bruce Powel Douglass, Ph.D. Chief Evangelist I-Logix, Inc. www.ilogix.com UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries. Page 1 About the Author • Chief Evangelist for I-Logix •Author of • Real-Time UML 2nd Edition: Efficient Objects for Embedded Systems (Addison- Wesley, Dec. 1999) • Doing Hard Time: Developing Real- Time Systems with UML, Objects, Frameworks, and Patterns (Addison- Wesley, 1999) • Real-Time Design Patterns: Robust Scalable Architectures for Real-Time Systems (Addison-Wesley, 2002) • Advisory Board • Embedded Systems Conference • UML World Conference • Software Development Magazine •Co-chair of OMG RTAD Work Group Page 2 Agenda • Basic Behavioral Concepts • Interactions – Semantics of Interactions – Sequence Diagrams – Collaboration Diagrams – Using Interactions • Statecharts – Semantics of Statecharts – Statechart Notation – Activity Diagrams – Using Statecharts Page 3 Basic Behavioral Concepts Page 4 What IS Behavior? • Behavior is a change in condition or value over time – May be in response to an event or request – May be externally visible or not Page 5 What kinds of things have Behavior? • Classifiers – Big Objects •Systems • Subsystems • Components – Small Objects • “primitive” or “semantic” objects – Use Cases • Collaborations – Collaborations are groups of objects working together for a common behavioral purpose • E.g. realize a use case Page 6 Types of Behavior • Behavior can be simple Simple behavior does not depend on the object’s history • Behavior can be continuous Continuous behavior depends on the object’s history but in a smooth, continuous fashion • Behavior can be stateful State-driven behavior means that the object’s behavior can be divided into disjoint sets Page 7 Simple Behavior • The behavior is not affected by the object’s history – cos( x ) – getTemperature( ) – setVoltage( v ) – max(a,b) b 2 – ∫ e−x dx a • May be decomposed arbitrarily deeply into subpart behaviors Page 8 Continuous Behavior • Object’s behavior depends on history in a continuous way. It does the same kind of behavior but resulting values vary depending on object history X Y W V Zn – Control loops n n + n n + Ka - Delay + Kb – digital filter ddjj+++−−123 d j d j − fj = 4 – fuzzy logic Uses partial set membership to compute a smooth, continuous output Page 9 State Behavior • Behavior depends on the history of the object, but in a discrete way • Object does different kinds of behavior and accepts different events in different states – When aircraft is on the ground, landing gear cannot be withdrawn – When aircraft is ascending, landing gear cannot be lowered – When aircraft is descending, landing gear cannot be raised – When aircraft is in cruise, landing gear can neither be raised nor lowered Page 10 Piece-wise Continuous • A combination of state and continuous – Eg cublic splines State 1 State 2 State 3 • Performs same actions but results vary depending on object history Page 11 Behavioral Synchronization • BS applies to how elements synchronize with respect to the invocation of services during an interaction • Types – Synchronous • Sender blocks and waits until Receiver is done – Asynchronous • Sender “sends and continues” • Receive processes when it is ready Page 12 Behavior the Single Thread • Single threaded behavior is EASY Page 13 Behavior and Multiple Threads • Independent multithread behavior is EASY Page 14 Behavior and Chaos • Interacting multithread behavior is VERY HARD Page 15 Problems with Interacting Threads • Protection of data and resource integrity in the presence contention – No problem with multiple readers – With >= 1 modifier and other accessors, the data may be corrupted or bad values may be returned • Deadlock – Happens when a resource client waits for a condition that can never happen Page 16 Resource Contention Solutions • Make resources reentrant – Difficult when modifying or updating a resource • Serialize access – Critical section • Disables task switching during resource access – Mutual exclusion semaphores • Implies priority inversion – Asynchronous rendezvous • Implies queuing (queue access must also be protected) Page 17 Deadlock Prerequisites • ALL of the following are required to have deadlock: – Mutual exclusion (locking) of resources – Resources are held (locked) while others are waited for – Preemption while holding resources is permitted – A circular wait condition exists (P1 waits on P2 which waits on P3 which waits on P1). • Liveness can be assured by breaking any of the above required conditions Page 18 Deadlock B R1 Available Locked R2 Available 111 R1: Resource Locked 1 D 1 Task 1 Task 1 Task E Task 2 Active 1 1 Inactive 1 R2: C 1 Resource 1 Blocked Task 2 Task Active Inactive A Blocked 0 20 40 60 80 100 120 140 160 180 200 220 240 Time Legend: Priority: Task 1 > Task 2 Adapted from Real-Time A: Task 2 runs with the intent of locking R1 then R2 Design Patterns by Bruce B: Task 2 locks R1 and is about to lock R2, when... C: Task 1 runs, prempting Task 2, with the intent of locking R2 then R1 Powel Douglass D: Task 2 locks R2. Addison-Wesley, 2002 E: Now Task 2 needs to lock R1, however R1 is already locked. So Task 2 must block until Task 1 can release R1. However, Task 1 cannot run to release R1 because it needs R2 which is locked by Task 2. Page 19 (some) Deadlock Solutions • Critical Sections – Don’t allow other tasks to run while resources are locked • Simultaneous Locking – Don’t wait while for other resources • Ordered Locking – Require locking to take place in a particular order (break circular waiting) • Priority Ceiling Protocol – Don’t allow locking of low priority resources if a higher priority resource is held Page 20 Timing and performance • In real-time systems, we must understand the Qualities of Service provided by the behavior – Worst case execution time – Average case execution time – Memory requirements – Write access time vs read access time • We do this by attaching constraints to the behavioral elements – Actions (on statecharts) – Methods Page 21 Interactions Page 22 Interaction • A collection of communications between instances, including all ways to affect instances, – Operation invocation, – Instance creation – Instance destruction • May be synchronous, asynchronous, or a mixture • Communications are partially ordered in time Page 23 UML Interaction Concepts • Instance – An object •Link – A run-time connection allowing communication •Action – Specification of an executable statement •Stimulus – Communication between two instances Page 24 UML Interaction Concepts • Operation – Specification of a requestable service provided by an instance • Method – Implementation of an operation •Call – Specification of a synchronous communciation • Signal – Specification of an asynchronous communication • Event – An occurrence of interest that results in a signal or operation call Page 25 Stimulus Specification •Simple goto(x,y,z) • With Sequence # 1.4 goto(x,y,z) – Dotted number indicates nested 1.4 newPos = goto(x,y,z) call TaskA:1.4 newPos = goto(x,y,z) • With Thread ID TaskB:2.3 TaskA/1.4 newPos = goto(x,y,z) • With Guards and Predecessors TaskB2.3/ TaskA: 1.4 [x^2 > y^2+z^2] newPos = goto(x,y,z) Page 26 Interaction Notations in UML • Sequence diagram – Most common – Emphasizes sequence over collaboration structure • Collaboration diagram – Less common – Emphasizes collaboration structure over sequence Page 27 Sequence Diagrams • Sequence diagrams show the behavior of a group of instances over time. Instances may be – Objects (most common) – Use case instance – System – Subsystem –Actor Page 28 Sequence Diagrams good for… •Useful for – Capturing typical or exceptional interactions for requirements – Understanding collaborative behavior – Demonstrating that collaboration realizes use case properly – Testing collaborative behavior Page 29 Sequence Diagrams Instance lifeline Partition line stimulus description Time constraint Collaboration boundary Page 30 SDs for Use Case Details • Capture interactions of System (or the use case) under consideration and actors • Used in a “black box” manner • Show typical and exceptional scenarios of use case, one scenaro per sequence diagram • Commonly a dozen to several dozen scenarios per use case Page 31 Use case Example Page 32 Use Case Sequence Diagram Page 33 UC Sequence Diagram (detail) Page 34 Use Case realization • Use cases are realized by collaborations of instances • How do you connect the use case sequence diagram to the collaboration? – How do you show it is CORRECT? • ANS: Execute Elaborated Scenarios – ADD collaboration details and show the SAME set of scenarios with this new detail – Demonstrate via execution the behavior is consistent with the required behavior Page 35 Use Case Collaboration Page 36 Use Case Realization Page 37 Use Case Realization (detail) Page 38 Special Case: Activations • Activations are useful for the sequential message exchanges stimulus activation return Page 39 Partial Ordering • Objects are normally assumed to be potentially concurrent with other objects and so SDs only specify partial order Page 40 Rules of (partial) Order • Message events (send or receive) on the same lifeline are fully ordered • Msg.send event precedes Msg.receive event for each message • All other orders are indeterminate Page 41 Sequence Diagrams and States State • States can be shown on sequence diagrams. The states holds in time until a change of state occurs • Shows to correspondence between
Recommended publications
  • UML Tutorial: Part 1 -- Class Diagrams
    UML Tutorial: Part 1 -- Class Diagrams. Robert C. Martin My next several columns will be a running tutorial of UML. The 1.0 version of UML was released on the 13th of January, 1997. The 1.1 release should be out before the end of the year. This col- umn will track the progress of UML and present the issues that the three amigos (Grady Booch, Jim Rumbaugh, and Ivar Jacobson) are dealing with. Introduction UML stands for Unified Modeling Language. It represents a unification of the concepts and nota- tions presented by the three amigos in their respective books1. The goal is for UML to become a common language for creating models of object oriented computer software. In its current form UML is comprised of two major components: a Meta-model and a notation. In the future, some form of method or process may also be added to; or associated with, UML. The Meta-model UML is unique in that it has a standard data representation. This representation is called the meta- model. The meta-model is a description of UML in UML. It describes the objects, attributes, and relationships necessary to represent the concepts of UML within a software application. This provides CASE manufacturers with a standard and unambiguous way to represent UML models. Hopefully it will allow for easy transport of UML models between tools. It may also make it easier to write ancillary tools for browsing, summarizing, and modifying UML models. A deeper discussion of the metamodel is beyond the scope of this column. Interested readers can learn more about it by downloading the UML documents from the rational web site2.
    [Show full text]
  • Plantuml Language Reference Guide (Version 1.2021.2)
    Drawing UML with PlantUML PlantUML Language Reference Guide (Version 1.2021.2) PlantUML is a component that allows to quickly write : • Sequence diagram • Usecase diagram • Class diagram • Object diagram • Activity diagram • Component diagram • Deployment diagram • State diagram • Timing diagram The following non-UML diagrams are also supported: • JSON Data • YAML Data • Network diagram (nwdiag) • Wireframe graphical interface • Archimate diagram • Specification and Description Language (SDL) • Ditaa diagram • Gantt diagram • MindMap diagram • Work Breakdown Structure diagram • Mathematic with AsciiMath or JLaTeXMath notation • Entity Relationship diagram Diagrams are defined using a simple and intuitive language. 1 SEQUENCE DIAGRAM 1 Sequence Diagram 1.1 Basic examples The sequence -> is used to draw a message between two participants. Participants do not have to be explicitly declared. To have a dotted arrow, you use --> It is also possible to use <- and <--. That does not change the drawing, but may improve readability. Note that this is only true for sequence diagrams, rules are different for the other diagrams. @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice <-- Bob: Another authentication Response @enduml 1.2 Declaring participant If the keyword participant is used to declare a participant, more control on that participant is possible. The order of declaration will be the (default) order of display. Using these other keywords to declare participants
    [Show full text]
  • APECS: Polychrony Based End-To-End Embedded System Design and Code Synthesis
    APECS: Polychrony based End-to-End Embedded System Design and Code Synthesis Matthew E. Anderson Dissertation submitted to the faculty of the Virginia Polytechnic Institute and State University in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Engineering Sandeep K. Shukla, Chair Lamine Mili Alireza Haghighat Chao Wang Yi Deng April 3, 2015 Blacksburg, Virginia Keywords: AADL, CPS, Model-based code synthesis, correct-by-construction code synthesis, Polychrony, code generators, OSATE, Ocarina Copyright 2015, Matthew E. Anderson APECS: Polychrony based End-to-End Embedded System Design and Code Synthesis Matthew E. Anderson (ABSTRACT) The development of high integrity embedded systems remains an arduous and error-prone task, despite the efforts by researchers in inventing tools and techniques for design automa- tion. Much of the problem arises from the fact that the semantics of the modeling languages for the various tools, are often distinct, and the semantics gaps are often filled manually through the engineer's understanding of one model or an abstraction. This provides an op- portunity for bugs to creep in, other than standardising software engineering errors germane to such complex system engineering. Since embedded systems applications such as avionics, automotive, or industrial automation are safety critical, it is very important to invent tools, and methodologies for safe and reliable system design. Much of the tools, and techniques deal with either the design of embedded platforms (hardware, networking, firmware etc), and software stack separately. The problem of the semantic gap between these two, as well as between models of computation used to capture semantics must be solved in order to design safer embedded systems.
    [Show full text]
  • Semantic Based Model of Conceptual Work Products for Formal Verification of Complex Interactive Systems
    Semantic based model of Conceptual Work Products for formal verification of complex interactive systems Mohcine Madkour1*, Keith Butler2, Eric Mercer3, Ali Bahrami4, Cui Tao1 1 The University of Texas Health Science Center at Houston, School of Biomedical Informatics, 7000 Fannin St Suite 600, Houston, TX 77030 2 University of Washington, Department of Human Centered Design and Engineering Box 352315, Sieg Hall, Room 208 Seattle, WA 98195 3 Brigham Young University Computer Science Department, 3334 TMCB PO Box 26576 Provo, UT 84602-6576 4 Medico System Inc. 10900 NE 8th Street Suite 900 Bellevue, WA 98004 * Corresponding author, email: [email protected], phone: (+1) 281-652-7118 Abstract - Many clinical workflows depend on interactive computer systems for highly technical, conceptual work 1. Introduction products, such as diagnoses, treatment plans, care Many critical systems require highly complex user interactions coordination, and case management. We describe an and a large number of cognitive tasks. These systems are automatic logic reasoner to verify objective specifications common in clinical health care and also many other industries for these highly technical, but abstract, work products that where the consequences of failure can be very expensive or are essential to care. The conceptual work products risky to human safety. Formal verification through model specifications serve as a fundamental output requirement, checking could reduce or prevent system failures, but several which must be clearly stated, correct and solvable. There is technical obstacles must be solved first. strategic importance for such specifications because, in We focus here on the abstract products of conceptual work turn, they enable system model checking to verify that that are foundational requirements that must be part of machine functions taken with user procedures are actually verification in a modern health care systems.
    [Show full text]
  • Systems Engineering with Sysml/UML Morgan Kaufmann OMG Press
    Systems Engineering with SysML/UML Morgan Kaufmann OMG Press Morgan Kaufmann Publishers and the Object Management Group™ (OMG) have joined forces to publish a line of books addressing business and technical topics related to OMG’s large suite of software standards. OMG is an international, open membership, not-for-profi t computer industry consortium that was founded in 1989. The OMG creates standards for software used in government and corporate environments to enable interoperability and to forge common development environments that encourage the adoption and evolution of new technology. OMG members and its board of directors consist of representatives from a majority of the organizations that shape enterprise and Internet computing today. OMG’s modeling standards, including the Unifi ed Modeling Language™ (UML®) and Model Driven Architecture® (MDA), enable powerful visual design, execution and maintenance of software, and other processes—for example, IT Systems Modeling and Business Process Management. The middleware standards and profi les of the Object Management Group are based on the Common Object Request Broker Architecture® (CORBA) and support a wide variety of industries. More information about OMG can be found at http://www.omg.org/. Related Morgan Kaufmann OMG Press Titles UML 2 Certifi cation Guide: Fundamental and Intermediate Exams Tim Weilkiens and Bernd Oestereich Real-Life MDA: Solving Business Problems with Model Driven Architecture Michael Guttman and John Parodi Architecture Driven Modernization: A Series of Industry Case Studies Bill Ulrich Systems Engineering with SysML/UML Modeling, Analysis, Design Tim Weilkiens Acquisitions Editor: Tiffany Gasbarrini Publisher: Denise E. M. Penrose Publishing Services Manager: George Morrison Project Manager: Mónica González de Mendoza Assistant Editor: Matt Cater Production Assistant: Lianne Hong Cover Design: Dennis Schaefer Cover Image: © Masterfile (Royalty-Free Division) Morgan Kaufmann Publishers is an imprint of Eslsevier.
    [Show full text]
  • UML Why Develop a UML Model?
    App Development & Modelling BSc in Applied Computing Produced Eamonn de Leastar ([email protected]) by Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie Introduction to UML Why develop a UML model? • Provide structure for problem solving • Experiment to explore multiple solutions • Furnish abstractions to manage complexity • Decrease development costs • Manage the risk of mistakes #3 The Challenge #4 The Vision #5 Why do we model graphically? " Graphics reveal data.! " Edward Tufte$ The Visual Display of Quantitative Information, 1983$ " 1 bitmap = 1 megaword.! " Anonymous visual modeler #6 Building Blocks of UML " The basic building blocks of UML are:! " model elements (classes, interfaces, components, use cases, etc.)! " relationships (associations, generalization, dependencies, etc.)! " diagrams (class diagrams, use case diagrams, interaction diagrams, etc.)! " Simple building blocks are used to create large, complex structures! " eg elements, bonds and molecules in chemistry! " eg components, connectors and circuit boards in hardware #7 Example : Classifier View #8 Example: Instance View #9 UML Modeling Process " Use Case! " Structural! " Behavioural! " Architectural #10 Use Case Visual Paradigm Help #11 Structural Modeling Visual Paradigm Help #12 Behavioural Modeling Visual Paradigm Help #13 Architectural Modeling Visual Paradigm Help #14 Structural Modeling " Core concepts! " Diagram Types #15 Structural Modeling Core Elements " a view of an system that emphasizes
    [Show full text]
  • UML Class Diagrams UML Is a Graphical Language for Recording Aspects of the Requirements and Design of Software Systems
    The Unified Modeling Language UML class diagrams UML is a graphical language for recording aspects of the requirements and design of software systems. Nigel Goddard It provides many diagram types; all the diagrams of a system together form a UML model. Three important types of diagram: School of Informatics 1. Use-case diagram. Already seen in requirements lecture. University of Edinburgh 2. Class diagram. Today. 3. Interaction diagram. In the future. Reminder: a simple use case diagram A class Reserve book Browse Browser BookBorrower Book Borrow copy of book A class as design entity is an example of a model element: the Return copy of book rectangle and text form an example of a corresponding presentation element. Extend loan UML explicitly separates concerns of actual symbols used vs Update catalogue meaning. Many other things can be model elements: use cases, actors, Borrow journal Librarian associations, generalisation, packages, methods,... Return journal JournalBorrower An object Classifiers and instances An aspect of the UML metamodel that it's helpful to understand up front. jo : Customer An instance is to a classifier as an object is to a class: instance and classifier are more general terms. This pattern generalises: always show an instance of a classifier In the metamodel, Class inherits from Classifier, Object inherits using the same symbol as for the classifier, labelled from Instance. instanceName : classifierName. UML defines many different classifiers. E.g., UseCase and Actor are classifiers. Showing attributes and operations Compartments We saw the standard: Book a compartment for attributes title : String I I a compartment for operations, below it copiesOnShelf() : Integer borrow(c:Copy) They can be suppressed in diagrams.
    [Show full text]
  • During the Early Days of Computing, Computer Systems Were Designed to Fit a Particular Platform and Were Designed to Address T
    TAGDUR: A Tool for Producing UML Diagrams Through Reengineering of Legacy Systems Richard Millham, Hongji Yang De Montfort University, England [email protected] & [email protected] Abstract: Introducing TAGDUR, a reengineering tool that first transforms a procedural legacy system into an object-oriented, event-driven system and then models and documents this transformed system through a series of UML diagrams. Keywords: TAGDUR, Reengineering, Program Transformation, UML In this paper, we introduce TAGDUR (Transformation from a sequential-driven, procedural structured to an and Automatic Generation of Documentation in UML event-driven, component-based architecture requires a through Reengineering). TAGDUR is a reengineering tool transformation of the original system to an object-oriented, designed to address the problems frequently found in event-driven system. Object orientation, because it many legacy systems such as lack of documentation and encapsulates methods and their variables into modules, is the need to transform the present structure to a more well-suited to a multi-tiered Web-based architecture modern architecture. TAGDUR first transforms a where pieces of software must be defined in encapsulated procedurally-structured system to an object-oriented, modules with cleanly-defined interfaces. This particular event-driven architecture. Then TAGDUR generates legacy system is procedural-driven and is batch-oriented; documentation of the structure and behavior of this a move to a Web-based architecture requires a real-time, transformed system through a series of UML (Unified event-driven response rather than a procedural invocation. Modeling Language) diagrams. These diagrams include class, deployment, sequence, and activity diagrams. Object orientation promises other advantages as well.
    [Show full text]
  • UML Diagrams
    mywbut.com UML Diagrams Overview UML was designed to be the distillation of best practices in software development. To accomplish this ambitious goal, UML provides an extensive set of diagramming tools. Because UML is such a big subject and the diagramming tools are so diverse I thought it would be helpful to give you an overview of the diagrams themselves. This chapter presents some samples of each diagram with a brief introduction describing the purpose and benefits of each diagram. As a kind of roadmap I'll use the UML groupings that divide the diagrams into packages based on their roles in the Model Management, Structural, and Behavioral aspects of system design. Model Management diagrams include Packages, which are used to represent Subsystems, Models, and more. Structural diagrams include the Class diagram, Object diagram, Composite Structure diagram, Component diagram, Deployment diagram, and the Combined Component and Deployment diagram. Behavioral diagrams include the Use Case diagram, Activity diagram, Interaction diagrams, State Machine diagram, and Protocol State Machine diagram. UML Diagrams and Work Products Each diagram reveals a unique yet overlapping view of a system. That sounds a bit strange. How can a diagram be unique yet overlap other diagrams? The uniqueness comes from the different perspective taken by each diagram. The overlap comes from the fact that all of the diagrams are looking at the same problem. The big question that usually crops up about now is, "Why do I have to use all these diagrams? Joe and Susan have always just drawn Class diagrams." This question is valid. For small, simple projects you may not need to create all these diagrams.
    [Show full text]
  • Object-Oriented Data Modeling
    M13_HOFF8406_10_SE_C13.QXD 6/5/10 10:25 AM Page 13-1 CHAPTER 13 Object-Oriented Data Modeling Learning Objectives After studying this chapter, you should be able to: ᭤ Concisely define each of the following key terms: class, object, state, behavior, class diagram, object diagram, operation, encapsulation, constructor operation, query operation, update operation, class-scope operation, association, association role, multiplicity, association class, abstract class, concrete class, class-scope attribute, abstract operation, method, polymorphism, overriding, multiple classification, aggregation, and composition. ᭤ Describe the activities in the different phases of the object-oriented development life cycle. ᭤ State the advantages of object-oriented modeling vis-à-vis structured approaches. ᭤ Compare the object-oriented model with the E-R and EER models. ᭤ Model a real-world domain by using a Unified Modeling Language (UML) class diagram ᭤ Provide a snapshot of the detailed state of a system at a point in time, using a UML object diagram. ᭤ Recognize when to use generalization, aggregation, and composition relationships. ᭤ Specify different types of business rules in a class diagram. INTRODUCTION In Chapters 2 and 3, you learned about data modeling using the E-R and EER models. In those chapters, you discovered how to model the data needs of an organization using entities, attributes, and a wide variety of relationships. In this chapter, you will be introduced to the object-oriented model, which is becoming increasingly popular because of its ability to thoroughly represent complex relationships, as well as to represent data and system behavior in a consistent, integrated notation. Fortunately, most of the concepts you learned in those chapters correspond to concepts in object-oriented modeling, but the object- oriented model has even more expressive power than the EER model.
    [Show full text]
  • 1 Class Diagrams and Entity Relationship Diagrams (ERD) Class Diagrams and Erds Both Model the Structure of a System
    Tutorial Week 7 - Class and Entity-Relationship Diagrams 1 Class Diagrams and Entity Relationship Diagrams (ERD) Class diagrams and ERDs both model the structure of a system. Class diagrams represent the dynamic aspects of a system: both the structural and behavioural features. ERDs, depicting only structural features provide a static view of the system. 2 Class Diagrams 2.1 Elements of a class diagram: 2.1.1 class A class is a general concept (represented as a square box). Class Name A class defines the structural attributes and behavioural characteristics of that concept. Shown as a rectangle labeled with the class name. 2.1.2 association Class 1 Association Class 2 A (semantic) relationship between classes. A line that joins two classes. 2.1.2.1 binary Simple association between two classes. A Person Eats Food solid triangle with the association name indicates the direction in which the association is meant to be read. 2.1.2.2 n-ary Class 1 Class 2 n-ary Association expresses an association n-ary between multiple classes Class 3 2.1.2.3 Aggregation Team Member “has-a” relationship page 1 of 14 Tutorial Week 7 - Class and Entity-Relationship Diagrams 2.1.2.4 Composition Car Engine “is-composed-of” relationship 2.1.2.5 Generalization Car Volvo “is-a-kind-of” relationship 2.1.2.6 Dependency Project The source class depends on (uses) the target class. (not used for requirements analysis) Project Manager Team 2.1.2.7 Realization «datatype» Class supports all operations of target Human Resources class but not all attributes or associations.
    [Show full text]
  • Telelogic AB
    Developing Test Specifications Through a Developing Test Specifications Model-Driven Approach Through Model-Driven Approach Irv Badr Senior Manager of Product Marketing © Telelogic AB Quality Improvement by Users • Major telecommunications handset maker: “Model Driven Development reduced the design errors in our application by 64%. We found 97% of all errors during the Coding and Unit Test phase of our project.” • Major telecommunications infrastructure provider: – 90% of coding errors removed – 30-50% of logical errors removed Telelogic AB 1 The Vision: Agile MDD approach for Test Development Requirements Document Requirements System Capture & (validation) Analysis Testing Accept Increment Integration & Regression Testing Define Increment Unit test Architect & Increment Design Increment Build Increment Development Testing Operational = Feedback trace System Telelogic AB Modeling Driven Development The Basics © Telelogic AB 2 Model-based Testing • Tests should be modeled together with the system architecture and functionality – systems and their tests tie in with the same system requirements – changes to requirements affect both system and tests – systems and tests are made consistent and coherent • Automatically generate the information that is necessary to execute the tests UML System Model Test Model code generation code generation Source code Telelogic AB Existing MDDTesting Framework • When modeling - a standard approach to express tests, which: – works with models at different levels of abstraction – supports source code – can be
    [Show full text]