IBM
Contents Index Previous Next



SDL Instance Information


The Analyzer supports the generation of a so-called instance information file, with the file extension .ins. This file contains various kinds of information about an SDL system. Similar to a cross reference file, it is a plain text file. The file syntax is described in detail in File Syntax. The Analyzer invokes a tool called the Instance Generator to produce the instance information out of an analyzed SDL system.

The information that can be found in an instance information file helps to answer many questions. For example:

The Instance Generator

The Analyzer provides two commands to use the Instance Generator from the command line user interface. These commands are described in The Analyzer Command Line UI but are repeated here for the sake of completeness.

Set-Instance

Parameters:

[On/Off]

This command sets an option that specifies whether an instance information file should be generated or not when the SDL system is analyzed. The option is by default off.

Instance-File

Parameters:

<file spec>

This command sets the name of the instance information file. The default filename is <systemname>.ins, where <systemname> is the name of the analyzed SDL system.

The Instance Generator can also be started from the Analyzer's graphical user interface. This is done in a way similar to how cross reference files are generated. In the Analyze dialog in the Organizer, you can check a button to make the Analyzer call the Instance Generator when the system has been analyzed. From this dialog it is also possible to set the name of the generated instance information file.

Note:

The Instance Generator is automatically invoked to produce the information needed by tools such as the State Matrix Viewer.

File Syntax

An instance information file consists of a fileheader followed by a list of records:

<fileheader>
<record>
<record>
...
<record>

The <fileheader> is a string telling which version of the Instance Generator that has generated the file. Each <record> describes an SDL entity according to the following format:

<level> <entity class> <name>
<attribute> = <value>
...
<attribute> = <value>
.

The <level> is a number that tells at what depth in the "instance tree" the entity was found. For example, the system entity has level 1, a block entity in the system has level 2, a process entity in the block has level 3, and so on.

Attributes can be divided into three distinct categories depending on the format of their values:

  1. A single value:
    <attribute> = <single value>
    
    
    
  2. A list of single values:
    <attribute> = (
    <single value>
    <single value>
    ...
    <single value>
    )
    
    
  3. A list of pairs of single values:
    <attribute> = (
    <single value> <single value
    <single value> <single value>
    ...
    <single value> <single value>
    )
    
    

Sometimes an attribute is omitted from a record. This happens when the value of the attribute is an empty string or list.

The table below lists all entity classes for which information is generated in an instance information file. The attributes of the entities are also described, together with the category of the attributes (1, 2 or 3 according to above).

In the descriptions, the following terms are used:

Entity class Attribute Category Description
BLOCK

InstRef

1

An SDT reference to the definition of this block.



ConnectionOut

2

The names of the channels that are on the outside of this block.



ConnectionIn

2

The names of the channels or signalroutes that are on the inside of this block.

BLOCK_INST

InstRef

1

An SDT reference to the definition of this block instance.



TypeRef

2

SDT references to block type definitions. The first reference is to the block type from which this block instance is instantiated, followed by references to its supertypes all the way to the block type on top of the inheritance hierarchy.

CALLED_
PROCEDURE

InstRef

1

An SDT reference to the definition of this called procedure.

CHANNEL

InstRef

1

An SDT reference to the definition of this channel.



SignalSet

3

The signals that are conveyed on this channel in the direction from the From-entity to the To-entity. Each signal is described by its name followed by an SDT reference to the definition of the signal.



SignalSetRev

3

As SignalSet but for the signals that are conveyed in the opposite direction.



From

1

The name of the block or block instance from which this channel starts. If the channel starts from the environment surrounding the system, system instance, block or block instance where this channel is located, this attribute is "env".



FromVia

1

This attribute is specified when the From-entity is a block instance, and is then the name of the gate of that block instance to which this channel is connected.



To

1

The name of the block or block instance to which this channel leads. If the channel leads to the environment surrounding the system, system instance, block or block instance where this channel is located, this attribute is "env".



ToVia

1

This attribute is specified when the To-entity is a block instance, and is then the name of the gate of that block instance to which this channel is connected.

CHANNEL_

SUBSTRUCTURE

InstRef

1

An SDT reference to the definition of this channel substructure.

CONTINUOUS_
SIGNAL1

InstRef

1

An SDT reference to the definition of this continuous signal.



InType

1

The name of the state-containing entity in which this continuous signal is defined.



Outputs

3

The output signals that might be sent in the transition that is initiated by this continuous signal. Each signal is described by its name followed by an SDT reference to one of the output symbols in the transition that contains that name.



Calls

3

The procedures that might get called in the transition that is initiated by this continuous signal. Each procedure is described by its name followed by an SDT reference to one of the symbols in the transition that contains a call to a procedure with that name. This name is also the name of a CALLED_
PROCEDURE entity that describes how the procedure look from the calling state-containing entity's point of view. This entity is normally placed immediately after the state information of the state-containing entity. However, when the state-containing entity is a procedure within another state-containing entity, it might be that the procedure has been called from another place in this surrounding state-containing entity. Then the CALLED_
PROCEDURE entity is not placed here also, since it is identical to the first one.



