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

ID | Project | Category | View Status | Date Submitted | Last Update
0007709 | Part 01: TTCN-3 Core Language | Editorial | public | 15-09-2017 09:43 | 30-12-2017 14:56

Reporter | Tomas Urban |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | trivial | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.9.1 (published 2017-05) |
Target Version |  | Fixed in Version | v4.10.1 (published 2018-05) |
Clause Reference(s) | 6.2.4
Source (company - Author) | Elvior

Summary | 0007709: Invalid template in the example on enumerated templates

Description

The example 3 in the clause 6.2.4 defines a template for an enumerated type in the following way:
match(v_color, Other(6..10))
However, this cannot be correct as according to the BNF and semantic rules defined in 6.2.4, the content of the parentheses shall be a template body. In case of the range template, the correct syntax is with parentheses:
match(v_color, Other((6..10)))
If the intention was to allow inserting ranges directly (which might be quite reasonable), this specific syntax has to be added to the BNF and semantic rules. The other option is to correct the example.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7709.docx (157,384) 25-10-2017 09:23 http://oldforge.etsi.org/mantis/file_download.php?file_id=3692&type=bug CR7709_v2.docx (165,848) 25-10-2017 10:14 http://oldforge.etsi.org/mantis/file_download.php?file_id=3694&type=bug CR7709_v3.docx (165,800) 25-10-2017 10:56 http://oldforge.etsi.org/mantis/file_download.php?file_id=3695&type=bug

Issue History
Date Modified | Username | Field | Change
15-09-2017 09:43 | Tomas Urban | New Issue |
18-09-2017 12:00 | Jacob Wieland - Spirent | Note Added: 0014828 |
24-10-2017 11:12 | Jens Grabowski | Assigned To | => KristÃ³f Szabados
24-10-2017 11:12 | Jens Grabowski | Status | new => assigned
24-10-2017 11:13 | Jens Grabowski | Note Added: 0014839 |
25-10-2017 09:17 | KristÃ³f Szabados | Note Added: 0014861 |
25-10-2017 09:23 | KristÃ³f Szabados | File Added: CR7709.docx |
25-10-2017 10:12 | KristÃ³f Szabados | Note Added: 0014867 |
25-10-2017 10:14 | KristÃ³f Szabados | File Added: CR7709_v2.docx |
25-10-2017 10:15 | KristÃ³f Szabados | Note Added: 0014868 |
25-10-2017 10:15 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Tomas Urban
25-10-2017 10:15 | KristÃ³f Szabados | Status | assigned => confirmed
25-10-2017 10:56 | KristÃ³f Szabados | File Added: CR7709_v3.docx |
25-10-2017 10:57 | KristÃ³f Szabados | Note Added: 0014869 |
25-10-2017 11:06 | Tomas Urban | Note Added: 0014871 |
25-10-2017 11:06 | Tomas Urban | Status | confirmed => resolved
25-10-2017 11:06 | Tomas Urban | Resolution | open => fixed
25-10-2017 11:06 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
30-12-2017 14:56 | Gyorgy Rethy | Note Added: 0014950 |
30-12-2017 14:56 | Gyorgy Rethy | Status | resolved => closed
30-12-2017 14:56 | Gyorgy Rethy | Fixed in Version | => v4.10.1 (published 2018-05)

Notes

(0014828)
Jacob Wieland - Spirent
18-09-2017 12:00

Are you sure that X .. Y is not a template body already (and (X .. Y) not just a combination of value-list with range? If you're sure, I would suggest we add this possibility, as otherwise, the same problem arises in a lot of places receive(integer:3 .. 4) select(v) { case (3..4) ... match(x, 3 .. 4) etc.

(0014839)
Jens Grabowski
24-10-2017 11:13

To be checked for all cases. (To be implemented until end of 2017)

(0014861)
KristÃ³f Szabados
25-10-2017 09:17

Right now the example is erroneous and needs to be corrected.
According to the BNF the EnumTemplateExtension has to contain templateBody -s ... where range requires the '('')'
I would separate adding this syntax into a different task if needed, as it might need its own discussion/investigation.
For example for the current situation templateBody would not need to be extended, only EnumTemplateExtension would need to be changed.
Also changing templatebody could introduce confusing syntax, that needs to be handled carefully.
For example seeing something like subset(1, 3.. 10, 12) looks like a subset allowing at most 10 different values, while actually with the current syntax it is subset(1, (3..10), 12)

(0014867)
KristÃ³f Szabados
25-10-2017 10:12

STF discussion: the EnumTemplateExtension should be extended to allow lists of templatebodies and ranges of integer values.

(0014868)
KristÃ³f Szabados
25-10-2017 10:15

I have added the possibility of using ranges in the EnumTemplateExtension together with templatebodies. Please check.

(0014869)
KristÃ³f Szabados
25-10-2017 10:57

minor change uploaded: we no longer need to change the original example.

(0014871)
Tomas Urban
25-10-2017 11:06

The resolution is correct and can be added to the next version of the core language specification.

(0014950)
Gyorgy Rethy
30-12-2017 14:56

Added to draft V4.9.2