6. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 6
OMG的UML认证
Examination Number: .... OMG-OCUP2-FOUND100
Duration: ........................ 120 minutes for residents of English-speaking countries; 150 minutes for all others
Exam Fee ...................... US$200 (or local equivalent) for residents of English-speaking countries; US$210 (or local equivalent) for all others.
Minimum Passing Score: 60 items correct out of 90
Prerequisites: ................ None
7. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 7
OMG的UML认证
Examination Number: .... OMG-OCUP2-FOUND100
Duration: ........................ 120 minutes for residents of English-speaking countries; 150 minutes for all others
Exam Fee ...................... US$200 (or local equivalent) for residents of English-speaking countries; US$210 (or local equivalent) for all others.
Minimum Passing Score: 60 items correct out of 90
Prerequisites: ................ None
Why We Model
Many domains construct or use models, including those listed on the
entrance page to this certification program. This section surveys the
types of models they use, and the benefits they obtain.
15%
Interpretation and Construction of UML Models and Diagrams:
Interpretation and construction of the UML Diagrams listed here,
using the model elements listed below:
The Class Diagram 25%
The Object Diagram 5%
The Package Diagram 5%
The Use Case Diagram 5%
The Activity Diagram 20%
The Sequence Diagram 15%
The State Machine Diagram 10%
Total 100%
STRUCTURAL
DIAGRAMS:Common
Structure
• Type
• Dependency
• Namespace
• VisibilityKind (public,
private, protected)
• MultiplicityElement
• Constraint
• Comment
• PackageImport
Packages
• Package
Simple Classifiers
• PrimitiveType
• DataType
• Enumeration
• EnumerationLiteral
• Interface
• InterfaceRealization
• Signal
• Reception
Structured Classifiers
• Association
• Class
BEHAVIORAL DIAGRAMS:Use
Cases
• UseCase
• Actor
• Include
Interactions
• Interaction
• OccurrenceSpecification
• ExecutionSpecification
• ExecutionOccurrenceSpecification
• DestructionOccurrenceSpecification
• Lifeline
• Message
• MessageOccurrenceSpecification
• MessageSort
• MessageEnd
Common Behavior
• CallEvent
• SignalEvent
• Trigger
• OpaqueBehavior
Activities
• Activity
• ActivityFinalNode
• ControlFlow
• InitialNode
8. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 8
OMG的UML认证
Examination Number: .... OMG-OCUP2-FOUND100
Duration: ........................ 120 minutes for residents of English-speaking countries; 150 minutes for all others
Exam Fee ...................... US$200 (or local equivalent) for residents of English-speaking countries; US$210 (or local equivalent) for all others.
Minimum Passing Score: 60 items correct out of 90
Prerequisites: ................ None
Why We Model
Many domains construct or use models, including those listed on the
entrance page to this certification program. This section surveys the
types of models they use, and the benefits they obtain.
15%
Interpretation and Construction of UML Models and Diagrams:
Interpretation and construction of the UML Diagrams listed here,
using the model elements listed below:
The Class Diagram 25%
The Object Diagram 5%
The Package Diagram 5%
The Use Case Diagram 5%
The Activity Diagram 20%
The Sequence Diagram 15%
The State Machine Diagram 10%
Total 100%
STRUCTURAL
DIAGRAMS:Common
Structure
• Type
• Dependency
• Namespace
• VisibilityKind (public,
private, protected)
• MultiplicityElement
• Constraint
• Comment
• PackageImport
Packages
• Package
Simple Classifiers
• PrimitiveType
• DataType
• Enumeration
• EnumerationLiteral
• Interface
• InterfaceRealization
• Signal
• Reception
Structured Classifiers
• Association
• Class
BEHAVIORAL DIAGRAMS:Use
Cases
• UseCase
• Actor
• Include
Interactions
• Interaction
• OccurrenceSpecification
• ExecutionSpecification
• ExecutionOccurrenceSpecification
• DestructionOccurrenceSpecification
• Lifeline
• Message
• MessageOccurrenceSpecification
• MessageSort
• MessageEnd
Common Behavior
• CallEvent
• SignalEvent
• Trigger
• OpaqueBehavior
Activities
• Activity
• ActivityFinalNode
• ControlFlow
• InitialNode
参考资料
UML 2.0 in a Nutshell
Dan Pilone, Neil Pitman - O'Reilly Media, 2005 [ISBN 978-0-596-00795-9]
UML 2 for Dummies
Michael J Chonoles, James A. Schardt - Wiley, 2003 [ISBN 978-0-7645-2614-5]
IBM Software Group, The Value of Modeling Also available as pdf.
Joshua M. Epstein, Why Model?
Business Modeling: A Practical Guide to Realizing Business Value
Rebecca Wirfs-Brock, Why Domain Modeling, blog posting, Feb 2013. Wirfs-Brock, a pioneer in object-
oriented design, writes in this post about the value of domain modeling.
J.D. Baker, Model Organization with Packages and the Package Diagram, White Paper, May 2013.
Filip Stachecki, Concurrency in UML, White Paper, March 2014. Various Authors, What's New in UML
2.5 (White Paper, Coming Soon)
Unified Modeling Language (UML), V2.5
10. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 10
OMG的UML认证
Exam Number: .............................. OMG-OCUP-200
Duration: ........................................ 90 minutes (70 questions)
Minimum Passing Score: .......... 31
Exam Fee: ..................................... US$200 (or equivalent in local currency)
Prerequisite: ................................ Passing Score on OCUP Fundamental Exam
COVERAGE TABLE - INTERMEDIATE
Composite Structure Diagrams (Intermediate) .......... 15%
Component diagrams (Basic)........................................ 15%
Action Model (Intermediate)............................................. 10%
Activity Diagrams (Intermediate)..................................... 15%
Interaction Diagrams (Intermediate)............................. 15%
State Machines (Behavioral)........................................... 15%
Deployment diagrams (basic, without Components) ..... 5%
Profiles................................................................................ 10%
Total .............................. 100%
Topic Area Details
1.0 Composite Structure Diagrams (Actions, Ports, and Structured Classes)
Covers this material from Chapter 9 Composite Structures:
1.1 Demonstrate the ability to understand internal structures.
Composite Structures::Internal Structures
1 Structured classifier (Figure 9.2)
2 Connectors (Figure 9.3)
1.2 Verify the understanding of modeling ports.
CompositeStructures::Ports
1 Port (Figure 9.4)
2 Connector End (Figure 9.4)
1.3 Verify the understanding of structure class.
CompositeStructures::StructuredClasses
1 Class (from StructuredClasses) (Figure 9.5)
1.2 Verify the understanding of modeling invocations
CompositeStructures::InvocationActions
1 Invocation Action (Figure 9.8)
2 Trigger (Figure 9.8)
2.0 Component Diagrams (Basic)
Covers this material from Chapter 8 Components:
2.1 Confirm the ability to understand and represent basic components
Components::BasicComponents (Figures 8.2 and 8.3)
1 Component (without Packaging) (Sec. 8.3.1)
2 Connector (for components) (Sec. 8.3.2)
3 Realization (for components) (Sec. 8.3.3)
4 Other Basic Component concepts
3.0 Action Models (Intermediate)(Basic Actions in Activity Diagrams)
Covers this material from Chapter 11 Actions:
3.1 Demonstrate intermediate knowledge and comprehension of the UML Action Language
11. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 11
OMG的UML认证
UML 2 Certification Guide
Fundamental and Intermediate Exams
Tim Weilkiens
Bernd Oestereich Morgan Kaufmann OMG Press 2006
Can I study for the OCUP 2 Foundation exam using
the Certification Guide written for the original OCUP
Fundamental? In a word,No. The two exams are very
different - while the original restricted itself to UML syntax
and semantics (including the UML metamodel), the OCUP
2 Foundation exam tests UML usage in the context
of modeling and this aspect is not presented in the study
guide. Study from one of the books just mentioned or
another good book about UML modeling, and explore the
ways you can control the listed UML elements in your
modeling tool. Learn how to use, or recognize and
interpret, these elements in larger diagrams and how they
can relate to each other. We based the new examination
on these aspects of UML because they are the ones that
you will use in your career as either a model builder or a
model user. If you concentrate on the material presented
in the original OCUP Certification Guide, you will be
unprepared for the new OCUP 2 exam.
12. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 12
OMG的UML认证
The use case diagram is a
a) behavior diagram.
b) interaction diagram.
c) structure diagram.
d) context diagram.
e) requirements diagram.
Which statement(s) about DataTypes is/are correct?
a) A DataType has no attributes.
b) A DataType has no operations.
c) Instances of a DataType are different even if their attribute
values are equal.
d) A DataType is a specialized class.
e) An instance of a DataType has no identity.
图片来自UML 2.5 Figure 14.2 (p. 316)
50. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 50
UML 2.5 规范中的不足
• 对象图缺乏清晰的定义
– 1.5有定义:"a graph of instances, including objects and data values. A static object
diagram is an instance of a class diagram; it shows a snapshot of the detailed state of a
system at a point in time."
– 2.4之后再无定义,只是提到:"the following nodes and edges are typically drawn in
an object diagram: Instance Specification and Link (i.e., Association).“
– 有的“权威”的UML来源还提到只包含实例规约的组件图和部署图也是一种对象
图(令人费解)
• 转变(Transition)的重定义约束和规则未提及guard,也未有相关示
例,导致在重定义中对guard的处理不明确
51. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 51
UML 2.5 规范中的不足
• 包合并
– 属性合并:规范中前提要求两个匹配属性的isUnique的值相同(约束第2条);但
在转换实施规则的第7条却又无视上述约束,貌似两个匹配属性的isUnique的值可
以不同,这做如何解读?
– 枚举合并:枚举的合并在约束上提到了顺序的相关性,既然约束中提到了顺序,
那就是说顺序是有意义的,那么不匹配的字面量以何种顺序被包含进来呢?考虑
如下的情况:枚举E1: {A, B, C, E},枚举E2: {A, C, D, F},E1和E2的合并结果中E、D、
F的顺序如何?
CONSTRAINTS: 2 The value of isUnique of matching Properties must be the same.
TRANSFORMATIONS: 7 For matching Properties: if either the merged and/or receiving elements have isUnique
= false, the resulting element has isUnique = false; otherwise, the resulting element has isUnique = true.
CONSTRAINTS: 1 Matching EnumerationLiterals must be in the same order.
52. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 52
UML 2.5 规范中的不足
• 包合并
图片选自UML2.5 Figure.12.6, 12.7 (p. 248)
“The expressions in square brackets indicate
which individual elements were merged to produce
the final result, with the “@” character denoting the
conceptual merge ‘transformation’ as an operator,
where X@Y signifies the resulting element from the
merge transformation applied to matching receiving
element X and merged element Y. ”
55. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 55
UML 2.5 规范中的不足
• 错误
A ReduceAction can be used to reduce a list of numbers to the sum of
the numbers. Such a ReduceAction has one InputPin for a collection of
numbers, one OutputPin for a number and an addition function as the
reducer Behavior. For example, suppose the input collection has four
integers: (2, 7, 5, 3). The result of applying the ReduceAction to this
collection with an addition function is 11. With the default of
isOrdered=false, this can be computed in a number of ways, for example,
(((2+7) + 5) + 3), (2 + (7 + (5 + 3))), ((2 + 7) + (5 + 3)).
选自:UML 2.5 p. 485 16.13.5 对ReduceAction的示例
“
”
67. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 67
应用中的UML
• 对模型管理/演化支持不足
– FIESE, Software Architecture Documentation for Developers: A Survey, ECSA 2013
• 1 Architecture documentation is often not up-to-date and thus strongly lacks utility.
• 3 Architecture documentation is often nconsistent. Inconsistency comes in different forms
like inconsistent structure in and across documents, inconsistent notations, or contradicting
information.
68. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 68
应用中的UML
• 对模型管理/演化支持不足
– 管理/成本问题?技术问题?
• 简单线框图?
• 只关注高层(见右图,图片来自Michael Keeling.
Architecture Haiku-A Case Study in Lean
Documentation. IEEE Software, 2015, 32(3):35-39)
• ......
No one solution fits all!
69. 周进刚 UML 2.5杂谈
UMLChina讲座 2015.11.03 Slide 69
Questions?
1. http://www.uml-diagrams.org/
2. UML Professionals Group in LinkedIn :
http://www.linkedin.com/grp/home?gid=1330747
3. MDA Group in LinkedIn: http://www.linkedin.com/grp/home?gid=50539