IBM
Contents Index Previous Next



Dynamic Errors


Violations of the dynamic rules of SDL will cause dynamic errors during the execution of a simulation program. A dynamic error is presented to the user on the screen as an error message. See the example below.

Example 334 : Dynamic Error Printout

Warning in SDL Output of signal Bump
Signal sent to NULL, signal discarded
Sender: Demon:1
TRANSITION
  Process        : Demon:1
  State          : Generate
  Input          : T
  Symbol         : 
#SDTREF(SDL,/usr/tom/demon.spr(1),122(30,55),1)
TRACE BACK
  Process        : Demon
  Block          : DemonBlock
  System         : Demongame

The symbol reference given in the TRANSITION message should be interpreted as follows:

Item Text in Example 334 Interpretation

1

SDL

Reference to SDL/GR object

2

/usr/tom/demon.spr

Reference to the file

3

(1)

Page name

4

122

The object identity (an unique number assigned by the SDL Editor)

5

30

The x-coordinate of the object in mm. The origin of coordinates is the upper left corner of the page.

6

55

The y-coordinate of the object in mm

7

1

Line number within symbol

By entering the monitor command Show-Previous-Symbol, the symbol that caused the error is displayed.

For more information on references, see SDT References.

Dynamic Errors Found by a Simulation Program


Error in SDL array index in sort <sort>: 
<value> is out of range.

Violation of the index range given in an array.

Error in assignment in sort <sort>: 
<value> is out of range.

Violation of the range conditions given in a syntype.

Error in SDL Decision: Value is <value>
Entering decision error state

The value of the expression in the decision did not match any of the possibilities (answers).

Error in SDL Import. Attempt to import from NULL

Error in SDL Import. Attempt to import from stopped 
process instance

Error in SDL Import. Attempt to import from the 
environment

Error in SDL Import. No process exports this 
variable

Error in SDL Import. The specified process does not 
export this variable

Error in an import statement. Supplementary information about remote variable and exporting processes is also given.

Warning in SDL Output of signal <signal>. 
No path to receiver, signal discarded

An attempt was made to output a signal to a PId expression. There exists, however, no path of channels and signal routes between the sender and the receiver that can convey the signal.

Warning in SDL Output of signal <signal>. 
No possible receiver found, signal discarded

An attempt was made to output a signal without specifying a to PId expression. When all paths or all paths mentioned in a via clause had been examined no possible receiver was found.

Warning in SDL Output of signal <signal>.
Signal sent to NULL, signal discarded

An attempt was made to output a signal to a PId expression that was null.

Warning in SDL Output of signal <signal>. 
Signal sent to stopped process instance

An attempt was made to output a signal to a PId expression that referred to a process instance which has performed a stop action.

Error in SDL View. Attempt to view from NULL

Error in SDL View. Attempt to view from stopped 
process instance

Error in SDL View. Attempt to view from the 
environment

Error in SDL View: The specified process does not 
reveal this variable

Error in SDL View: No process reveals this variable

Error in a view statement. Supplementary information about viewed variable and viewing process is also given.

Error in SDL Create: Process <process>
More static instances then maximum number of 
instances.

Obvious!

Illegal #UNION tag value for assignment to component 
Name.
Tag value is xxx.

Attempt to assign a value to a non-active UNION component.

Illegal #UNION tag value for access to component 
Name.
Tag value is xxx.

Attempt to access a non-active UNION component.

Error when accessing component Name. Component is 
not Present.

Attempt to access a non-active optional struct component.

Component Name is not active.Present is xxx.

Attempt to access a non-active choice component.

Dereferencing of NULL pointer.
Pointer assigned new data area at address: HEX(xxx)

Attempt to de-reference a Null pointer defined using the Ref generator.

User specified error: SDL error expression found

Error introduced by the user, by inserting the error expression defined in SDL.

Errors Found in Operators

The errors that can be found in operators defined in the predefined data types are listed below.

Error in SDL Operator: Extract! in sort Charstring, 
Index out of bounds

Error in SDL Operator: Modify! in sort Charstring,
Character NUL not allowed.

Error in SDL Operator: MkString in sort Charstring,
Character NUL not allowed.

Error in SDL Operator: First in sort Charstring, 
Charstring length is 0

Error in SDL Operator: Fix in sort Integer, Integer 
overflow

Error in SDL Operator: Last in sort Charstring, 
Charstring length is 0

Error in SDL Operator: Substring in sort Charstring, 
Charstring length is 0

Error in SDL Operator: Substring in sort Charstring, 
Length of substring < 0

Error in SDL Operator: Substring in sort Charstring, 
Start index is <= 0