NextStates

3

The states that might become the nextstate after the transition that is initiated by this continuous signal. Each state is described by a name followed by an SDT reference to one of the state symbols that contains that name.

ENABLING_
CONDITION

InstRef

1

See the description for CONTINUOUS_ SIGNAL.



InType

1

See the description for CONTINUOUS_ SIGNAL.



Outputs

3

See the description for CONTINUOUS_ SIGNAL.



Calls

3

See the description for CONTINUOUS_ SIGNAL.



NextStates

3

See the description for CONTINUOUS_ SIGNAL.

GATE

InstRef

1

An SDT reference to the definition of this gate.



SignalSet

3

The signals that are conveyed through this gate in to the block instance, process instance or service instance to which the gate belongs. Each signal is described by its name followed by an SDT reference to the definition of the signal.



SignalSetRev

3

As SignalSet but for the signals that are conveyed in the opposite direction.

INPUT

InstRef

1

See the description for CONTINUOUS_ SIGNAL.



InType

1

See the description for CONTINUOUS_ SIGNAL.



Outputs

3

See the description for CONTINUOUS_ SIGNAL.



Calls

3

See the description for CONTINUOUS_ SIGNAL.



NextStates

3

See the description for CONTINUOUS_ SIGNAL.

PRIORITY_
INPUT

InstRef

1

See the description for CONTINUOUS_ SIGNAL.



InType

1

See the description for CONTINUOUS_ SIGNAL.



Outputs

3

See the description for CONTINUOUS_ SIGNAL.



Calls

3

See the description for CONTINUOUS_ SIGNAL.



NextStates

3

See the description for CONTINUOUS_ SIGNAL.

PROCESS

InstRef

1

An SDT reference to the definition of this process.



IniNoOfInst

1

The initial number of dynamic instances of this process.



MaxNoOfInst

1

The maximum number of dynamic instances of this process. If this attribute is omitted it means that there is no upper limit on the number of dynamic instances.



SignalSet

3

The signals that can be received by this process. This set of signals is commonly known as the valid input signal set of the process. Each signal is described by its name followed by an SDT reference to the definition of the signal.



ConnectionOut

2

The names of the signalroutes that are on the outside of this process. Naturally, this attribute is only present when the process consists of services.



ConnectionIn

2

The names of the signalroutes that are on the inside of this process. Naturally, this attribute is only present when the process consists of services.

PROCESS_
INST

InstRef

1

An SDT reference to the definition of this process instance.



TypeRef

2

SDT references to process type definitions. The first reference is to the process type from which this process instance is instantiated followed by references to its supertypes all the way to the process type on top of the inheritance hierarchy.



IniNoOfInst

1

The initial number of dynamic instances of this process instance.



MaxNoOfInst

1

The maximum number of dynamic instances of this process instance. If this attribute is omitted it means that there is no upper limit on the number of dynamic instances.



SignalSet

3

The signals that can be received by this process instance. This set of signals is commonly known as the valid input signal set of the process instance. Each signal is described by its name followed by an SDT reference to the definition of the signal.

SAVE

InstRef

1

An SDT reference to the definition of this save.



InType

1

The name of the state-containing entity in which this save is defined.

SERVICE

InstRef

1

An SDT reference to the definition of this service.

SERVICE_
INST

InstRef

1

An SDT reference to the definition of this service instance.



TypeRef

2

SDT references to service type definitions. The first reference is to the service type from which this service instance is instantiated followed by references to its supertypes all the way to the service type on top of the inheritance hierarchy.

SIGNALROUTE

InstRef

1

An SDT reference to the definition of this signalroute.



SignalSet

3

The signals that are conveyed on this signalroute in the direction from the From-entity to the To-entity. Each signal is described by its name followed by an SDT reference to the definition of the signal.



SignalSetRev

3

As SignalSet but for the signals that are conveyed in the opposite direction.



From

1

The name of the process, process instance, service or service instance from which this signalroute starts. If the signalroute starts from the environment surrounding the block, block instance, process or process instance where this signalroute is located, this attribute is "env".



FromVia

1

This attribute is specified when the From-entity is a process instance or a service instance, and is then the name of the gate of that process instance or service instance to which this signalroute is connected.



To

1

The name of the process, process instance, service or service instance to which this signalroute leads. If the signalroute leads to the environment surrounding the block, block instance, process or process instance where this signalroute is located, this attribute is "env".



ToVia

1

This attribute is specified when the To-entity is a process instance or a service instance, and is then the name of the gate of that process instance or service instance to which this signalroute is connected.

START2

InstRef

1

See the description for CONTINUOUS_ SIGNAL.



InType

1

See the description for CONTINUOUS_ SIGNAL.



Outputs

3

See the description for CONTINUOUS_ SIGNAL.



Calls

3

See the description for CONTINUOUS_ SIGNAL.



NextStates

3

See the description for CONTINUOUS_ SIGNAL.

STATE

InstRef

2

SDT references to the state symbols in the state-containing entity that contain the name of this state. If the state-containing entity is a process type, service type or procedure, occurrences in the supertypes are also included.

