UML2.5: What is changed and what is unchanged.

15
2013/10/15 L3L4認定者の集い 吉田裕之 富士通株式会社 プリンシパルエンジニア UML2.5で変わったこと・変わらないこと ~よくわかるUML2.5のすべて~ Copyright 2013 FUJITSU LIMTED

description

UMTPの「L3・L4認定者の集い」でレクチャーしたものです。 1頁目に結論が書いてあって、おそらく95%の人は2頁目以降を読む必要が無いだろうと ^o^)

Transcript of UML2.5: What is changed and what is unchanged.

Page 1: UML2.5: What is changed and what is unchanged.

2013/10/15 L3・L4認定者の集い

吉田裕之

富士通株式会社

プリンシパルエンジニア

UML2.5で変わったこと・変わらないこと

~よくわかるUML2.5のすべて~

Copyright 2013 FUJITSU LIMTED

Page 2: UML2.5: What is changed and what is unchanged.

UML2.5で何が変わったのか?

1 Copyright 2013 FUJITSU LIMTED

表記方法は変わりません

メタモデルは変わりません

仕様書が読みやすくなりました

モデラーには影響無

ツールベンダーには影響無

みんなHappy♪

Page 3: UML2.5: What is changed and what is unchanged.

前提知識のおさらい

UMLはOMGが標準化しています

OMGの標準化はMDAに基いています(以前はOMA)

MDAとは要するに「UMLモデルで仕様定義すること」です (OMAは「CORBAインターフェースで仕様定義すること」でした)

∴UMLはUMLモデルで仕様定義しています

「モデルをモデル化」することを「メタモデル」と言います

OMGはメタモデル言語としてMOFを標準化しています

∴UMLとMOFはMOFで定義されています(?)

UMLとMOFは実質的に同じ言語なので、 UMLとMOFはUMLで定義されている、と言って正しいのです

Copyright 2013 FUJITSU LIMTED 2

Page 4: UML2.5: What is changed and what is unchanged.

UMLメタモデルの例

3 Copyright 2013 FUJITSU LIMTED

M2

RelationshipType TypedElement

Element

+type

0..1

+ownedAttribute

+class

0..1

+memberEnd2..*

+association

0..*Class Property Association

クラスは型の一種

クラスは0個以上の プロパティを属性に持つ

関連は2個以上の プロパティを端として持つ

プロパティには 型がある 関連は関係の一種

Page 5: UML2.5: What is changed and what is unchanged.

UML2.5の策定状況

Event Date Notes

Base document(s) UML Specification Simplification ad/2012-08-01

Voting List Deadline September 14, 2012

Beta 1 specification publication October 15, 2012 Relevant documents:

ptc/12-10-24 (UML 2.5 Beta 1 document)

FTF comments due June 10, 2013

FTF report due date August 26, 2013

FTF recommendation and

report deadline October 4, 2013

Relevant documents:

ptc/13-09-06 (UML 2.5 Specification with change

bars)

ptc/13-09-05 (UML 2.5 Specification without

change bars)

ptc/13-09-02 (UML 2.5 UPDATED RTF report)

ptc/13-08-17 (UML 2.5 FTF report - Machine

Consumable Files Archive)

ptc/13-08-14 (UML 2.5 FTF report)

Veto Power March 12, 2014

Copyright 2013 FUJITSU LIMTED 4

Page 6: UML2.5: What is changed and what is unchanged.

何が読みやすくなったのか?

~UML2.5仕様書「6.1 Specification Simplification」より~

2分冊が1冊になりました

PackageMergeを使うのをやめました

前方参照が無いように章の順序を変えました

各章の最後にクラス定義と関連定義を一覧する節を設けました

準拠レベルL0, L1, L2, L3をやめました

パッケージ構成を仕様書の章に合わせました

OCLを積極的に使って制約をきちんと書きました

そのためにすべての関連と関連端に曖昧性がない名前を付けました

デフォルト値がある場合の多重度を0にしました

LoopNode::loopVariableをコンポジット(◆)に変更しました

{ordered}をちゃんと書きました

Copyright 2013 FUJITSU LIMTED 5

Page 7: UML2.5: What is changed and what is unchanged.

2分冊が1冊に

Infrastructureが無くなった

Copyright 2013 FUJITSU LIMTED 6

Page 8: UML2.5: What is changed and what is unchanged.

PackageMergeとは

モデルを部品化して統合する方法

あちこちのパッケージで同じ名前のクラスを少しずつ定義して統合

