Title: Systematic Modeling Process
1Topics
- Systematic Modeling Process
- Requirements Modeling
- Scenario Modeling
- Structure Modeling
- Behavior Modeling
2Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time
3Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time
4Where are we in our process?
Requirements
Use Case 1
Use Case 2
Use Case 3
Use Cases
Interaction Diagrams
Inter-Scenario Relationships
5Scenario Models
- Scenario models
- Model how objects interact with each other.
- Say little, if anything, about how objects
function the focus is on how objects react to
specific situations. - Have very good traceability to use-cases.
- Popular notations include
- UML Interaction Diagrams
- Sequence diagrams
- Collaboration diagrams
- Message Sequence Charts ITU Z.120
- Use-Case Maps
6Scenario-Driven Modeling
- Use-Case Maps (UCMs) and Collaboration diagrams
are very good at illustrating where things
happen. - UCM and Interactions diagrams are very good at
illustrating when things happen. - Given that UCMs are not supported by UML,
experienced designers may choose to develop
immediately interaction diagrams (such as MSCs).
7Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time
8Interaction Diagrams
- Interaction Diagrams are time graphs showing
interactions that take place among objects. - They can be simple, showing just events and
responses. - They can also show details down to procedure call
details and data transfer. - Interaction Diagrams can be embellished to show
method operations, communication details, object
states, concurrency, alternatives, constraints,
etc. - UML Sequence Diagrams and Message Sequence Charts
are two distinct forms of Interaction Diagrams. - UML Sequence diagrams use the same arrow notation
as UML collaboration diagrams
9A UML Sequence Diagram
10Showing Object States
Calling Party
Called Phone
Calling Phone
Network
onHook
idle
lift handset
offHook
offHook
dialTone
dialTone
States are not supported by all tools! They are
not included in UML 1.4
1
dialing
digits
digits
ring
ringTone
ringTone
alerting
offhook
stopRing
stopRingTone
stopRingTone
11Timers and Responsibilities
Called Phone
Calling Party
Calling Phone
Network
liftHandset
offHook
dialTone
lt 500 msec
dialTone
firstDigit
3
firstDigit
r1
This is a UML Note
silenceTone
silenceTone
2
digits
digits
lastDigit
lastDigit
ring
This could be a UML constraint
ringTone
ringTone
lt 120 sec
offhook
stopRing
stopRingTone
stopRingTone
12Setting Timers
Called Phone
Calling Party
Calling Phone
Network
liftHandset
offHook
dialTone
dialTone
lastDigit
lastDigit
ring
ringTone
ringTone
120 sec
Again, seldom drawable in a CASE tool!
4
13Iteration and Alternatives
Network
Phone
Caller Party
Phone
Called Party
lift handset
offHook
Caller lifts handset Network plays dial
tone Caller dials digits Network
alerts parties
dialTone
dialTone
digit
digit
tone(silence)
Tone(silence)
9
Poor mans iteration
(number complete) digit(d)
digit(d)
Ringcalled phone idle
ring
ringTonecalled phone idle
ringTone
busyTonecalled phone busy
10
Poor mans alternatives
busyTone
14Message Arrows
Event -synchronization unspecified or
unknown -flat sequencing (no nesting)
Proc. Call -synchronous,
can be nested -sender blocked, implicit
return Explicit Return (used with Proc.
Call) Asynchronous Call -sender does not block
(implies concurrency) -receiver must be an
active object
Object1
Object2
15Embellishments
- Embellishments to a Message Expression include
- Message numbering
- 1, 1.1, 1.1.1, 1.1.2
- Alternatives
- 1.1a, 1.1b, 1.1c
- Multiple Threads
- A1, A1.1, A1.1.1a, A 1.1.1b, B1, B2, B3, B3.1
16Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time
17Message Sequence Charts
- ITU Standard for system specification
- First standard version defined in 1993. This
version contained only basic MSC. - Second version accepted in 1996. This version
introduces HMSC and formal semantics. - Latest version in 2000. This version introduces
concepts and notations for large system
specification - Current version uses two different levels of
specification - Basic MSC
- High-Level MSC (or HMSC)
- MSC provides notation for alternatives,
concurrency, recursive definition, and structural
decomposition
18Basic MSC
msc S1
Instance (or component)
A
B
C
Condition (or state)
state1
Message
MSC Frame (environment)
Action
Call-return message
state2
19High-Level MSC
Start
Condition (or state)
MSC Reference
End
20Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time
21Use Case Maps
- Notation developed at Carleton University by Ray
Buhr, colleagues and students - UCM allows
- Definition of scenarios at an abstract level
(before inter-component messaging is defined) - Superimposition of scenarios on system structure
- Combination of sets of scenarios in a single
diagram - Description of system dynamics both at the
component level and at the scenario level - UCM are being standardized within ITU as a
requirements notation - UCM website www.usecasemaps.org
22Basic UCM Notation
responsibilities
r1
r3
r2
start point
end bar
path segment
23Waiting Places and Stub
Waiting Place
Timed waiting place, or timer
normal path
timeout path
UCM provides a path abstraction mechanism called
stub
24Bound UCM
UCM allows describing scenarios in the context of
component structures
r3
r1
r2
25Bank Machine UCM
Enter bankcard
Swallow bankcard and read card info
Initiate transaction
Eject bankcard
Validate PIN
Bankcard returned
Get PIN
Execute transaction
Choose transaction
Print receipt
26Responsibility Allocation
card reader
central controller
x
x
x
user interface
x
x
x
printer
x
27Path Segment Connectors
Path Segment Connectors
Combination of Segment Connectors
28Related Paths Set
Group together in logical unit a main path with
the set of its alternatives
29Bank Machine UCM
Card invalid
card reader
x
central controller
x
x
user interface
x
x
Incorrect PIN
x
Transaction Rejected
printer
x
30Path Interaction Notation
31More Complex UCM
32Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time
33From Use Cases to Sequence Diagrams
Requirements
Use Case 1
Use Case 2
Use Case 3
Use Cases
Interaction Diagrams
System Model Capsule diagrams Statechart
Inter-Scenario Relationships
34Use-case Driven Scenario Modeling
- We must document the sequences of messages (or
equivalently operations) that correspond to our
use-cases. - Dont forget scenario interactions!!!
- The messages between objects typically form a
superset of system responsibilities obtained in
HDL we are working out the details. - Be careful that all instances of a class
consistently use the responsibilities/operations
of this class across the set of interaction
diagrams - Consistency, if not traceability, between
use-cases, structural models and scenario models
is essential. - If multiple perspectives are adopted, consistency
checking, traceability and class synthesis are
further complicated - How much detail to put in the specification of an
operation differs from one author to the other. - It is typical to keep an operation specification
fairly informal during high-level design and
postpone the details to DDL. - You must eventually work out the contract of an
operation. - We could even cross-reference operations to
events of the problem statement.
35From Use Cases to Sequence Diagrams
- In the transition between UC and SD, we create
one SD for each path identified in the UC - One SD for the main path
- One SD for each alternative path
- At the detailed level, we establish relationships
between - UC actors and SD external entities (I.e. frame of
the sequence diagram) - UC preconditions and postconditions and states in
SD - Use case triggering and resulting events and SD
messages - Use Case steps and sequences of SD messages
36Traceability between Use Case and Sequence Diagram
Caller lifts Handset Network plays dial
tone Caller dials digits Network
alerts parties Called party answers Network
stops alerting and connects bearer paths ...
37Scenario Modeling
Topics
- Scenario Modeling Overview
- UML Sequence Diagrams
- Message Sequence Charts
- Use-Case Maps
- From Use Cases to Sequence Diagrams
- Scenario Modeling in Rational Rose Real-Time