ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0000383 | Part 01: TTCN-3 Core Language | Editorial | public | 23-11-2006 14:16 | 12-03-2008 10:24

Reporter | Stephan Schulz |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v2.2.1 (published 2003-02) |
Target Version | v3.3.2 (published 2008-04) | Fixed in Version | v3.3.2 (published 2008-04) |
Clause Reference(s) | Main Document: C.1 to C.34 (mockup v2)
Source (company - Author) | Ina Schieferdecker, FOKUS

Summary | 0000383: Error Cases of Predefined Functions
Description | The error cases for the predefined functions are not provided. These should be added in order to give a more precise definition for these functions.
Steps To Reproduce |

Additional Information

Please add to the C.x sections a paragraph on the error cases:
C.1 Integer to character
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of integer type
? value is less than 0 or greater than 127
?
C.2 Character to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of charstring type
? lengthof(value) does not equal 1
?
C.3 Integer to universal character
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of integer type
? value is less than 0 or greater than 2147483647
?
C.4 Universal character to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of universal charstring type
? lengthof(value) does not equal 1
?
C.5 Bitstring to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of bitstring type
? the integer interpretation of the bitstring leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.6 Hexstring to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of hexstring type
? the integer interpretation of the hexstring leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.7 Octetstring to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of octetstring type
? the integer interpretation of the octetstring leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.8 Charstring to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of charstring type
? value contains non-numerical characters, being different to ?0?..?9?
? the integer interpretation of the charstring leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.9 Integer to bitstring
?
If the conversion yields a value with more bits than specified in the length parameter, then the bitstring shall be cut at position length-1.
The following error cases will lead to an error at compile or runtime:
? value or length is unitialized
? value or length is not of integer type
? value is less than zero
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.10 Integer to hexstring
?
If the conversion yields a value with more hexadecimals than specified in the length parameter, then the hexstring shall be cut at position length-1.
The following error cases will lead to an error at compile or runtime:
? value or length is unitialized
? value or length is not of integer type
? value is less than zero
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.11 Integer to octetstring
?
If the conversion yields a value with more octets than specified in the length parameter, then the octetstring shall be cut at position length-1.
The following error cases will lead to an error at compile or runtime:
? value or length is unitialized
? value or length is not of integer type
? value is less than zero
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.12 Integer to charstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of integer type
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.13 Length of string type
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of string type
? the integer length of value leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.14 Number of elements in a structured value
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of record, record of, set, set of, objid or array type
? the number of elements of value leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.15 The IsPresent function
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not referring to a field in a data object of type record or set
?
C.16 The IsChosen function
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not referring to a field in a data object of type union
?
C.17 The Regexp function
?
The number of the group to be returned is specified by groupno, which shall be a non-negative integer. Group numbers are assigned by the order of occurrences of the opening bracket of a group and counted starting from 0 by step 1.
?
The following error cases will lead to an error at compile or runtime:
? instr, expression, or groupno is unitialized
? instr is not of charstring or universal charstring type
? expression is not of charstring type
? groupno is not of integer type
? groupno is less than 0
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.18 Bitstring to charstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type bitstring
?
C.19 Hexstring to charstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type hexstring
?
C.20 Octetstring to character string
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type octetstring
?
C.21 Character string to octetstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type charstring
?
C.22 Bitstring to hexstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type bitstring
?
C.23 Hexstring to octetstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type hexstring
?
C.24 Bitstring to octetstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type bitstring
?
C.25 Hexstring to bitstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type hexstring
?
C.26 Octetstring to hexstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type octetstring
?
C.27 Octetstring to bitstring
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type octetstring
?
C.28 Integer to float
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type integer
NOTE: As TTCN-3 environments may support different integer or float ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.29 Float to integer
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? value is not of base type float
NOTE: As TTCN-3 environments may support different integer or float ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.30 The random number generator function
?
The following error cases will lead to an error at compile or runtime:
? (the optional) seed is unitialized
? (the optional) seed is not of base type float
NOTE: As TTCN-3 environments may support different float ranges there is the possibility that TTCN-3 code using this predefined function with the seed parameter is not portable.
?
C.31 The Substring function
?
The following error cases will lead to an error at compile or runtime:
? value, index, or returncount is unitialized
? value is not of base type charstring, universal charstring, bitstring, octetstring, or hexstring
? index or returncount is not of base type integer
? index is less than zero or greater than lengthof(value)
? returncount is less than zero or greater than lengthof(value)
? index+returncount is greater than lengthof(value)
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.
?
C.32 Number of elements in a structured type
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? the type of value is not length-restricted
? the declared number of elements of value leads to an overflow
NOTE: The possibility of integer overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different integer ranges.
?
C.33 Character string to float
?
The following error cases will lead to an error at compile or runtime:
? value is unitialized
? the format of value is different than defined above in this clause
? the resulting float value leads to an overflow
NOTE: The possibility of float overflow may make TTCN-3 code using this predefined function not portable between TTCN-3 environments having different float ranges.
?
C.34 The Decompose function
?
The following error cases will lead to an error at compile or runtime:
? invalue, index, or count is unitialized
? invalue is not of base type objid
? index or count is not of base type integer
? index is less than zero or greater than the number of components in value minus 1
? count is less than zero or greater than the number of components in value minus 1
? index+count is greater than the number of components in value minus 1
NOTE: As TTCN-3 environments may support different integer ranges there is the possibility that TTCN-3 code using this predefined function is not portable.

