The semantics of the UML Collaboration

Slides:



Advertisements
Similar presentations
SEG4110 – Advanced Software Design and Reengineering TOPIC D Metamodelling.
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Unified Modeling Language
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Unified Modeling (Part I) Overview of UML & Modeling
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
© Copyright Eliyahu Brutman Programming Techniques Course.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
7M822 UML Interaction Diagrams 25 November 2010.
Use Case Analysis – continued
Unified Modeling Language
The Unified Modeling Language (UML) Class Diagrams.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
TAL7011 – Lecture 4 UML for Architecture Modeling.
Design Jon Walker. More UML ● What is UML again?
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Design Model Lecture p6 T120B pavasario sem.
Software Engineering Lecture 8 Object-Oriented Analysis.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
UML (Unified Modeling Language)
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML Class & Object Diagram I
Systems Analysis and Design in a Changing World, Fourth Edition
CHAPTER
Object-oriented and Structured System Models
UML Diagrams By Daniel Damaris Novarianto S..
Main issues: • What do we want to build • How do we write this down
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Unified Modeling Language
Dynamic Modeling of Banking System Case Study - II
Introduction to Unified Modeling Language (UML)
UML Diagrams Jung Woo.
Abstract descriptions of systems whose requirements are being analysed
UML dynamic Modeling (Behavior Diagram)
Software Architecture & Design Pattern
Perspectives on the Unified Modeling Language semantics
Interactions.
System models October 5, 2005.
UML Overview Part 2.
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
“The UML Collaboration, a Standard for Role Modeling.”
Komponentbasert utvikling Den sanne objektorientering
The What, Why and How of the UML Collaboration
Software Design Lecture : 15.
An Introduction to Software Architecture
Dynamic Modeling Lecture # 37.
Design Yaodong Bi.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Stumpf and Teague Object-Oriented Systems Analysis and Design with UML
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Appendix A Object-Oriented Analysis and Design
Appendix 3 Object-Oriented Analysis and Design
Stumpf and Teague Object-Oriented Systems Analysis and Design with UML
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

The semantics of the UML Collaboration Trygve.Reenskaug@ifi.uio.no http://www.ifi.uio.no/~trygver 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Legal Notice This presentation is copyright ©1999 Trygve Reenskaug, Lasse Bjerde Oslo, Norway. All rights reserved. Unauthorized reproduction prohibited. 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

A system is a chosen perspective on reality A system is a part of the real world which we choose to regard as a whole, separated from the rest of the world during some period of consideration. A whole that we choose to consider as a collection of parts, each part being characterized by attributes and by actions which may involve itself and other parts. Holbæk_Hanssen et.al.: System Description and the Delta Language Oslo, 1977 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Consider the Universe as a Universe of objects 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

The object paradigm is very simple UML Class Abstraction cannot model message sends. Use UML Collaboration abstraction for system modeling Object-B IN OUT-B OUT-C Methods Variables IN OUT-C Object-C Methods Variables Object Orientation Encapsulation: Package data with methods; Collaborators only see object’s interfaces Object identity supports Distributed logic: everything happens within some object, nothing outside the objects Role models describe system behavior as object collaboration Role model synthesis: Inherit collaboration with roles and system behavior Essentially black box - implementation hidden/postponed Object-A IN Methods Variables Message (operation) triggers method causes response 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary Collaborations model open systems Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

An Open System For a given system, the environment is the set of all objects outside the system whose actions affect it or who are affected by the system, and also those objects outside the system whose attributes are changed by its actions. Etzioni: Modern Organizations Prentice-Hall, 1964 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Open systems interact with environment objects 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

The collaboration is a topological model of a system of objects 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Typing AssociationEndRoles / Father / Mother Mother_Child_Intf cashRequested() Child_Mother_Intf cashReceived() / Child 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary ClassifierRole defined in terms of Collaboration instance Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Collaboration (definition) A Collaboration describes how a number of objects work together for a common purpose. The structural aspect is a description of the responsibilities of each object in the context of the overall purpose of the collaboration; and also the links that connect the objects into a communicating whole. The dynamic aspect is a description of how stimuli flow between the objects to achieve the common purpose. 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

ClassifierRole (definition) A classifierRole is a named slot for an object participating in a Collaboration. Object behavior is represented by its participation in the overall behavior of the Collaboration. Object identity is preserved through this constraint: "In an instance of a collaboration, each ClassifierRole maps onto at most one object." 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary Separation of concern: Horizontal: Subsystem object grouping Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Separation of concern Cluster objects into “super-objects” The (EJB) Component: A Component has a single access point (an object ID) and offers a well-defined interface to its clients. A Component is reused by cloning A Component does not make assumptions about its clients A Component plays a standardized role within a container Tools are used to deploy components and compose systems 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Horizontal Separation of Concern Object clustering «EJB» BeanExample UML 1.3 Subsystem 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Vertical Separation of Concern Collaborations separate on behavior Collaboration for Use case / operation UC1 Collaboration for Use case / operation UC2 Object Object Object Object A B C D 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary VirtualRole: package of ClassifierRole Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Virtual Roles Example Activity Network Activity-B Activity-D 8 (4) 12 13 (3) 16 Activity-A Activity-F 5 (3) 8 20 (4) 24 Activity-C Activity-E 8 (5) 13 13 (7) 20 Completion time Duration Start time 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Virtual Roles Four designs /ViewPackage «virtualRole» /ViewPackage / NetworkView / NetworkModel * 1 / ActivityView 1 * / ActivityModel 1 * * 1 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

VirtualRoles Use Case system Function Traveler Paymaster 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary Virtual Interaction: Comment Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Virtual Interactions - transfer information to view - alert view of changes in model «virtualRole» «virtualRole» / View / Model 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary Collaboration specifies system behavior Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Role and system behavior The Collaboration / File start() 1 read() write() stop() 1 / Master 1 fileStarted() runCompleted() fileStopped() 1 * / Slave * run() 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Role and system behavior Message Sequence /Master /File /Slave start() fileStarted() run() read() readDone() write() writeDone() runCompleted() stop() fileStopped() 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Role and system behavior Role State Machines Slave.readDone(); Idle start/ open file; master.fileStarted(); Ready stop /closeFile; Master.fileStopped(); / File Done Initial read /read(); write /write(); Slave.writeDone(); Stopping WaitComplete WaitStart / Master Initial/File.start(); fileStarted /Slave.run(); runCompleted /File.stop(); fileStopped final Idle done Editing run/File.read(); writeDone /Master.runCompleted(); readDone /File.write(); / Slave Initial 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Role and system behavior System State Machine Initial->File.start(); Master-WaitStart & File-Idle & Slave-Idle File start / open file; Master.fileStarted; Master-WaitStart & File-Ready & Slave-Idle Master fileStarted / Slave.run(); Master-WaitComplete & File-Ready & Slave-Idle Slave run / File.read() Master-WaitComplete & File-Ready & Slave-Editing 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Summary Proposed metamodel extension Collaborations model run-time system Collaborations model open systems ClassifierRole defined in terms of Collaboration instance Separation of concern: Horizontal: Subsystem object grouping Vertical: Collaboration on behavior VirtualRole: package of ClassifierRole Virtual Interaction: Comment Collaboration specifies system behavior Proposed metamodel extension 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Metamodel extension for Instance Level Collaboration classifier GeneralizableElement Namespace Classifier (from Core) 1..* (from Core) (from Core) 1..* base * ClassifierRole SpecificationCollaboration 1 ownedElement (from Collaborations) (from Collaborations) 1..* multiplicity: Multiplicity 1 ModelElement (from Core) * * 1..* Instance * InstanceCollaboration (from Common Behavior) instance (new) roleInstance 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

Metamodel extension for OCL Definition of Collaboration context InstanceCollaboration inv: self.specificationCollaboration.ownedElement-> forAll( c : ClassifierRole | c.instance->select(i : Instance | self.roleInstance->includes(i))->size <= 1) My thanks to Jos Warmer 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration

THANK YOU 1/15/2019 Trygve Reenskaug: Semantics of UML Collaboration