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

ID | Project | Category | View Status | Date Submitted | Last Update
0007143 | Part 01: TTCN-3 Core Language | Clarification | public | 17-08-2015 10:01 | 14-12-2015 13:41

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.7.1 (published 2015-06) |
Target Version | v4.8.1 (published 2016-07) | Fixed in Version | v4.8.1 (published 2016-07) |
Clause Reference(s) | 7
Source (company - Author) | STF 487

Summary | 0007143: Compound expression for union and anytype

Description

The section 7 rule says that "compound expressions are used for expressions of array, record, record of and set of types".
In my opinion, compound expressions should be allowed for union and anytype too.
// Having the following definitions:
type union U {
integer option1,
charstring option2
}
...
var U v_union;
var anytype v_any;
// it is faster to write
if (v_union == { option1 := 1 }) {...}
if (v_any == { integer := 1}) {...}
// than
if (ischosen(v_union.option1) and v_union.option1 == 1) {...}
if (ischosen(v_any.integer) and v_any.integer == 1) {...}
// the produced executable should be slightly more efficient too

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7143_resolution.docx (168,564) 15-10-2015 13:23 http://oldforge.etsi.org/mantis/file_download.php?file_id=3317&type=bug

Issue History
Date Modified | Username | Field | Change
17-08-2015 10:01 | Tomas Urban | New Issue |
17-08-2015 10:12 | Tomas Urban | Note Added: 0013170 |
21-09-2015 10:27 | Gyorgy Rethy | Target Version | => v4.8.1 (published 2016-07)
21-09-2015 12:15 | Gyorgy Rethy | Note Added: 0013201 |
21-09-2015 15:56 | Gyorgy Rethy | Note Added: 0013222 |
21-09-2015 15:56 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
21-09-2015 15:56 | Gyorgy Rethy | Status | new => assigned
15-10-2015 13:23 | Jacob Wieland - Spirent | File Added: CR7143_resolution.docx |
15-10-2015 13:23 | Jacob Wieland - Spirent | Note Added: 0013407 |
15-10-2015 13:23 | Jacob Wieland - Spirent | Status | assigned => confirmed
03-11-2015 09:19 | Gyorgy Rethy | Status | confirmed => resolved
03-11-2015 09:19 | Gyorgy Rethy | Fixed in Version | => v4.8.1 (published 2016-07)
03-11-2015 09:19 | Gyorgy Rethy | Resolution | open => fixed
14-12-2015 13:41 | Gyorgy Rethy | Note Added: 0013620 |
14-12-2015 13:41 | Gyorgy Rethy | Status | resolved => closed

Notes

(0013170)
Tomas Urban
17-08-2015 10:12

For some reason, the set type is also missing from the same rule.

(0013201)
Gyorgy Rethy
21-09-2015 12:15

Of course, the "faster syntax" is allowed, let check and correct rule in section 7.

(0013222)
Gyorgy Rethy
21-09-2015 15:56

STF discussion: add union and set to the sentence.

(0013407)
Jacob Wieland - Spirent
15-10-2015 13:23

added union, set and anytype

(0013620)
Gyorgy Rethy
14-12-2015 13:41

Added to draft V4.7.4