Tags | No tags attached.

Relationships

related to | 0004848 | closed | Ina Schieferdecker | No record of, set of and arrays are supported by sizeof

Attached Files

CR383_Part-7part_R2.doc (196,096) 19-10-2007 13:03
http://oldforge.etsi.org/mantis/file_download.php?file_id=1061&type=bug
CR383_notesFromGyorgy.doc (20,480) 19-10-2007 13:08
http://oldforge.etsi.org/mantis/file_download.php?file_id=1062&type=bug
STF_Solution_CR_383_424_1451_2137_2141_2142.zip (878,886) 19-10-2007 13:08
http://oldforge.etsi.org/mantis/file_download.php?file_id=1063&type=bug
STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD_a.zip (912,036) 04-12-2007 11:55
http://oldforge.etsi.org/mantis/file_download.php?file_id=1186&type=bug
CR_lengthof_sizeof_objid_part7.zip (107,019) 04-12-2007 11:55
http://oldforge.etsi.org/mantis/file_download.php?file_id=1187&type=bug
STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD_v3.zip (896,230) 06-12-2007 16:10
http://oldforge.etsi.org/mantis/file_download.php?file_id=1240&type=bug

Issue History
Date Modified | Username | Field | Change
23-11-2006 14:16 | Stephan Schulz | New Issue |
23-11-2006 14:16 | Stephan Schulz | Clause Reference(s) | => Main Document: C.1 to C.34 (mockup v2)
23-11-2006 14:16 | Stephan Schulz | Source (company - Author) | => Ina Schieferdecker, FOKUS
15-06-2007 19:20 | Stephan Schulz | Status | new => assigned
15-06-2007 19:20 | Stephan Schulz | Assigned To | => Ina Schieferdecker
13-10-2007 19:09 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
18-10-2007 14:30 | Ina Schieferdecker | Target Version | => Edition 3.3.1 (not yet published)
18-10-2007 14:30 | Ina Schieferdecker | Additional Information Updated |
18-10-2007 18:33 | Gyorgy Rethy | File Added: CR383_Part-7part.doc |
19-10-2007 10:15 | Gyorgy Rethy | File Added: CR383_Part-7part_R1.doc |
19-10-2007 10:16 | Gyorgy Rethy | File Deleted: CR383_Part-7part.doc |
19-10-2007 10:24 | Gyorgy Rethy | File Added: CR383_additional notes.doc |
19-10-2007 13:03 | Gyorgy Rethy | File Added: CR383_Part-7part_R2.doc |
19-10-2007 13:06 | Gyorgy Rethy | File Deleted: CR383_additional notes.doc |
19-10-2007 13:06 | Gyorgy Rethy | File Deleted: CR383_Part-7part_R1.doc |
19-10-2007 13:08 | Gyorgy Rethy | File Added: CR383_notesFromGyorgy.doc |
19-10-2007 13:08 | Gyorgy Rethy | File Added: STF_Solution_CR_383_424_1451_2137_2141_2142.zip |
19-10-2007 13:11 | Gyorgy Rethy | Resolution | open => fixed
31-10-2007 16:11 | Thomas DeiÃŸ | File Added: STF_Solution_CR_383_424_1451_2137_2141_2142_TD.zip |
19-11-2007 10:51 | Thomas DeiÃŸ | File Added: STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD.zip |
19-11-2007 10:51 | Thomas DeiÃŸ | File Deleted: STF_Solution_CR_383_424_1451_2137_2141_2142_TD.zip |
19-11-2007 10:51 | Thomas DeiÃŸ | Note Added: 0003996 |
03-12-2007 14:22 | Jens Grabowski | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
03-12-2007 14:22 | Jens Grabowski | Note Added: 0004233 |
04-12-2007 11:21 | Thomas DeiÃŸ | Note Added: 0004256 |
04-12-2007 11:22 | Thomas DeiÃŸ | Note Added: 0004257 |
04-12-2007 11:55 | Thomas DeiÃŸ | File Added: STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD_a.zip |
04-12-2007 11:55 | Thomas DeiÃŸ | File Deleted: STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD.zip |
04-12-2007 11:55 | Thomas DeiÃŸ | File Added: CR_lengthof_sizeof_objid_part7.zip |
04-12-2007 11:56 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Gyorgy Rethy
06-12-2007 16:01 | Gyorgy Rethy | Note Added: 0004387 |
06-12-2007 16:03 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
06-12-2007 16:03 | Gyorgy Rethy | Status | assigned => resolved
06-12-2007 16:06 | Gyorgy Rethy | Status | resolved => feedback
06-12-2007 16:06 | Gyorgy Rethy | Resolution | fixed => reopened
06-12-2007 16:06 | Gyorgy Rethy | Note Added: 0004388 |
06-12-2007 16:10 | Gyorgy Rethy | File Added: STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD_v3.zip |
06-12-2007 16:11 | Gyorgy Rethy | Status | feedback => resolved
06-12-2007 18:00 | Ina Schieferdecker | Status | resolved => closed
06-12-2007 18:00 | Ina Schieferdecker | Note Added: 0004402 |
06-12-2007 18:00 | Ina Schieferdecker | Resolution | reopened => fixed
06-12-2007 18:00 | Ina Schieferdecker | Fixed in Version | => Edition 3.3.1 (not yet published)
12-03-2008 10:22 | user10 | Fixed in Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published)
12-03-2008 10:24 | user10 | Target Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published)
13-02-2009 10:14 | Ina Schieferdecker | Relationship added | related to 0004848

Notes

(0003996)
Thomas DeiÃŸ
19-11-2007 10:51

Resolution of CR2139 added.

(0004233)
Jens Grabowski
03-12-2007 14:22

GyÃ¶rgys resolutions to be checked by Thomas.

(0004256)
Thomas DeiÃŸ
04-12-2007 11:21

Solutions for CR 383, 1451, and 2137 checked.
Where possible, corrections are made to file
STF_Solution_CR_383_424_1451_2137_2139_2141_2142_TD_a.zip
C.25: one error cause missing (str2int("1-1")) (corrected)
C.29: sizeof should not be applied to objid, lengthof should be used (corrected)
C.31, C.32: keywords in examples changed to boldface
C.34: substr function: Templates with ? and * are allowed for string types only. Text extended and error cause added.
C.33 (regexp) not yet handled!!!!!
New open issue: shall str2float be extended to convert 'integer' strings, too? str2float("1") -> 1.0;

(0004257)
Thomas DeiÃŸ
04-12-2007 11:22

Reminder to cover also lengthof/sizeof and decompose/substr for objid

(0004387)
Gyorgy Rethy
06-12-2007 16:01

Thomas's comments are checked and accepted. In addition, substr handling binary string templates and record/set of templates has been clarified (only ? is allowed and the substring to be returned shall not contain matching). Also new issue on str2float is resolved

(0004388)
Gyorgy Rethy
06-12-2007 16:06

For some reason file uploaded is not appeared

(0004402)
Ina Schieferdecker
06-12-2007 18:00

Some typos fixed along the inclusion. lists now used instead of sequences "String operator" section renamed to "List operator"