SUBSTRUCTURE

ConnectionOut

2

The names of the channels that are on the outside of this substructure.



ConnectionIn

2

The names of the channels or signalroutes that are on the inside of this substructure.

SYSTEM

InstRef

1

An SDT reference to the definition of this system.

SYSTEM_INST

InstRef

1

An SDT reference to the definition of this system instance.



TypeRef

2

SDT references to system type definitions. The first reference is to the system type from which this system instance is instantiated followed by references to its supertypes all the way to the system type on top of the inheritance hierarchy.

1

The name of a CONTINUOUS_SIGNAL entity is set to the priority of the continuous signal. If no priority has been specified, maximum priority is assumed and the name is then set to "MAX_PRIO".

2

The name of a START entity is always set to "Start".

Information about the entities is generated in pre-order (prefix walk in the instance tree). This means that an entity is always followed by the entities defined within itself.

A formal and complete description of the general format of an instance information file would be rather complex, and is beyond the scope of this text. Instead, see Example 350:

Example 350 : An instance information file

Consider the SDL system below:

System ExSystem;
  Signal Sig(Integer), Inp;
  channel ExChannel 
    from ExBlock to env with Sig;
    from env to ExBlock with Inp;
  endchannel ExChannel;
  block ExBlock referenced;
endsystem ExSystem;

Block ExBlock;
  signalroute ExSignalRoute 
    from ExProcess to env with Sig;
    from env to ExProcess with Inp;
  process ExProcess referenced;
  connect ExChannel and ExSignalRoute;
endblock ExBlock;

Process ExProcess;
  DCL Counter Integer;
  procedure ExProcedure referenced;
  start ;
    task Counter := 0;
    grst4:
  nextstate Wait;
  state Wait;
    input Inp;
    task { 
      Counter := call ExProcedure(Counter);
    };
    output Sig(Counter);
    join grst4;
  endstate;
endprocess ExProcess;

Procedure ExProcedure;FPAR a Integer;RETURNS ret 
Integer;
  start ;
  nextstate Idle;
  state Idle;
    input *;
    task { 
      ret := a+1;
    };
    return ;
  endstate;
endprocedure ExProcedure;

The instance information file for this SDL system will look like this:

SDTINST V1.0
1  SYSTEM ExSystem
   InstRef = #SDTREF(TEXT,ExSystem.pr,1)
   .
2  CHANNEL ExChannel
   InstRef = #SDTREF(TEXT,ExSystem.pr,3)
   SignalSet = (
     Sig #SDTREF(TEXT,ExSystem.pr,2)
   )
   SignalSetRev = (
     Inp #SDTREF(TEXT,ExSystem.pr,2)
   )
   From = ExBlock
   To = env
   .
2  BLOCK ExBlock
   InstRef = #SDTREF(TEXT,ExSystem.pr,10)
   ConnectionOut = (
     ExChannel
   )
   ConnectionIn = (
     ExSignalRoute
   )
   .
3  SIGNALROUTE ExSignalRoute
   InstRef = #SDTREF(TEXT,ExSystem.pr,11)
   SignalSet = (
     Sig #SDTREF(TEXT,ExSystem.pr,2)
   )
   SignalSetRev = (
     Inp #SDTREF(TEXT,ExSystem.pr,2)
   )
   From = ExProcess
   To = env
   .
3  PROCESS ExProcess
   InstRef = #SDTREF(TEXT,ExSystem.pr,18)
   IniNoOfInst = 1
   SignalSet = (
     Inp #SDTREF(TEXT,ExSystem.pr,2)
   )
   .
4  START Start
   InstRef = #SDTREF(TEXT,ExSystem.pr,21)
   InType = ExProcess
   Nextstates = (
     Wait #SDTREF(TEXT,ExSystem.pr,24)
   )
   .
4  STATE Wait
   InstRef = (
     #SDTREF(TEXT,ExSystem.pr,25)
   )
   .

5  INPUT Inp
   InstRef = #SDTREF(TEXT,ExSystem.pr,26)
   InType = ExProcess
   Outputs = (
     Sig #SDTREF(TEXT,ExSystem.pr,30)
   )
   Calls = (
     ExProcedure #SDTREF(TEXT,ExSystem.pr,28)
   )
   Nextstates = (
     Wait #SDTREF(TEXT,ExSystem.pr,24)
   )
   .
4  CALLED_PROCEDURE ExProcedure
   InstRef = #SDTREF(TEXT,ExSystem.pr,20)
   .
5  START Start
   InstRef = #SDTREF(TEXT,ExSystem.pr,36)
   InType = ExProcedure
   Nextstates = (
     Idle #SDTREF(TEXT,ExSystem.pr,37)
   )
   .
5  STATE Idle
   InstRef = (
     #SDTREF(TEXT,ExSystem.pr,38)
   )
   .
6  INPUT Inp
   InstRef = #SDTREF(TEXT,ExSystem.pr,39)
   InType = ExProcedure
   Nextstates = (
     return #SDTREF(TEXT,ExSystem.pr,43)
   )
   .


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