Error in SDL Operator: Substring in sort Charstring, 
Start index + length of substring > length of 
charstring

Error in SDL Operator: / in sort Integer, Attempt to 
divide by 0.

Error in SDL Operator: / in sort Real, Attempt to 
divide by 0.0.
Error in SDL Operator: Rem in sort Integer,
Second operand is 0

Error in SDL Operator: Mod in sort Integer,
Second operand is 0

Error in SDL Operator: Modify! in sort Bit_String,
Index out of bounds.

Error in SDL Operator: Extract! in sort Bit_String,
Index out of bounds.

Error in SDL Operator: First in sort Bit_String,
Bit_String length is zero.

Error in SDL Operator: Last in sort Bit_String,
Bit_String length is zero.

Error in SDL Operator: SubString in sort Bit_String,
Bit_String length is zero.

Error in SDL Operator: SubString in sort Bit_String,
Start is less than zero.

Error in SDL Operator: SubString in sort Bit_String,
SubLength is less than or equal to zero.

Error in SDL Operator: SubString in sort Bit_String,
Start + Substring length is greater than string 
length.

Error in SDL Operator: BitStr in sort Bit_String,
Illegal character in Charstring (not 0 or 1).

Error in SDL Operator: HexStr in sort Bit_String,
Illegal character in Charstring (not digit or a-f).

Error in SDL Operator: Modify! in sort Octet,
Index out of bounds.

Error in SDL Operator: Extract! in sort Octet,
Index out of bounds.

Error in SDL Operator: Division in sort Octet,
Octet division with 0.

Error in SDL Operator: Mod operator in sort Octet,
Right operand is 0.

Error in SDL Operator: Rem operator in sort Octet,
Right operand is 0.

Error in SDL Operator: BitStr in sort Octet,
An Octet should consist of not more than 8 
characters 0 or 1.

Error in SDL Operator: HexStr in sort Octet,
An Octet should consist of 2 HEX values.

Error in SDL Operator: HexStr in sort Octet,
Illegal character in Charstring (not digit or a-f).

Error in SDL Operator: Modify! in sort Octet_String,
Index out of bounds.

Error in SDL Operator: Extract! in sort 
Octet_String,
Index out of bounds.

Error in SDL Operator: BitStr in sort Octet_String,
An Octet_String should consist of 0 and 1.

Error in SDL Operator: HexStr in sort Octet_String,
Illegal character in Charstring (not digit or a-f).

Apart from these error message each instantiation of generator String will introduce similar error messages as for the Charstring sort. Note that Object_Identifier is a predefined sort which is an instantiation of String.

Action on Dynamic Errors

After a dynamic error, the execution of the simulation program is continued until the current symbol is ended. The interactive monitor will then become active. The following actions will be taken:

Assertions

A user can define his own run-time errors or assertions. Basically the run-time library only provides an appropriate C function that can be called to print out an error message. This function is assumed to be used in #CODE directives in TASKs according to the following example:

Example 335 : Assertion in C Code

TASK  '' /*#CODE
#ifdef XASSERT
  if (#(I) < #(K))
    xAssertError("I is less than K");
#endif
*/ ;

The xAssertError function, which has the following prototype:

extern void xAssertError ( char *Descr )

takes a string describing the assertion as parameter and will produce an SDL run-time error similar to the normal run-time errors. The function is only available if the compilation switch XASSERT is defined. For the standard libraries this is true for all libraries except the Application Library.

Run-time Prompting

For some special SDL constructs, an SDL simulator is not able to continue executing without prompting the user for necessary input. The execution continues when the user has entered an allowed value.

Decision with Any

If an SDL DECISION is encountered with an ANY question, the user will be prompted which path to execute:

Decision with ANY
1 (go path)
1 ? (show path)
2 (go path)
2 ? (show path)
3 (go path)
3 ? (show path)
Enter path :

At this point, the user must enter a path value (integer) within the allowed range. If GR trace is enabled, the user may enter a path value followed by a `?' to see the corresponding path in an SDL Editor.

Informal Decision

If an SDL DECISION is encountered with informal text, the user will be prompted which path to execute:

Informal decision: `Question1'
`answer1'  1
`answer2'  2
`ELSE'  3
Enter path :

At this point, the user must enter a path value (integer) within the allowed range. If GR trace is enabled, the user may enter a path value followed by a `?' to see the corresponding path in an SDL Editor.

Unimplemented Operator

If an expression is encountered involving an operator that is not implemented, the user will be prompted for the value to be returned depending on the parameters:

Operator op in sort s is called
Parameter 1: 50
Enter value(s) :

At this point, the user must enter a value in the resulting sort to be the returned value of the operator when called with the listed parameter values.


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