![]() |
![]() |
![]() |
![]() |
![]() |
Message Sequence Charts
A message sequence chart (MSC) is a high-level description of the message interaction between system components and their environment. A major advantage of the MSC language is its clear and unambiguous graphical layout which immediately gives an intuitive understanding of the described system behavior. The syntax and semantics of MSCs are standardized by ITU-T, as recommendation Z.120 [26].
There are various application areas for MSCs and within the system development process MSCs play a role in nearly all stages, complementing SDL on many respects. MSCs can e.g. be used:
- To define the requirements of a system
- For object oriented analysis and design (object interaction)
- As an overview specification of process communication
- For simulation and consistency check of SDL specifications
- As a basis for automatic generation of SDL skeleton specifications
- As a basis for specification of TTCN test cases
- For documentation
Plain MSC
The most fundamental language constructs of MSCs are instances (e.g., entities of SDL systems, blocks, processes and services) and messages describing the communication events, see Figure 627.
Another basic language construct is the condition symbol which is drawn as a hexagon. A condition describes either a global system state referring to all instances contained in the MSC, or a state referring to a subset of instances (a non-global condition). The minimum subset is a single instance.
An MSC can reference another MSC using an MSC reference symbol. (Such a symbol can also reference a High-level MSC, explained later.) This symbol is drawn as a rectangle with rounded corners and has the name of the associated MSC stated inside it. MSC references can for example be used to have one MSC describing an initialization sequence and then reference this MSC from a number of other MSCs.
The reference symbol may not only refer to an MSC but can also contain MSC reference expressions that reference more than one MSC. This construct gives us a very compact MSC representation and it also provides an excellent means for reusability of certain MSCs.
The textual MSC expressions are constructed from the operators alt, par, loop, opt and exc:
- An MSC reference with the keyword alt denotes alternative executions of MSC sections. Only one of the alternatives is applicable in an instantiation of the actual sequence.
- The par operation defines parallel executions for MSC sections. All events within the parallel MSC sections will be executed (free merge) with the only restriction that the event order within each section must be preserved.
- An MSC reference with a loop construct is used for iterations and can have several forms. The most general construct, loop<n,m>, where n and m are natural numbers, denotes iteration at least n and most m times. The operands may be replaced by the keyword inf, like in loop<n,inf>. This means that the loop will be executed at least n times. If the second operand is omitted, like in loop<n>, this will be interpreted as loop<n,n>. If both operands are omitted the interpretation will be loop<1,inf>.
- The opt operation is an operator with one operand only. It is interpreted in the same way as an alt operation where the second operand is an empty MSC.
- An MSC reference where the text starts with exc followed by the name of an MSC indicates that the MSC can be aborted at the position of the MSC reference symbol and instead continued with the referenced MSC. If the exception does not occur the events following the exc expression are executed. The exc operator can thus be viewed as an alternative where the second operand is the entire rest of the MSC. MSC references with exceptions are frequently used to indicate exceptional cases when using MSCs to formalize use cases.
By means of inline operator expressions composition of event structures may be defined inside an MSC. Graphically, the inline expression is described by a rectangle with dashed horizontal lines as separators. The operator keyword alt, loop, opt, par or exc, placed in the upper left corner, are used with the same meaning as when used together with the MSC reference symbol.
Whether to use inline operator expressions or MSC reference symbols with an operator is a matter of taste. The same things can be expressed with both notations. Using inline expression several scenarios can be expressed in one single diagram, i.e. we just have one single file to handle. If we use MSC reference symbols to express e.g. exceptions and alternatives there is a need for us to handle several files. On the other hand, the diagram becomes less cluttered if we refer to other MSCs instead of trying to express all possible scenarios in it.
For information about more plain MSC concepts, like e.g. timers, please consult the MSC standard Z.120.
HMSC
A high-level MSC (HMSC) provides a means to graphically define how a set of MSCs can be combined. Contrary to plain MSCs, instances and messages are not shown within an HMSC, but it focus completely on the composition aspects. You can get a picture of how an HMSC works in practice by comparing it with a road map. HMSCs, like normal road maps, may easily become quite complex if they are not structured in any way. Fortunately, HMSCs can be hierarchically structured, i.e. it is possible to refine HMSCs by other HMSCs. The power of the MSC language is considerably improved with the new concepts introduced with HMSCs. It is e.g. much easier to specify a main scenario together with all accompanying exceptions.
An HMSC is a directed graph where each node is either (see Figure 629):
- A start symbol which denotes the start of an HMSC (there is exactly one start symbol in each HMSC).
- A stop symbol which denotes the end of an HMSC.
- An MSC reference used to point out another (H)MSC diagram which defines the meaning of the reference. The reference construct in HMSC can thus be seen as a placeholder for an MSC diagram or another HMSC diagram. Like a reference symbol in a plain MSC, an MSC reference symbol in an HMSC can contain references to several (H)MSCs through using MSC reference expressions and the operators alt, par, loop, opt and exc.
- A condition symbol is used to set restrictions on how adjacent referenced MSCs can be constructed. An HMSC condition immediately preceding an MSC reference has to agree with the (global) initial condition of the referenced MSC according to name identification. All conditions on HMSC level are considered to be global, they refer to all instances contained in the MSC. They can be used to guard the composition of MSCs described by HMSCs.
- A connection point which denotes that two crossing lines are actually connected. This symbol has no semantic meaning but is introduced only to simplify the layout of the HMSC.
Flow lines connect the nodes in the HMSC and they indicate the sequencing that is possible among the nodes in the HMSC. If there is more than one outgoing flow line from a node this indicates an alternative.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |