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

ID | Project | Category | View Status | Date Submitted | Last Update
0007446 | Part 01: TTCN-3 Core Language | Clarification | public | 24-06-2016 10:32 | 12-12-2016 10:31

Reporter | Jacob Wieland - Spirent |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.8.1 (published 2016-07) |
Target Version | v4.9.1 (published 2017-05) | Fixed in Version | v4.9.1 (published 2017-05) |
Clause Reference(s) | 19.3
Source (company - Author) | Spirent - Jacob Wieland

Summary | 0007446: definite overlapping of select cases should be disallowed or at least discouraged

Description

In a testsuite in the LTE context, there was a select statement over a (very large) enumerated type where some cases (probably wrongly due to copy-paste or some other editorial reason) used the same enumerated values in multiple cases.
According to the current semantics of the select statement, this is not forbidden and in effect leads only to dead code, i.e. the later cases of the same value are never reached. Since it is not disallowed, it also doesn't seem to be checked by the available tools up till now, even though this would clearly benefit the user.
Therefore, it is proposed to forbid/discourage unambiguous overlapping of cases, i.e. a later case shall not use only the same expressions that earlier cases already covered.
Of course, since it is allowed to use templates in select statements, the overlapping-property can not in all cases be easily (or at all) be determined. It should be up to the tool how much effort should be put into this analysis beyond checking for the same syntactic expressions (which is trivial).
For backward compatibility reasons, we should simply strongly discourage such definite overlapping, so that tools shall be allowed to treat that as an error, if they find a definite overlap (and otherwise ignore it as before).

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

Attached Files

CR7446_proposal_v1.docx (153,456) 17-08-2016 11:12
http://oldforge.etsi.org/mantis/file_download.php?file_id=3470&type=bug
CR7446_proposal_v2.docx (153,886) 17-08-2016 14:11
http://oldforge.etsi.org/mantis/file_download.php?file_id=3473&type=bug
CR7446_proposal_v3.docx (154,559) 17-08-2016 22:43
http://oldforge.etsi.org/mantis/file_download.php?file_id=3483&type=bug
CR7446_proposal_v4.docx (154,246) 18-08-2016 15:48
http://oldforge.etsi.org/mantis/file_download.php?file_id=3493&type=bug

Issue History
Date Modified | Username | Field | Change
24-06-2016 10:32 | Jacob Wieland - Spirent | New Issue |
18-07-2016 10:16 | Jens Grabowski | Assigned To | => KristÃ³f Szabados
18-07-2016 10:16 | Jens Grabowski | Status | new => assigned
17-08-2016 11:12 | KristÃ³f Szabados | File Added: CR7446_proposal_v1.docx |
17-08-2016 11:18 | KristÃ³f Szabados | Note Added: 0014128 |
17-08-2016 11:18 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
17-08-2016 11:18 | KristÃ³f Szabados | Status | assigned => confirmed
17-08-2016 11:18 | Jacob Wieland - Spirent | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
17-08-2016 11:19 | Jacob Wieland - Spirent | Product Version | => v4.8.1 (published 2016-07)
17-08-2016 11:19 | Jacob Wieland - Spirent | Target Version | => v4.9.1 (published 2017-05)
17-08-2016 14:11 | KristÃ³f Szabados | File Added: CR7446_proposal_v2.docx |
17-08-2016 14:12 | KristÃ³f Szabados | Note Added: 0014131 |
17-08-2016 22:43 | KristÃ³f Szabados | File Added: CR7446_proposal_v3.docx |
17-08-2016 22:44 | KristÃ³f Szabados | Note Added: 0014143 |
18-08-2016 15:48 | Jacob Wieland - Spirent | File Added: CR7446_proposal_v4.docx |
18-08-2016 15:48 | Jacob Wieland - Spirent | Status | confirmed => resolved
18-08-2016 15:48 | Jacob Wieland - Spirent | Fixed in Version | => v4.9.1 (published 2017-05)
18-08-2016 15:48 | Jacob Wieland - Spirent | Resolution | open => fixed
18-08-2016 15:48 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
12-12-2016 10:31 | Gyorgy Rethy | Note Added: 0014374 |
12-12-2016 10:31 | Gyorgy Rethy | Status | resolved => closed

Notes

(0014128)
KristÃ³f Szabados
17-08-2016 11:18

Could you check my proposed solution? I added a note on how non-overlaping template instances in branches and a deterministic expression in the header could be used for better performance.

(0014131)
KristÃ³f Szabados
17-08-2016 14:12

Added the note on how overlapping is discouraged (as it creates dead code). Please check.

(0014143)
KristÃ³f Szabados
17-08-2016 22:44

I have added the restriction as discussed.

(0014374)
Gyorgy Rethy
12-12-2016 10:31

Added to draft V4.8.2