64
Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in this slide set is not contained in the 3 rd edition of the text book It is planned for the 4 th edition.

Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

Embed Size (px)

Citation preview

Page 1: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

Usi

ng

UM

L, P

atte

rns,

an

d J

ava

Ob

ject

-Ori

ente

d S

oftw

are

En

gin

eeri

ng

SysML:A Modeling Language

for Systems of Systems

Note to Instructor:

The material in this slide set is not contained in the 3rd edition of the text book

It is planned for the 4th edition.

Page 2: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

2© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

What is SysML?

• A graphical modeling language developed by the OMG• A UML profile that presents a subset of UML 2 with

extensions

• A modeling language for modeling “systems of systems”• Supports the development of complex systems

consisting of several systems• Model exchange via XMI

• Designed for model-based systems engineering (MBSE)

Page 3: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

3© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Relationship between SysML and UML• SysML is defined as an extension of a subset of the Unified

Modeling Language (UML) using UML's profile mechanism

• SysML is MOF compliantAll models (MOF)

UML models

CORBA models

(profile)

SysML models

.NET models(profile)

U2TP (profile)

UML 2

SysML Association

Classes

Class Diagrams

Use Case Diagrams

Requirements Diagrams

Parametric Diagrams

Page 4: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

4© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Model Based Systems Engineering (MBSE)• Model-based systems engineering (MBSE)• The formalized application of modeling to support system

requirements, design, analysis, verification, validation activities[INCOSE 2004]

• Advantages• Improved communications and knowledge management • Impact analysis of requirements and design changes• More complete representation

• A system engineering model contains several models addressing all aspects of the participating systems, hardware as well as software:• Functional model • Behavoral model (Dynamic model)• Structure model (Object model)• Cost model• Organizational model• Development environment, target environment

Page 5: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

5© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

A SysML Model contains several Models

Functional Model

Object (Structure) Model

Dynamic (Behavior) Model

Requirements

Other Models

Page 6: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

6© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

A SysML System Model containing many Models(ABS Example)

Page 7: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

7© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Diagram Frames

Activity diagram, block diagram, internal block diagram, sequence diagram

Page 8: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

8© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Diagram Taxonomy

Behavior

Structure

Requirements

Parametrics

Page 9: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

9© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Structural Diagrams

Requirements Diagrams

Page 10: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

10© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirements Diagram Elements: Nodes

Page 11: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

11© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Requirements Diagrams

• A SysML requirements diagram depicts the requirements in graphical, tabular or tree structure format

• Example: A Requirements Diagram in Visual Paradigm

Page 12: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

12© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirement Node (CASE tool:Visual Paradigm)

• A requirement node is a stereotype of a UML Class

• It has several attributes• Text: the description of the

requirement in natural language

• Id: Allows to number the requirement

• Source: Location, Stakeholder

• Kind: to categorize the requirement into Functional, Performance, Interface

• VerifyMethod: Analysis, Demonstration, Inspection, Test

• Risk: High, medium, low

• Status: Proposed, Approved, Rejected, Deferred, Implemented, Mandatory, Obsolete.

Page 13: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

13© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Visual Paradigm

• University License for Visual Paradigm Standard Edition

• Visual Paradigm Tutorials• http://www.visual-paradigm.com/product/vpuml/tutorials.jsp• Requirements Modeling with Visual Paradigm• http://www.visual-paradigm.com/product/vpuml/provides/reqmod

eling.jsp• On this URL you also find a tutorial movie about managing

SysML requirement diagrams.

Page 14: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

14© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Adding a Test Case Node (Visual Paradigm)

Page 15: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

15© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Adding more Requirements Nodes

Page 16: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

16© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Tabular Format of a Requirements Diagram

Page 17: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

17© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Page 18: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

18© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Dependency Relationships: Linking of Requirements

• Requirements can be linked to other requirements• Containment: The requirement contains several sub-requirements• Copy: One requirement is a read-only version of another

requirement• Derive: A requirement is derived from another requirement

• Requirement elements can also be linked to other model elements (in analysis and design models)• Refine: A model element refines a requirement• Verify: Another model element validates a requirement• Satisfy: Another model element satisfies a requirement

• Linking to Use Cases • Linking to Class diagrams

• Trace: Any model element that realizes a nonfunctional (performance) requirement.

Page 19: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

19© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirements Diagram Elements: Associations between Nodes • Requirement Containment Relationship

Page 20: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

20© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirements Diagram Elements: Associations between Nodes • Requirement Composition Relationship

Page 21: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

21© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirements Diagram Elements: Associations between Nodes • Requirement Composition Relationship

Page 22: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

22© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirements Diagram Elements: Associations between Nodes• Copy Dependency

• Derive Dependency

• Satisfy Dependency

The text of the Slave requirement is a read-only copy of the text of the Master requirement

A functional requirement derived from a business need or a test requirement is derived from a functional requirement

Example: A use case satisfies a functional requirement.

Functional Requirem

ent

Business Need

Page 23: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

23© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Example of a Copy Dependency (Reuse of Requirements)

Page 24: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

24© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Example of a Derive Dependency

• Based on the requirement specifications from the National Highway Traffic Safety Administration (NHTSA.)

• Excerpt of the original requirement text used to create the model:

Page 25: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

25© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Requirements Diagram Elements: Associations between Nodes

• Verify Dependency

• Refine Dependency

• Trace Dependency

Example: A test case validates a functional requirement

Example: A use case refines a requirement

Example: A use case can be traced to a requirement.

Page 26: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

26© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Callouts Or: How to avoid “Spaghetti” in Requirements Diagrams

Is equivalent to:

• TraceCallout

• Trace Dependency

Page 27: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

27© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Structural Diagrams

Package Diagrams

Page 28: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

28© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Package Diagram

Page 29: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

29© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Organizing a Model by Use Cases

Tim Weilkiens, Systems engineering with SysML/UML: modeling, analysis, design

Page 30: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

30© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML allows provide viewpoints for the stakeholders of a system

Organizing a Model by Stakeholders

Page 31: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

31© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Package Diagram: Views and ViewPoints

• A model usually focuses on one abstraction of the system (analysis, design, cost)

• A view provides a perspective that spans multiple abstractions. It includes (subgraphs) of other models

• The EngrAnalysis view, for example, includes the organization of the enterprise, the system model, logical design and allocated design

• The viewpoint lists the stakeholders and purpose of the view.

Page 32: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

32© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Structural Diagrams

Block Diagrams

Page 33: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

33© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Blocks: Basic Structural Elements

Page 34: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

34© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Blocks vs UML Classes

• SysML Blocks are based on UML classes• However the do not allow association classes• They distinguish between value properties from part properties• They allow nested connector ends

• There are two types of SysML block diagrams• Block definition diagrams (bdd) describing the relationship between

blocks (composition, association,…)• Internal block diagrams (ibd) describing the internal structure of a

single block in terms of its properties and connectors

• Behavior (activity diagrams, use cases) can be allocated to both types of block diagrams.

Page 35: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

35© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Block Diagrams

Anti-LockController

Block Definition Diagram

Internal Block Diagram

Page 36: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

36© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Internal Block Diagram: Blocks, Parts, Ports, Connectors and Flows

Page 37: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

37© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Reference Property vs Part

Page 38: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

38© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Ports

• 2 Port Types• Standard Port (also available in UML)

• Specifies a set of operations and/or signals

• Typed by a UML interface

• Flow Port• Specifies what can flow in or out of a block/part

• Typed by a flow specification.

Page 39: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

39© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Port Notation

Page 40: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

40© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Links between Requirements and Design

Page 41: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

41© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Behavioral Diagrams

Page 42: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

42© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Activities

• SysML activity diagram notation is the same as in UML

• SysML extensions to support• Continous flow modeling• Alignment of activities with Enhanced Functional Flow Block

Diagrams (EFFBD)

Page 43: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

43© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Activity Diagram Notation (UML, SysML)

Page 44: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

44© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Activity Diagrams also support Swim Lanes

SwimlaneTractionDetect

or

Swimlane BrakeModulato

r

Page 45: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

45© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Activities can consists of Subactivities

Block Definition Diagram

Activity Diagram

Page 46: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

46© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Interactions

• SysML sequence diagram notation is also the same as in UML • but SysML does not include timing diagrams and communications

diagrams

• SysML focuses on black and white box views of interactions with sequence diagrams.

Page 47: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

47© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Black Box Sequence Diagram (UML, SysML)

Page 48: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

48© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

StartVehicle: Black Box Sequence Diagram

Page 49: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

49© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

StartVehicle: White Box Sequence Diagram

Page 50: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

50© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML State Machines

• The same notation as in UML

Page 51: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

51© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Use Cases

• SysML use cases: Also no change from UML

Page 52: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

52© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Allocations

Page 53: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

53© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Allocations

Page 54: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

54© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Different Representations for Allocations

Page 55: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

55© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Additional Information[INCOSE 2004]

• Systems Engineering Vision 2020, International Council for Systems Engineering, Technical Report INCOSE-TP-2004-004-02, September 2004

• http://www.incose.org/ProductsPubs/pdf/SEVision2020_20071003_v2_03.pdf

[SysML Tutorial 2009] Sanford Friedenthal, Alan Moore, Rick Steiner• OMG Systems Modeling Language Tutorial,

• www.omgsysml.org/SysML-Tutorial-Baseline-to-INCOSE-060524-low_res. pdf

• This lecture is based on this tutorial

SysML Requirements Modeling with Visual Paradigm• http://www.visual-paradigm.com/product/vpuml/provides/reqmodeling.jsp

• Here you also find a movie about requirements diagrams

• Visual Paradigm Standard Edition for UML and SysML• Download Link: http://wwwbruegge.in.tum.de/static/vpapp/

• Unlimited Educational License, Key will be provided in the SE 1 forum

• Installed on all the computers at the chair for applied software engineering

• Unicase (Research Tool)• http://unicase.org• Open source. Masterthesis offered: Feature Modeling, a modeling

language replacing SysML

Page 56: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

56© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Backup Slides

Page 57: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

57© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Stereotypes and Model Libraries

Page 58: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

58© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Stereotypes

Page 59: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

59© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Applying a Profile and Importing a Model Library

Page 60: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

60© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Block Property Types

• Part Property• A Part is owned by a block (composition)• Example: Right-Front Wheel is part of the Vehicle block• The part stops existing, when the block stops existing

• Reference Property• A part is not owned by the enclosing block• Example: An interface between two parts

• Value Property• Allows to define a value with units, dimensions and even probability

distribution• Examples:

• Non-distributed value: tirePressure:psi=30

• Distributed value: <<uniform>> {min=28, max = 32} tirePressure:psi

Page 61: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

61© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

SysML Parametric Diagrams

Page 62: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

62© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

A SysML Model allows to include Physical Laws

Page 63: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

63© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

The Physical Laws can be used to constrain Value Properties in the SysML Model

Page 64: Using UML, Patterns, and Java Object-Oriented Software Engineering SysML: A Modeling Language for Systems of Systems Note to Instructor: The material in

64© 2009 Bernd Bruegge

Software Engineering I – WS2009/10

Allocation of Hardware to Software (-> Lecture on System Design, Topic Hardware-Software Mapping)