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

ID | Project | Category | View Status | Date Submitted | Last Update
0006646 | Part 01: TTCN-3 Core Language | Technical | public | 17-10-2013 17:23 | 04-01-2015 21:01

Reporter | Tomas Urban |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.5.1 (published 2013-04) |
Target Version | v4.7.1 (published 2015-06) | Fixed in Version | v4.7.1 (published 2015-06) |
Clause Reference(s) | 6.2
Source (company - Author) | STF 470

Summary | 0006646: Missing semantic rules for the index and assignment notation

Description

The following rules seem to be obvious and implicitly implied, but it would be worth of considering to declare them explicitly:
1. The value used in the index notation shall be of an integer type (The specification currently only mentions numeric boundaries without formally saying anything about the type. It raises a question whether e.g. arr["0"] can be a valid statement. In some programming languages, it is a valid statement.)
2. The value used in the index notation shall not be smaller than the index of the first item. (The current rules specify precisely the lower index only, but underflow situation is not considered at all).
3. The index values used in the assignment notation for record of, set of and array values shall obey the rules valid for values used in the index notation. (Although obvious, such a rule is currently missing and it would be wise to formalize it.)
P.S. Missing rules of this kind complicate the work of STF 470, because without a formal requirement, it is difficult to link a our test cases with related clauses in the core language specification and causes troubles in tracking test coverage.

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

Relationships

related to | 0006762 | closed | Gyorgy Rethy | Array indexing breaches strong typing principle
related to | 0006645 | closed | Gyorgy Rethy | Rules for array values

Attached Files | CR6646.doc (342,016) 26-11-2013 11:15 http://oldforge.etsi.org/mantis/file_download.php?file_id=2939&type=bug CR6646_v2.doc (349,184) 08-10-2014 11:24 http://oldforge.etsi.org/mantis/file_download.php?file_id=3110&type=bug

Issue History
Date Modified | Username | Field | Change
17-10-2013 17:23 | Tomas Urban | New Issue |
17-10-2013 17:23 | Tomas Urban | Clause Reference(s) | => 6.2
17-10-2013 17:23 | Tomas Urban | Source (company - Author) | => STF 470
21-11-2013 10:44 | Gyorgy Rethy | Status | new => assigned
21-11-2013 10:44 | Gyorgy Rethy | Assigned To | => Jacob Wieland - Spirent
21-11-2013 13:18 | Gyorgy Rethy | Note Added: 0011812 |
21-11-2013 13:18 | Gyorgy Rethy | Target Version | => v4.6.1 (published 2014-06)
26-11-2013 11:15 | Jacob Wieland - Spirent | File Added: CR6646.doc |
26-11-2013 11:18 | Jacob Wieland - Spirent | Note Added: 0011832 |
26-11-2013 11:18 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
26-11-2013 11:18 | Jacob Wieland - Spirent | Status | assigned => confirmed
08-04-2014 16:51 | Gyorgy Rethy | Target Version | v4.6.1 (published 2014-06) => v4.7.1 (published 2015-06)
06-10-2014 14:56 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jens Grabowski
06-10-2014 14:56 | Gyorgy Rethy | Status | confirmed => assigned
06-10-2014 14:57 | Gyorgy Rethy | Status | assigned => confirmed
07-10-2014 16:05 | Jens Grabowski | Assigned To | Jens Grabowski => Tomas Urban
07-10-2014 16:05 | Jens Grabowski | Status | confirmed => assigned
07-10-2014 16:05 | Jens Grabowski | Status | assigned => confirmed
07-10-2014 16:16 | Tomas Urban | Note Added: 0012262 |
07-10-2014 16:16 | Tomas Urban | Status | confirmed => resolved
07-10-2014 16:16 | Tomas Urban | Resolution | open => fixed
07-10-2014 16:16 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
08-10-2014 11:24 | Tomas Urban | Assigned To | Gyorgy Rethy => Tomas Urban
08-10-2014 11:24 | Tomas Urban | Note Added: 0012276 |
08-10-2014 11:24 | Tomas Urban | Status | resolved => feedback
08-10-2014 11:24 | Tomas Urban | Resolution | fixed => reopened
08-10-2014 11:24 | Tomas Urban | File Added: CR6646_v2.doc |
08-10-2014 11:25 | Tomas Urban | Relationship added | related to 0006762
08-10-2014 11:29 | Tomas Urban | Note Added: 0012277 |
08-10-2014 11:29 | Tomas Urban | Status | feedback => assigned
08-10-2014 11:29 | Tomas Urban | Assigned To | Tomas Urban => Jens Grabowski
08-10-2014 11:29 | Tomas Urban | Status | assigned => confirmed
08-10-2014 14:41 | Jens Grabowski | Status | confirmed => resolved
08-10-2014 14:41 | Jens Grabowski | Resolution | reopened => fixed
08-10-2014 14:41 | Jens Grabowski | Assigned To | Jens Grabowski => Gyorgy Rethy
05-11-2014 09:46 | Tomas Urban | Relationship added | related to 0006645
04-01-2015 21:01 | Gyorgy Rethy | Note Added: 0012614 |
04-01-2015 21:01 | Gyorgy Rethy | Status | resolved => closed
04-01-2015 21:01 | Gyorgy Rethy | Fixed in Version | => v4.7.1 (published 2015-06)

Notes

(0011812)
Gyorgy Rethy
21-11-2013 13:18

Jacob, pls. check in the standard's text what rules are missing for the index notation. All rules could be listed in clause 6.2.3, to make it easier for the reader (and also for us to notice if something is missing). Other: - "indexed notation" should be changed to "index notation": clause 6.2, 6.2.3 (2*), 6.2.7 - "Indexed value notation" be changed to index notation too: clause 6.2.3, 6.2.7

(0011832)
Jacob Wieland - Spirent
26-11-2013 11:18

I have put/refined the explanation regarding the index in the index notation definition. 6.2.3 only treats record of an set of while index notation is also for arrays and string types (with the same restrictions). Also changed all references to the notation to "index notation"

(0012262)
Tomas Urban
07-10-2014 16:16

The proposed resolution solves the issues described in this CR and can be added into next version of the TTCN-3 core language standard.

(0012276)
Tomas Urban
08-10-2014 11:24

Reopened because of use of the forbidden word "must" and missing reference to array and record of values used as an index in the index notation definition.

(0012277)
Tomas Urban
08-10-2014 11:29

When I was updating 0006762 I noticed that some facts were missing in the indexing value definition. I modified the definition adding the missing features. Please check.

(0012614)
Gyorgy Rethy
04-01-2015 21:01

Added to draft V4.6.3