Sets
Relations
Correspondences
Ordered Sets
Lattices
Graphs
Powersets
Binary Strings
Logic
AIA
Greek
Glossary
Abstracts
Argument
Inquiry Cycle
Legal Relations
Presentations
Elicitation
Glossaries
Goals
i*
SCR
Tracing
Design Patterns
Javadoc
Java Packages
Java Types
Figure 1. An MSC [from ITU1999-msc p.21]
A (basic) message sequence chart or MSC is a diagram that shows communications between system components (also called instances). Each vertical line in an MSC represents a system components, and horizontal arrows represent messages from one component to another.
It is a design-level notation, intended for and best suited for system design involving two or more subsystems; it is not particularly appropriate for system requirements.
There is also the high-level message sequence chart or hMSC, which gives the order in which some MSCs can occur.
An MSC shows the sequence in which some messages are sent among some components (sometimes called instances). The vertical line for each component/instance is its axis. The messages and components have to be defined elsewhere. Each message m has two instants in time: when it is sent by one component (out(m)) and when it is received by another (in(m)). The sequence is as follows:
Figure 2. Partial order of outs and ins in Figure 1
For example, in Figure 1
Figure 2 gives the partial order of message ins and outs in Figure 1.
Figure 1 also shows:
and instance end
symbols,
which mark the beginning and end of a description
(not the creation and destruction of the component described).
The instance's axis runs from the instance head to the instance end.
),
meaning that their input is unknown.
),
meaning that their output is unknown.
).
blocking one or more instance axes)
must be true for its axis or axes to proceed.
The condition that must be true is named in the lozenge shape.
A guarding condition is identified by the keywords
"condition when"'
such a condition must be true in order for its axes to proceed.
A setting condition,
identified by the keyword "condition",
is guaranteed to be true when its axes pass it.
)
is used to show timeouts or delays.
Figure 3. ATM [from Letier+Kramer+2005-mcsb p.387]
Figure 3 shows a user going through the beginning of an ATM withdrawal transaction. The diagram assumes that we have definitions of the components and messages, and simply gives the sequence of the messages. "User" is the user, "ATM" is the ATM, and "Bank" is the bank's database system with which the ATM communicates. The user inserts an ATM card, the ATM requests a PIN, the user enters a PIN; the ATM verifies the PIN with the bank's database. The "processing" message stands for the ATM showing a message saying it is processing the PIN. After the bank says the PIN is valid, the ATM presents the transaction choices ("option") and the user selects withdrawal. The ATM then asks for the amount to withdraw.
Although this MSC states that the ATM shows the "processing" message before the bank responds with "valid", in fact the implementation that the MSC describes cannot ensure this because the ATM doesn't control how quickly the bank responds. Granted, this is a fairly insignificant problem but is an example of how an MSC can state a property that the implementation it describes cannot guarantee.
Figure 4. hMSC relating four basic MSCs
A high-level message sequence chart or hMSC gives the sequence in which some basic MSCs can occur. An example is shown in Figure 4.
Figure 5. Sequence diagram
A UML sequence diagram or SD is similar to an MSC but written with a different notation. Presumably the same semantic issues arise, but possibly not since UML semantics are not well-defined. An example is shown in Figure 5.
The timelines are dotted rather than solid, and the name of the component is inside a box at the head of each timeline. The narrow rectangles apparently show when a component is active (unsure precisely what "active" means). An X on a timeline indicates that the component ceases to exist in some sense (unsure precisely how this is meant also). In the example, the Bank timeline has an X simply as an example (presumably the Bank does continue to exist).