![]() |
![]() |
![]() |
![]() |
![]() |
Traces
When a process instance executes actions within a transition, trace information describing the current action might be printed on the screen. The amount of information printed can be selected using the trace commands in the monitor system. A typical trace from a transition containing a few actions is given below.
*** TRANSITION START* PId : Demon:1* State : Generate* Input : T* Sender : Demon:1* Now : 1.0000* OUTPUT of Bump to Game:1* SET on timer T at 2.0000*** NEXTSTATE GenerateThe transitions can also be traced in the GR source diagrams. This is discussed in detail under GR Traces.
Transition Trace
A trace value, which is a non-negative integer, can be assigned to process instances, to process types, blocks, and to the system. The commands associated with traces are Set-Trace, Reset-Trace and List-Trace-Values.
When a process instance starts a transition, the trace value that governs the amount of trace to be printed is computed according to the following algorithm:
- If a trace value is defined for the process instance executing the transition, that value is used.
- If not, and a trace value is defined for the process type, that value is used.
- Otherwise, if a trace value is defined for the block enclosing the process, that value is used.
- If still no trace value is found, the block structure is followed outwards until a unit is reached which has a trace value defined. The system will always have a trace value.
The hereby computed value is compared with the trace limit for each action executed during the transition. The trace information is printed only if the trace value is greater or equal to the trace limit for the action. Trace information at trace level 1 is treated specially, see below.
In the table below the trace limits for all the information that can be part of a trace is presented.
The trace messages are produced when actions defined in the SDL diagrams are executed. These messages are not used when monitor commands like Set-Timer, Nextstate, or Stop are entered.
Trace Limit Table
The trace limit table can be summarized as follows:
Trace of signals to environment (environment as seen from the specified unit)
Trace information at trace level 1, i.e. trace of signals sent to the environment of the specified unit, is treated in a special way. This information is not printed if the trace value is greater than 1, instead the normal trace of outputs is used.
GR Traces
GR trace is a way to follow the execution of transitions in the GR source diagrams by selecting SDL symbols. It should normally only be used for a small number of processes to limit the amount of information displayed. The GR trace value determines to what degree the execution will be traced, i.e. how often SDL symbols will be selected in the GR diagrams (see below). After a nextstate or stop operation, i.e. between two transitions, the nextstate or stop symbol is still selected.
The commands associated with GR traces are Set-GR-Trace, Reset-GR-Trace and List-GR-Trace-Values.
The GR tracing will take place in a single SDL Editor window, which will show the appropriate GR diagram as the execution progresses. If no SDL Editor is opened, a new editor is started.
Three trace values are possible:
- 0 - No GR trace.
- 1 - When the monitor is entered next, show the next symbol to be executed. No symbols are selected during execution when the monitor is inactive. Thus, the SDL Editor window may not show the diagram containing the symbol currently executed.
- 2 - Follow the execution and show each symbol as it is executed. If the execution is continued into another diagram, this diagram is loaded into the SDL Editor window.
Message Sequence Chart Traces
The commands associated with MSC traces are Set-MSC-Trace, Reset-MSC-Trace and List-MSC-Trace-Values.
Mapping Between SDL and MSC
When executing an SDL system, some of the SDL events can be transformed into a corresponding symbol in a Message Sequence Chart. The mapping rules which govern how SDL events are transformed into MSC symbols, lines and textual elements are described in Mapping Between SDL and MSC.
The ITU definition of the MSC language introduces the instance concept. An instance is mapped to any instance of an SDL process.
Scope of Trace for Generation of Message Sequence Charts
The scope of MSC trace is the process instances that have a calculated MSC trace value > 0.
Assume that we have set the scope of MSC trace to a part of the SDL system, for instance a block and the underlying structure in terms of processes. When an event takes place in the SDL system, one of three possible situations is possible. Let us assume for the sake of simplicity that the event is the sending of a signal from one process to another process. The three cases and their behavior are as follows:
- First case: The two units (the sending process and the receiving process) are both within the scope of MSC trace. It is easy to transform this into the sending and consuming of a message, and the result will be a trace in a Message Sequence Chart.
- Second case: None of the units is in the scope of MSC trace. This will not result in any trace in a Message Sequence Chart.
- Third case: One and (one only) of the units is in the scope of MSC trace. This case is slightly more complicated. Sending and receiving messages to and from units may be of interest outside the scope of trace.
- The concept conditional trace is introduced: A conditional trace will indicate that a message has been sent or received, and that the receiver or sender is beyond the scope of trace. See also The Void Instance.
The MSC trace levels 1 and 2 are used to specify if conditional trace should be presented or not; see the table below. MSC trace level 3 specifies a block level trace.
Level of Symbol Logging
The symbol level determines the amount of information that should be part of the MSC log. Three symbol levels are possible:
- 0 - Events for signals and timers plus create and stop.
- 1 - As level 0, plus condition symbols for each nextstate.
- 2 - As level 1, plus action symbols for task, decision, call, and return.
Signal Parameter Length
When using MSC trace it is possible to set a maximum parameter trace length by using the environment variable SDTMSCMAXPARAMLENGTH.
This can improve performance on simulations using large signal parameters that otherwise could cause the MSC editor to work slowly.
If a parameter exceeds the maximum length it will be truncated to the maximum length with an ending "..." to indicate that the parameter has been truncated.
After the ending "..." there can be possible ending parenthesis, apostrophes or quotes to match initial ones in order to make the signal parameter syntactically correct.
Initial Trace Values
At the start of a simulation, the trace values, the GR trace values and the MSC trace values for all units except the system are undefined. The system trace is 4, the system GR trace is 0, and the system MSC trace is 1.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |