107
Budapest University of Technology and Economics Department of Measurement and Information Systems Modeling Requirements Critical Embedded Systems Dr. Balázs Polgár Prepared by Budapest University of Technology and Economics Faculty of Electrical Engineering and Informatics Dept. of Measurement and Information Systems © All rights reserved. This material can only used by participants of the course.

UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

  • Upload
    others

  • View
    21

  • Download
    0

Embed Size (px)

Citation preview

Page 1: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Budapest University of Technology and Economics Department of Measurement and Information Systems

Modeling Requirements

Critical Embedded Systems Dr. Balázs Polgár

Prepared by Budapest University of Technology and Economics Faculty of Electrical Engineering and Informatics Dept. of Measurement and Information Systems

© All rights reserved.

This material can only used by participants of the course.

Page 2: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Overview

UML & SysML Overview

Modeling Textual Requirements

Modeling Requirements with Use Cases

Modeling Flow Based Behavior with Activities

2

Page 3: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

UML & SysML Overview

UML Overview

SysML Overview

Page 4: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

UML Overview Unified Modeling Language

o An OMG (Object Management Group) standard

1.x series o 1997 – Initial version (v1.1 – first adopted version)

• by James Rumbaugh, Grady Booch, Ivar Jacobson at Rational

o 2000 – v1.3, v1.4 o 2003 – v1.5

2.x series o 2005 – v2.0 o 2007 – v2.1.2 o 2009 – v2.2 o 2010 – v2.3 o 2011 – v2.4.1 o 2012 – v2.5 – „In Process”

4

Page 5: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Related Standards MOF – Meta Object Facility Core

o 2011 – v2.4.1 o Modeling language for defining modeling languages

OCL – Object Constraint Language o 2012 – v2.3.1 o Textual language for formulating constraints and queries over models

fUML – Foundational UML o 2013 – v1.1 o Semantics of a Foundational Subset for Executable UML Models

ALF – Action Language for Foundational UML o 2012 – v1.0.1 Beta3 o Concrete Syntax for a UML Action Language

XMI – XML Metadata Interchange o 2011 – v2.4.1 o XML representation of models

DD – Diagram Definition o 2012 – v1.0 o for modeling and interchanging graphical notations

5

Page 6: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

UML Diagram Taxonomy

6

Page 7: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

UML & SysML Overview

UML Overview

SysML Overview

Page 8: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Systems Engineering Systems Engineering is a multidisciplinary approach to

develop balanced system solutions in response to diverse stakeholder needs

~ Integration Engineering o Software engineering o Hardware engineering o Mechanical engineering o Safety engineering o Security engineering o ...

~ Process Engineering System

o Military, airplane, car, aviation, railway interlocking, notebook, etc.

8

Page 9: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

SysML overview

„UML for Systems Engineering” o Supports the specification, analysis, design, verification

and validation of systems that include hardware, software, data, personnel, procedures, and facilities

Developed by OMG and International Council on Systems Engineering (INCOSE)