Copyright 2013 FUJITSU LIMTED 7

Page 9: UML2.5: What is changed and what is unchanged.

Classifier(2.4.1)

Classifierの定義が7つのパッケージにあった

最終的にすべてのPackageをマージする

Copyright 2013 FUJITSU LIMTED

実は… InfrastructureでもClassifierは4つのパッケージで定義されていました。Kernelはそれらをマージしたものですが、Superstructure仕様書のKernelパッケージのページにはそれがすべて記載されています。つまり、Infrastrucure仕様書を読む必要が無いようになっているわけです。

8

Page 10: UML2.5: What is changed and what is unchanged.

ClassifierとClass(2.4.1 ⇒ 2.5)

Classifier

2.4.1の7つのPackageで定義 属性2個、関連14個、操作8個、制約7個。

2.5では9章Classification 9.2 Classifiersだけで定義 属性2個(ok)、関連14個(ok)、操作17個(+)、制約4個(-)

操作はOCLで使用。制約を英語ではなく積極的にOCLで定義するようになったため操作が増えている。

Class

2.4.1では5つのPackageで定義 属性1個、関連6個、操作1個、制約1個

2.5では11章Structured Classifiers 11.4Classesで定義 属性2個(+)、関連6個(ok)、操作3個(+)、制約1個(ok)

属性はisAbstructをClassifierから継承しつつ再定義

Copyright 2013 FUJITSU LIMTED 9

Page 11: UML2.5: What is changed and what is unchanged.

準拠レベルとは

2.4.1ではL0~L3の4つの準拠レベルを設定

L0:KernelとPrimitive Typesのみをマージ データ交換可能な最小モデル

L1:L0+11個のパッケージをマージ

クラス図、ユースケース図、シーケンス図、コミュニケーション図、アクティビティ図の基本

L2:L1+14個のパッケージをマージ

コンポジット構造図、コンポーネント図、配置図、ステートマシン図、プロファイル

L3:すべてのパッケージをマージ

2.5ではすべてのパッケージをUMLパッケージにインポート

すべてのクラスが、UMLパッケージ内でそのまま利用可能

Copyright 2013 FUJITSU LIMTED 10

Page 12: UML2.5: What is changed and what is unchanged.

パッケージ構成(2.4.1)

Kernelパッケージがinfrastructureのパッケージをマージして利用

依存関係はパッケージマージ

Copyright 2013 FUJITSU LIMTED 11

Page 13: UML2.5: What is changed and what is unchanged.

パッケージ構成=章の構成(2.5)

Common Structure

Root

Templates

Namespaces

Types and Multiplicity

Constraints

Dependencies

Values

Literals

Expressions

Time

Intervals

Classification

Classifiers

Classifier Templates

Features

Properties

Operations

Generalization Sets

Instances

Simple Classifiers

Data Types

Signals

Interfaces

Structured Classifiers

Structured Classifiers

Encapsulated Classifiers

Classes

Associations

Components

Collaborations

Packages

Packages

Profiles

Common Behavior

Behaviors

Events

StateMachines

Behavior StateMachines

StateMachine Redefinition

ProtocolStateMachines

Activities

Activities

Control Nodes

Object Nodes

Executable Nodes

Activity Groups

Actions

Actions

Invocation Actions

Object Actions

Link End Data

Link Actions

Link Object Actions

Structural Feature Actions

Variable Actions

Accept Event Actions

Structured Actions

Expansion Regions

Other Actions

Interactions

Interactions

Lifelines

Messages

Occurrences

Fragments

Interaction Uses

Sequence Diagrams

Communication Diagrams

Interaction Overview Diagrams

Timing Diagrams

UseCases

Use Cases

Deployments

Deployments

Artifacts

Nodes

InformationFlows

Information Flows

Primitive Types

Standard Profile

Copyright 2013 FUJITSU LIMTED 12

Page 14: UML2.5: What is changed and what is unchanged.

読みやすくなったのか?

2.4.1

Infrastructure仕様書:208+付録6ページ(表紙、目次、索引を除く)

Superstructure仕様書:690+付録34ページ

2.5

715+付録70ページ(増えてる!)

各章(付録も)の最後にあるクラス一覧・関連一覧が半分くらい?

Copyright 2013 FUJITSU LIMTED

いずれにしても 表記方法は変わらないので

我々モデラーには影響ありません (めでたし、めでたし)

13

Page 15: UML2.5: What is changed and what is unchanged.

14 Copyright 2010 FUJITSU LIMITED