IBM
Contents Index Previous Next



Going to a System State


When using the Explorer it is quite common that there is a need to go to a specific system state, for instance to be able to start an automatic state space exploration from this point. This section describe some possibilities to in an efficient way get to the wanted system state, called the target state below.

Using Manual Navigation

In many cases the simplest way is to use the Navigator tool or the navigation commands to interactively traverse the path to the target state. Manual navigation is described in Navigating in the State Space.

Returning to an Already Reached State

It is possible to return to a state that has been reached in an earlier stage when using the Explorer. Three methods will be discussed:

The benefit of the first two techniques is that the exact same target state will be reached. The drawback is that these techniques will not work as soon as either the SDL system or the state space options have been changed (see State Space Options).

The benefit of the MSC technique is that it is less vulnerable to changes in the state space options or in the SDL system. The drawback is that the exact same target state may not be reached. We only know that the path to the reached system state will satisfy the generated MSC trace.

Using Path Commands

To go to the target state using path commands:

  1. When in the target state, enter the command Print-Path. The path from the root state to the current state is printed. The path is a sequence of integers indicating which transitions must be chosen to get to the current state.
  2. At a later stage, enter the command Goto-Path, followed by the path printed above.

Using the Command Log

To go to the target state using the command log:

  1. Before navigating to the target state, select Start Command Log from the Log menu, or enter the command Command-Log-On. Specify a file name on which all subsequent monitor commands will be stored.
  2. Navigate to the target state.
  3. Select Stop Command Log from the Log menu, or enter the command Command-Log-Off. The command logging is stopped and the file is closed.
  4. Return to the same state in which the command log was started.
  5. Execute the commands stored in the file by selecting Include Command Script from the Commands menu, or enter the command
    Include-File. Select or specify the earlier file name.

Using MSC Trace

To go to the target state using MSC trace:

  1. When in the target state, generate an MSC trace from the root state to the current state. Enter the command MSC-Log-File, followed by a file name.
  2. Return to the root state by using the Top command.
  3. Go to the end of the MSC trace by verifying the MSC. See Verifying an MSC.

Using an MSC

If an MSC is created that describes the events leading to the target state, verifying this MSC gives a possibility to go to a system state that satisfies the MSC in an efficient way. It does not matter if the MSC is manually created, generated from the Simulator or from the Explorer itself (as discussed in Using MSC Trace, above). However, the exact same target state may not be reached by this method. We only know that the path to the reached system state will satisfy the generated MSC trace.

Using a User-Defined Rule

If the target state can be described in terms of process states, variable values, etc., a convenient way to get to a state that satisfies the description is to use a user-defined rule (see Using User-Defined Rules).

To go to a target state using a user-defined rule:

  1. Define the rule describing the target state (see Managing User-Defined Rules).
  2. Define the report action for user-defined rules reports to be Abort (see Report Action). This will cause an automatic exploration to stop as soon as a state is reached that satisfies the rule.
  3. Start an automatic state space exploration (see Using a Default Exploration).
  4. Go to the state where the rule was satisfied and a report was generated (see Going to a Report).

The benefit with this method is that it is fast and efficient, especially if the target state is on a considerable depth in the state space. The drawback is that sometimes there are shorter paths to the target state than the one that was automatically generated.


http://www.ibm.com/rational
Contents Index Previous Next