OMG SysML™ (http://www.omgsysml.org) o RFP – March 2003

o Version 1.0 – September 2007

o Version 1.1 – November 2008

o Version 1.2 – June 2010

o Version 1.3 – June 2012

9

Page 10: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Relationship Between SysML and UML

UML 2

UML 2

Reuse

(1, 2)

UML

reused by

SysML

UML

not required

by SysML

(UML -

UML4SysML)

SysML

extensions to

UML

SysML

10

UML4SysML

SysML Profile

Page 11: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

SysML Diagram Taxonomy

11

Page 12: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Aspects of SysML

12

Page 13: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

A Simplified System Modeling Process

13

Page 14: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Textual Requirements

Context of the Modeling Aspect

Sample Requirements (Cyber-physical Agricultural System)

Modeling Elements & Notation

Summary

Page 15: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Roots & Relations

Document based system development

o Formulated requirements textually (e.g. in Word)

o Handled by Req. management tools (e.g. DOORS)

o Challenge: complexity

15

Page 16: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Requirements Diagram

16

Page 17: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

System Modeling Process

17

Page 18: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Aspect

What are the main requirements formulated textually and what are their hierarchy?

18

Page 19: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Objectives

Provides linkage between traditional textual and model based requirements specifications

Helps establishing relations between requirements

o Containment hierarchy

o Derivation

o Reusing between projects

Provides traceability of requirements

19

Page 20: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Textual Requirements

Context of the Modeling Aspect

Sample Requirements (Cyber-physical Agricultural System)

Modeling Elements & Notation

Summary

Page 21: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Cyber-physical system

American terminology

o Novel buzz-word for embedded system

o In EU it is ~ „Internet of things”

„ Cyber-Physical Systems (CPS) are engineered systems comprising interacting physical and computational components. In CPS, computation and communication are deeply embedded in and interacting with physical processes to add new capabilities and characteristics to physical systems.”

E.g., acoustic sniper detection system

21

Page 22: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example requirements Design a simple Cyber-physical agricultural system (CPAS), which helps a farmer with his/her everyday life using sensors to measure the environment and react to its changes by using automated operations like irrigation, mowing and spraying.

Requirements The CPAS system is capable of measuring the environment through its sensors. The CPAS uses the following sensors: temperature, humidity, luminance, rain. The CPAS can execute operations to change its surrounding environment. These operations can be mowing, irrigation and spraying. The mowing operation signals the robot mower to execute its programmed task. If the mower robot executes its task without any problem it returns to its

refueling station. If the mower robot fails to complete its task, it sends a notification about its

status

22

Page 23: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example requirements (con’t) The irrigation operation simply activates the pre-installed irrigation-

system. If the irrigation-system fails, it sends a notification about its status. Whenever a notification arrives the CPAS signals the farmer based on the

configured communication mean. The spraying operation signals the laborers to execute the spraying task. The laborers report to the CPAS when they finished their task. In case an error occurs during the spraying the laborers submit a form to

the CPAS and it notifies the farmer. The farmer can configure the system, when to activate its operations

based on its sensor inputs. The farmer can shut down the CPAS system that immediately stops all of

its active operations. The system shall provide diagnostic information about its components for

maintenance.

23

Page 24: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Textual Requirements

Context of the Modeling Aspect

Sample Requirements (Cyber-physical Agricultural System)

Modeling Elements & Notation

Summary

Page 25: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example – Top Level Requirements

25

Requirement Name

Id

Text Requirement

decomposition

Page 26: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example – Further Decomposed

26

Page 27: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example – Full Hierarchy

27

Page 28: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Requirements Table

28

Page 29: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Requirements Trace Relations Refine

o Depicts a model element that clarifies a requirement o Typically a use case or a behavior

Satisfy o Depicts a design or implementation model element that satisfies the

requirement

Verify o Used to depict a test case that is used to verify a requirement

Derive o Used when a requirement is derived from another requirement based on

analysis o Typically at the next level of the system hierarchy

Copy o Supports reuse by copying requirements to other namespaces o Master-slave relation between requirements

Trace o General trace relationship o Between requirement and any other model element

29

Page 30: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example refine relationship

30

Direct notation

Compartment notation

Callout notation

Page 31: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example trace relationships

31

Page 32: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Requirements Relations in Table

32

Page 33: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Textual Requirements

Context of the Modeling Aspect

Sample Requirements (Cyber-physical Agricultural System)

Modeling Elements & Notation

Summary

Page 34: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Summary

Goal o Bridge the gap between textual requirements and

requirement and design models • Handles textual req.s as model elements

• Provides support for requirements traceability

Modeling aspect oWhat are the main requirements formulated textually

and what are their hierarchy?

Relation of requirements to other aspects o Refined by model elements (e.g. use case, activity)

o Satisfied by blocks

o Verified by test cases

34

Page 35: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Requirements with Use Cases

Context of the Modeling Aspect

Elements of Use Case Diagrams by Example

Relations between UC elements

Summary

Page 36: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Use Case Diagrams

36

Page 37: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

System Modeling Process

37

Page 38: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Aspect

Who will use the system and for what?

38

Page 39: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Definition of Use Cases

Use cases (használati eset) capture the functional requirements of a system

UCs describe o the typical interactions

o between the users of a system and

o the system itself,

o by providing a narrative of how a system is used

A set of scenarios tied together by a common user goal

Its definition comes from o Either directly from the written requirement Verb + Noun (Unique)!

o Based on the Requirement diagram + System context definition refinement

M. Fowler: UML Distilled. 3rd Edition. Addison-Wesley

39

Page 40: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Relations to other aspects

Refines textual requirements

Can be further refined by behaviors (e.g. activity)

40

Page 41: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Requirements with Use Cases

Context of the Modeling Aspect

Elements of Use Case Diagrams by Example

Relations between UC elements

Summary

Page 42: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example requirements Design a simple Cyber-physical agricultural system (CPAS), which helps a

farmer with his/her everyday life using sensors to measure the environment and react to its changes by using automated operations like irrigation, mowing and spraying.

Requirements o The CPAS system is capable of measuring the environment through its

sensors. o The CPAS uses the following sensors: temperature, humidity, luminance,

rain. o The CPAS can execute operations to change its surrounding environment. o These operations can be mowing, irrigation and spraying. o The mowing operation signals the robot mower to execute its programmed

task. o If the mower robot executes its task without any problem it returns to its

refueling station. o If the mower robot fails to complete its task, it sends a notification about its

status

42

Page 43: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example requirements (con’t) Requirements

o The irrigation operation simply activates the pre-installed irrigation-system.

o If the irrigation-system fails, it sends a notification about its status. o Whenever a notification arrives the CPAS signals the farmer based on

the configured communication mean. o The spraying operation signals the laborers to execute the spraying

task. o The laborers report to the CPAS when they finished their task. o In case an error occurs during the spraying the laborers submit a form

to the CPAS and it notifies the farmer. o The farmer can configure the system, when to activate its operations

based on its sensor inputs. o The farmer can shut down the CPAS system that immediately stops all

of its active operations. o The system shall provide diagnostic information about its components

for maintenance.

43

Page 44: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Initial set of Activities

44

Page 45: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Definition of Actors Actor (aktor) is a role that a user plays with respect to

the system. o Primary actor: calls the system to deliver a service o Secondary actor: the system communicates with them while

carrying out the service Relationship of UCs and Actors

o A single actor may perform many use cases; o A use case may have several actors performing it.

One person may act as more than one actor, o Example: The farmer may also act as a laborer who performs

the spraying An actor is outside the boundary of the system Its definition comes from

o Directly from the written requirements o Based on the System context definition

45

Page 46: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

(Initial) Collection of Primary Actors

46

Page 47: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

(Initial) Collection of Secondary Actors

Customized representation

Could use the UML actor visualization

instead!

47

Page 48: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Requirements with Use Cases

Context of the Modeling Aspect

Elements of Use Case Diagrams by Example

Relations between UC elements

Summary

Page 49: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

System-level overview (User)

49

Page 50: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

System-level overview (User)

System boundary

Association: actor initiates or participates in interaction

Actor

Same behavior!

50

Page 51: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Generalization of Actors (abstraction)

Actor Generalization (Inheritance)

Abstraction /refinement

51

Page 52: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

System-level overview (User)

52

Page 53: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

How to handle complex functionality?

Perform agr. tasks = •Measure the environment •Configure the system •Execute agr. operations •Shut down the system

53

Page 54: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Refinement with include relation

Base UC Included

UC

The included UC breaks down the complex core functionality into more elementary steps

Too general description

54

Page 55: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Generalization of UCs

Use Case Generalization (Inheritance)

What happens if • the irrigation operation fails?

55

Page 56: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Extend relationship

56

The extension UC Extends core functionality by handling unusual (exceptional) situation

Base UC

Extension UC

Page 57: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Summary: UC Relations

Association (Asszociáció)

o actor – use case

o the actor initiates (or participates in) the use of the system

Extend (Bővítés)

o use case – use case

o a UC may be extended by another UC (typically solutions for exceptional situations)

57

Page 58: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Summary: UC Relations

Generalization (Általánosítás)

o actor – actor

o use case – use case

o a UC or actor is more general / specific than another UC or actor

Include (Beszúrás)

o use case – use case

o a complex step is divided into elementary steps

o a functionality is used in multiple UCs

58

Page 59: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Complete ‘Perform agr. task’ UC refinement

59

Page 60: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Requirements with Use Cases

Context of the Modeling Aspect

Elements of Use Case Diagrams by Example

Relations between UC elements

Summary

Page 61: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Summary

Goal

o Identify top level functional requirements

o Identify involved actors

Modeling Aspect

o Who will use the system and for what?

Relations to other aspects

o Refines textual requirements

o Can be refined by other behaviors (e.g. activity)

61

Page 62: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Flow Based Behavior with Activities

Context of the Modeling Aspect

Modeling Elements & Notation

Semantics of the Model

Summary

Page 63: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Roots & Relations

Flow-sheets and flow-charts are used everywhere...

o Brainstorming

o Computer algorithms

o Business processes

63

Page 64: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Activity Diagram

64

Page 65: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

System Modeling Process

65

Page 66: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Aspect

What are the steps in a process?

What data flows in the process?

66

Page 67: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Objectives

Modeling behavior that specifies the transformation of inputs to outputs through a sequence of actions

Combined modeling of control flow and data flow in a process or workflow

Supporting the definition of high level processes o Elaboration of use cases, i.e. helps to define functional

requirements that system components or actors will perform

o Providing functional decomposition of the system

Supporting the definition of low level activities o Elaboration of behavior executed at given ‘points’ of the

system (e.g. reaction to an event)

67

Page 68: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Elaborates use cases

68

Page 69: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Flow Based Behavior with Activities

Context of the Modeling Aspect

Modeling Elements & Notation

Semantics of the Model

Summary

Page 70: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Control flow

70

Action in activity

Initial node

Activity final

Control flow

Fork

Join

Page 71: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Control flow with flow final

71

Flow final

Page 72: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Fork, join, decision, merge

72

Fork

Join

Decision

Merge

Page 73: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Action types

73

Primitive action node Primitive actions include object access, update and manipulation actions.

Send signal node Send signal data to target.

Accept event node Accept events, typically has output pins for received data.

Accept time event node Time event corresponds to an expiration of an (implicit) timer.

Call behavior node Call other behavior (e.g. another activity).

Page 74: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Combined control and data flow

74

Pin

Object Parameter of activity

Object flow

Page 75: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Object nodes

75

Object node Datastore

Central buffer

Page 76: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Activity decomposition

76

Page 77: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Activity Hierarchy (Functional Decomposition)

77

Page 78: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Allocating actions

78

Allocation partition Represented block

Page 79: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modelling Streams (SysML)

79

Activity parameter

Discrete flow

Flow rate

Stream

Pin

Discrete flow

Page 80: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Interruptible Activity Region

80

Interruptible activity region

Signal reception

Interrupting edge

Page 81: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Flow Based Behavior with Activities

Context of the Modeling Aspect

Modeling Elements & Notation

Semantics of the Model

Summary

Page 82: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Data flow and Control flow

Combined control and data flow model o semantics dataflow networks

Data Flow: data token o Object node Action node

• An object node is a channel / queue

• An object may be linked to multiple action nodes

• Output actions are competing for the data token (i.e. the object)

o Type conformance: object type < input type of action

Control flow: control token (ordering constraint between two actions) o All predecessor actions should be terminated prior to starting

the current action

o The current action should terminate prior to starting any of the successor actions

82

Page 83: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Semantics: Dataflow Networks

o Tokens:

• control + several data

o Channel: object node

• Stores the tokens

o Node: action node

• Processing tokens

o Edges:

• Flow of tokens

• weights: how many tokens are in the flow at a time?

o Firing rule:

• Behaviour of a node

Node A

Node B

Channel (control)

Channel (data)

Node C

2 Control

token Data

tokens

Page 84: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Firing rule (cont.): o precondition:

• input tokens + current state

o postcondition

• output tokens + new state

Semantics: Dataflow Networks

Node A

OUT1 OUT2

IN2 IN1

Page 85: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Node A

OUT1 OUT2

IN2 IN1

Firing rule (cont.): o precondition:

• input tokens + current state

o postcondition

• output tokens + new state

Execution of a firing: o Is there token on all inputs with

• Right amount?

• Right type?

Semantics: Dataflow Networks

Page 86: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Node A

OUT1 OUT2

IN2 IN1

Firing rule (cont.): o precondition:

• input tokens + current state

o postcondition • output tokens + new state

Execution of a firing: o Is there token on all inputs with

• Right amount?

• Right type?

o Execution of action

Semantics: Dataflow Networks

Page 87: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Node A

OUT1 OUT2

IN2 IN1

Firing rule (cont.): o precondition:

• input tokens + current state

o postcondition

• output tokens + new state

Execution of a firing: o Is there token on all inputs with

• Right amount?

• Right type?

o Execution of action

o Sending the output tokens

Semantics: Dataflow Networks

Page 88: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

88

Page 89: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

89

Page 90: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

90

Page 91: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

91

Page 92: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

92

Page 93: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

93

Page 94: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

94

Page 95: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

95

Page 96: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

96

Page 97: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

97

Page 98: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

98

Page 99: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

99

Page 100: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

100

Page 101: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

101

Page 102: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

102

Page 103: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

103

Page 104: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

104

Page 105: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Example: Shutdown system

105

Page 106: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Modeling Flow Based Behavior with Activities

Context of the Modeling Aspect

Modeling Elements & Notation

Semantics of the Model

Summary

Page 107: UML & SysML Overview · UML Overview Unified Modeling Language o An OMG (Object Management Group) standard 1.x series o 1997 – Initial version (v1.1 – first adopted version) •by

Summary

Goal o Model transformation of input to output in processes

o Combined modeling of control and data flow

Modeling aspect o What are the steps in a process?

o What data flows in the process?

Relations to other aspects o Refines requirements, use cases and interactions

o Allocates activities to blocks

o Defines behavior of blocks, operations or in state machines

107