IBM
Contents Index Previous Next



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  Generate

The 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:

  1. If a trace value is defined for the process instance executing the transition, that value is used.
  2. If not, and a trace value is defined for the process type, that value is used.
  3. Otherwise, if a trace value is defined for the block enclosing the process, that value is used.
  4. 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.

Note:

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

Action Trace limit

Transition start

2

Parameters of signal in input

6

Output to environment, signal name and receiver

1 (see below)

Output, signal name and receiver

3

Output caused immediate null transition

5

Parameters of signal in output

6

Task

4

Decision, value of expression in decision

4

Procedure start, procedure return

3

Parameters to procedures

6

Create, successful or unsuccessful

3

Parameters to create

6

Set, timer name, time

3

Time less than Now in set, changed to Now

5

Parameters in set

6

Set caused an implicit reset action

5

Reset, timer name

3

Reset caused timer or signal to be removed

5

Parameters to reset

6

Output of timer signal, timer name, receiver, time

2

Output of timer signal caused a null transition

5

Parameters to timer signal

6

Nextstate, state name

3

Null transitions at a nextstate

5

Parameters to signals in null transitions at nextstate

6

Stop

3

Signals discarded at stop

5

Parameters to signals discarded at stop

6

Timers discarded at stop

5

Parameters to timers discarded at stop

6

Export

4

The trace limit table can be summarized as follows:

Trace Limit Table Summary

0

No trace

1

Trace of signals to environment (environment as seen from the specified unit)

2

Trace of transition start and timer outputs

3

As 2 + trace of important SDL actions

4

As 3 + trace of other SDL actions as well

5

As 4 + result of actions (example: discarded signals)

6

As 5 + Parameters of signals, timers, create actions

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:

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:

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.

MSC Trace for Sender MSC Trace for Receiver Result


0

No trace

0

1

No trace


2

Conditional trace


0

No trace

1

1

Trace


2

Trace


0

Conditional trace

2

1

Trace


2

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:

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
Contents Index Previous Next