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

ID | Project | Category | View Status | Date Submitted | Last Update
0003758 | Part 01: TTCN-3 Core Language | Clarification | public | 14-07-2008 13:27 | 10-12-2008 12:31

Reporter | Thomas DeiÃŸ |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v3.3.2 (published 2008-04) |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | 6.1.1.1
Source (company - Author) | Nokia Siemens Networks, Thomas DeiÃŸ

Summary | 0003758: unclear operand limitations in write access to strings

Description

In the following examples the standard leaves it open whether the assignments are allowed and if so what would be the meaning.
MyBitStringA := '010'B;
MyBitStringA[1] := '11'B;
MyBitStringB := '1'B;
MyBitStringB[4] := '1'B;
MyBitStringC := ''B;
MyBitStringC[0] := '1'B;
Proposed resolution, all three cases should be disallowed. The index shall be limited to greater or equal than 0 and smaller than the length of the string on the lhs. The element to be assigned has to be a string of length exactly 1 and it has to be of the same kind as the string on the lhs.
This applies to bitstring, hexstring, octetstring, charstring, and universal charstring. It does NOT apply to record of, set of, and array.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |

Attached Files

CR3758 - accessing individual string elements.doc (148,992) 28-11-2008 09:33
http://oldforge.etsi.org/mantis/file_download.php?file_id=1832&type=bug
CR3758 - accessing individual string elements_02.doc (144,896) 28-11-2008 12:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=1835&type=bug
CR3758_-_accessing_individual_string_elements_03.doc (149,504) 09-12-2008 14:25
http://oldforge.etsi.org/mantis/file_download.php?file_id=1872&type=bug
CR3758_-_accessing_individual_string_elements_04.doc (145,920) 09-12-2008 15:10
http://oldforge.etsi.org/mantis/file_download.php?file_id=1876&type=bug
CR3758_-_accessing_individual_string_elements_05.doc (151,552) 10-12-2008 12:19
http://oldforge.etsi.org/mantis/file_download.php?file_id=1880&type=bug

Issue History
Date Modified | Username | Field | Change
14-07-2008 13:27 | Thomas DeiÃŸ | New Issue |
14-07-2008 13:27 | Thomas DeiÃŸ | Status | new => assigned
14-07-2008 13:27 | Thomas DeiÃŸ | Assigned To | => Ina Schieferdecker
14-07-2008 13:27 | Thomas DeiÃŸ | Clause Reference(s) | => 6.1.1.1
14-07-2008 13:27 | Thomas DeiÃŸ | Source (company - Author) | => Nokia Siemens Networks, Thomas DeiÃŸ
14-07-2008 14:58 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
17-08-2008 09:17 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
28-11-2008 09:08 | Gyorgy Rethy | Note Added: 0007494 |
28-11-2008 09:33 | Gyorgy Rethy | File Added: CR3758 - accessing individual string elements.doc |
28-11-2008 09:34 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
28-11-2008 12:17 | Thomas DeiÃŸ | File Added: CR3758 - accessing individual string elements_02.doc |
28-11-2008 12:18 | Thomas DeiÃŸ | Note Added: 0007499 |
28-11-2008 12:19 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
28-11-2008 12:19 | Thomas DeiÃŸ | Resolution | open => fixed
09-12-2008 14:25 | Ina Schieferdecker | File Added: CR3758_-_accessing_individual_string_elements_03.doc |
09-12-2008 14:26 | Ina Schieferdecker | Note Added: 0007599 |
09-12-2008 14:26 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
09-12-2008 15:10 | Thomas DeiÃŸ | File Added: CR3758_-_accessing_individual_string_elements_04.doc |
09-12-2008 15:11 | Thomas DeiÃŸ | Note Added: 0007602 |
09-12-2008 15:11 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
10-12-2008 12:19 | Ina Schieferdecker | File Added: CR3758_-_accessing_individual_string_elements_05.doc |
10-12-2008 12:19 | Ina Schieferdecker | Note Added: 0007626 |
10-12-2008 12:20 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
10-12-2008 12:26 | Thomas DeiÃŸ | Note Added: 0007627 |
10-12-2008 12:26 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
10-12-2008 12:31 | Ina Schieferdecker | Status | assigned => resolved
10-12-2008 12:31 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published)
10-12-2008 12:31 | Ina Schieferdecker | Status | resolved => closed

Notes

(0007494)
Gyorgy Rethy
28-11-2008 09:08

MyBitStringA[1] := '11'B
is clearly an error, the standard says in $6.1.1.1:"Individual elements in a string type may be accessed using an array-like syntax. Only single elements of the string may be accessed."
I think no further clarification is needed.
MyBitStringB[4] := '1'B;
should be an error as the result would be an uninitialized value.
MyBitStringC[0] := '1'B;
should be allowed as te result is a fully initialized value;

(0007499)
Thomas DeiÃŸ
28-11-2008 12:18

explanation in one of the examples completed. Otherwise ok.

(0007599)
Ina Schieferdecker
09-12-2008 14:26

It should be length minus one. Otherwise ok.

(0007602)
Thomas DeiÃŸ
09-12-2008 15:11

It's even more complicated. The index is bound by length - 1 when retrieving an element from a string. And the index is bound by length when assigning an element to a string. Proposal updated and uploaded as v04.

(0007626)
Ina Schieferdecker
10-12-2008 12:19

Reworded and example added. Please check.

(0007627)
Thomas DeiÃŸ
10-12-2008 12:26

ok.