![]() |
![]() |
![]() |
![]() |
![]() |
MSC Editor Specific Information
Pasting in MSC Diagrams
To paste, you select Paste from the Edit Menu. The rules for Paste will be described below.
When pasting the selection, the MSC Editor will process each individual object contained in the selection, adjust it to the grids if required and connect it, if feasible, to the "closest" object(s) in the drawing area.
If the MSC Editor fails in pasting some of the objects contained in the selection, the rest of the objects will nevertheless be pasted but without an error message being displayed.
Pasting of Multiple Objects
When pasting a selection that consists of multiple objects, the MSC Editor attempts, as long as feasible, to preserve the original appearance of the selection.
Pasting of Individual Objects
When pasting individual objects, the MSC Editor processes the objects as follows:
- Text
- Comment
- Instance head / Instance axis
- Instance end and Stop
- Message
- Message-to-self
- Condition and MSC Reference
- Timer
- A timer is connected to the closest instance axis. The "height" of the timer is preserved (see Message above).
- Action
- Create
- Coregion
- A coregion is connected to the closest instance axis, to the left or right. The "height" of the coregion is preserved (see Message above).
Adding Symbols
Adding an Instance Head Symbol
When you add an instance head symbol, an instance axis line is drawn that connects the symbol to the bottom of the drawing area. The instance axis line cannot be drawn manually. It will be truncated or elongated when you add or move an instance end or stop symbol upwards or downwards. See Adding an Instance End Symbol and Adding a Stop Symbol.
The instance head symbol has three text fields:
- The instance name field
- The instance kind field
- The decomposition field. See Figure 310.
- The ITU recommendation Z.120 discusses several ways of using the instance name and instance kind text fields. In the MSC Editor, the text fields are used as follows:
- Basically, the instance kind reflects what kind of instance is represented. That is, an identifier which reflects the name of the corresponding SDL block/service/process/procedure; and an optional identifier which identifies if it is a block, a service or a process (the kind denominator).
- The instance name reflects the current function of the instance.
- The instance decomposition shows if the instance is in turn decomposed as a sub MSC. This text field is by default empty, but can contain the text decomposed or decomposed as <diagram name> to indicate that the instance is in turn decomposed. To decompose an instance, you select Decompose from the Edit menu.
Adding a Condition, MSC Reference or Inline Expression Symbol
A condition or MSC reference 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 or MSC reference). The minimum subset is a single instance.
For two MSCs, the second is a continuation of the first if its initial global condition is identical to the final global condition of the first. Identifying an intermediate global condition can be used when breaking down an MSC into two parts.
By means of non-global conditions, combinations of MSCs with different sets of instances can also be defined. The continuation then refers only to the common subset of instances.
The following general rule applies to the continuation of two MSCs (MSC1 and MSC2, with a non-empty common set of instances).
MSC2 is a continuation of MSC1 if, for each instance which both MSCs have in common:
- MSC1 ends with a (non)global condition
- MSC2 begins with a corresponding1 (non)global condition
- Each (non)global condition of MSC2 has a corresponding (non)global condition in MSC1.
An inline expression symbol is always global and connected to all instances. The inline expression symbol is created from two inline expression symbol parts:
- The inline expression symbol starts a new inline expression symbol. The inline expression text in this symbol determines the inline expression type:
- The keyword loop identifies a loop. Example: "LOOP <1, 5>" means that the contents of the inline expression symbol will be executed between one and five times.
- The keyword opt identifies an optional part. The contents of the inline expression symbol will either not be executed or executed once.
- The keyword exc identifies an exceptional part. The contents of the inline expression symbol will either not be executed or executed once. If it is executed, then the rest of the MSC is skipped.
- The keyword par identifies parts that are executed in parallel.
- The keyword alt identifies alternative parts. Only one part will be executed.
- The inline expression separator symbol starts a new part in a parallel or alternative inline expression.
Displaying and Modifying Status
To display and modify status, you select Status from the Edit menu.
Timer Status
Z.120 specifies two appearances for the timer symbol, depending on whether the timer has expired (i.e. time-out) or whether the timer is reset. The appearance of the timer is illustrated in Figure 311.
- Timeout - A timer expires.
- Reset - The timer is stopped.
- Implicit reset - Assigned a new value while active.
Separate Timer Status
Separate timer symbols has no need for an implicit reset. The timer can be set two times in a row without an implicit reset in-between.
Displaying Information About the Selected MSC Object
To display information about a selected MSC object, you select Info Window from the Window menu.
This opens a dialog displaying additional information about the currently selected MSC object. The information that is available depends on what object is selected, and this is described in the table below.
(the message output is selected by clicking close to the message base)
(the message input is selected by clicking close to the message end)
- Instance kind
- Action text
- SDL Referencea
- Condition or MSC reference name
- Instances connected to the condition
- SDL Referencea
1 Only for diagrams created through a simulation.
2A message is sent when it has been sent and received, but has not yet been consumed by the receiving instance. Typically, it is waiting in the receiving process input queue.
3A message is consumed when it has been processed by the receiving instance.
Instance Ruler
When managing working on a long (vertically extended) MSC, the kind of instance in the instance head may not be visible in the drawing area.
The instance ruler (illustrated in Figure 313) shows the kind of the instance heads that are not currently visible in the drawing area. It reduces the amount of scrolling up or down when working on an MSC. The instance ruler may be shown or hidden with an option (see Instance Ruler).
Tracing a Simulation in a Message Sequence Chart
This section describes the functionality behind tracing a simulation in an MSC.
General
The MSC Editor may be used as a graphical trace tool, which features the automatic generation of an MSC from a simulation.
- The results of the simulation may be presented on line in an MSC Editor window, in which each event of interest will be appended to the chart in order to build up an MSC which reflects the history of the simulation.
- It is also possible to run the simulation, save the results on a simulator MSC log file and open the file from the MSC Editor.
- The commands that start up the logging of MSC events, set up the scope of trace, stop the logging of events, and so on, are given to the simulator monitor. See Simulating a System.
Defining the Scope of Trace
First, the scope of trace should, if necessary, be set to the unit which is currently of interest. This is done with the command Set-MSC-Trace.
The graphical trace is then started with a dedicated command from the simulator monitor. See Start-Interactive-MSC-Log. In response to this command, the following happens:
- In the Organizer, a reference to an MSC is added. The diagram is assigned an unique name.
- An instance of the MSC Editor window is activated on the newly created MSC.
- The current status for the simulation is presented by displaying all SDL process instances that exist at the time when ordering the command Start-Interactive-MSC-Log.
Mapping Between SDL and MSC
The mapping rules which govern how SDL events are transformed into MSC symbols, lines and textual elements are summarized in the following table:
- Set
- Reset
- Implicit reset1
- Time-out
Environment2
Condition3
Action4
1 See Implicit reset.
2The system's environment is denoted by env_1
3The mapping is only completely valid for a condition connected to only one instance. A condition connected to several instances expresses a logical AND-combination of the states of the processes corresponding to those instances.
4The action symbol corresponds to a task symbol containing informal text. This translation is, however, not supported when generating an MSC from a simulation.
Generating the MSC
When running the simulation, each SDL event of interest (in the scope of MSC Trace) that takes place will cause the corresponding MSC symbol to be drawn in the drawing area of the MSC Editor.
Drawing Conventions
Layout
Default layout algorithms are used. Each event causes the insertion point to be translated downwards with one vertical spacing unit, keeping the intuitive feeling of absolute order between events. An event could be, for instance, the output or the input of an SDL signal. However, if an output event is immediately followed by an input event, no translation will take place.
Auto-Resizing of MSC
The MSC Editor will automatically enlarge the MSC size when the MSC has grown so that it reaches the bottom or right of the drawing area. The MSC is enlarged according to a preference parameter.
Messages
A distinction is made between the reception and the consumption of messages:
- Reception of a message: Once an SDL signal is output in the simulator, it is immediately placed into the input port of the receiving process instance. There may, however, be other pending SDL signals in this queue, which means that the signal might not be input immediately. Therefore, when a signal is output, it is illustrated as a lost message, marked at its end with the name of the receiving instance, from the sending instance to the receiving instance.
- Consumption of a message: When an SDL signal is input, the vertical position for the next event may have moved down in comparison to the position of the signal output. An input of a signal is illustrated by redrawing the line representing the message with its end point connected to the new vertical position. (If an output event is immediately followed by an input, there is no change in vertical position.)
- In the case messages remain lost for a "long" time, this may be interpreted as some kind of erroneous behavior which requires special attention. Messages that are never consumed indicate that some design error might have been introduced in the SDL system. It is up to you to decide whether the time which has elapsed since a message was sent should be considered as exceeding a reasonable value.
Create of Process
Each time an SDL process is dynamically created, a process create will be drawn from the source instance axis, and the created instance will be positioned according to the insert and grouping modes that is set. This guarantees that no overlapping instance axes will take place.
The MSC Editor will automatically enlarge the MSC size when the MSC has grown so that it reaches the bottom or right of the drawing area. The drawing area is enlarged according to the value of a preference parameter.
Process Stop
If an instance is stopped (by a stop symbol), the space which becomes available beneath the instance end symbol will not be reused for new instance axes.
Timers
- Implicit reset
- The implicit reset timer status is a non-Z.120 addition to the MSC Editor. An implicitly reset timer is immediately set again to its original parameters after reset. It is illustrated in the same way as a reset timer, but the status information is reflected in the Info dialog (see Requesting Detailed Information on an Object).
Instances
- The Environment Instance
- The Void Instance
- Graphically, in the Message Chart Editor, the concept conditional trace (see Scope of Trace for Generation of Message Sequence Charts) is illustrated as sending or receiving messages to / from an instance with the name Void. The purpose of the Void instance is to document that a message exchange actually took place without focusing on the sending / receiving instance.
- The Instance Name and Instance Kind Text Fields
- The ITU recommendation Z.120 allows several ways of using the two text fields Instance Name and Instance Kind. This was discussed earlier in Adding an Instance Head Symbol.
- When generating an MSC, the SDL Process Name and the internal instance number managed by the simulator monitor are concatenated to build up one (MSC) Instance Name. The SDL diagram type and diagram name are concatenated to build one Instance Kind.
Example 315 Instance Name and Instance Kind in Simulation Trace
- Assume the simulation program contains an instance of the SDL diagram type = process with the diagram name = Demon and monitor instance number = 2 This would be displayed as the following instance:
Terminating the Trace
Having terminated the trace (either by stopping the simulation or turning the MSC trace off), you are responsible for saving the MSC(s) that are the results of the simulation.
1Corresponding in this context means that both conditions refer to the same subset of instances and both conditions agree with respect to name.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |