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

ID | Project | Category | View Status | Date Submitted | Last Update
0005785 | Part 01: TTCN-3 Core Language | Clarification | public | 08-10-2010 09:48 | 01-07-2011 17:52

Reporter | Andras Kovacs |
Assigned To | Ina Schieferdecker |
Priority | high | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.3.2 (interim 2011) | Fixed in Version | v4.3.2 (interim 2011) |
Clause Reference(s) | [Part 1: TTCN-3 Core Language / Section 6.3.2 ]
Source (company - Author) | BroadBit - Andras Kovacs

Summary | 0005785: STF409 question on [Part 1: TTCN-3 Core Language / Section 6.3.2 ]
Description | Is the assignment between record and set types possible if their structures are compatible? The standard contains neither a positive or a negative statement on this issue. STF409 experts assumed the answer to above question to be yes.
Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR5785.docx (31,957) 25-05-2011 14:30 http://oldforge.etsi.org/mantis/file_download.php?file_id=2484&type=bug CR5785_resolution_v2.docx (29,935) 25-05-2011 15:32 http://oldforge.etsi.org/mantis/file_download.php?file_id=2488&type=bug

Issue History
Date Modified | Username | Field | Change
08-10-2010 09:48 | Andras Kovacs | New Issue |
08-10-2010 09:48 | Andras Kovacs | Clause Reference(s) | => [Part 1: TTCN-3 Core Language / Section 6.3.2 ]
08-10-2010 09:48 | Andras Kovacs | Source (company - Author) | => BroadBit - Andras Kovacs
14-10-2010 12:51 | Jacob Wieland - Spirent | Note Added: 0009785 |
30-11-2010 09:41 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
30-11-2010 16:12 | Gyorgy Rethy | Note Added: 0009858 |
30-11-2010 16:13 | Gyorgy Rethy | Status | new => closed
30-11-2010 16:13 | Gyorgy Rethy | Resolution | open => no change required
01-12-2010 10:55 | Benjamin Zeiss | Status | closed => feedback
01-12-2010 10:55 | Benjamin Zeiss | Resolution | no change required => reopened
01-12-2010 10:55 | Benjamin Zeiss | Note Added: 0009885 |
01-12-2010 14:57 | David Diaz (MTP) | Note Added: 0009898 |
02-12-2010 12:20 | Jacob Wieland - Spirent | Note Added: 0009928 |
02-12-2010 12:54 | Gyorgy Rethy | Note Added: 0009929 |
02-12-2010 12:56 | Gyorgy Rethy | Note Edited: 0009929 |
02-12-2010 16:06 | David Diaz (MTP) | Note Added: 0009934 |
13-12-2010 12:42 | Gyorgy Rethy | Target Version | => Edition 4.4.1
13-12-2010 12:42 | Gyorgy Rethy | Target Version | Edition 4.4.1 => Edition 4.3.2 (interim)
24-05-2011 16:15 | Gyorgy Rethy | Note Added: 0010034 |
24-05-2011 16:15 | Gyorgy Rethy | Status | feedback => assigned
24-05-2011 16:15 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
24-05-2011 19:31 | Gyorgy Rethy | Priority | normal => high
25-05-2011 14:30 | Ina Schieferdecker | File Added: CR5785.docx |
25-05-2011 14:32 | Ina Schieferdecker | Note Added: 0010054 |
25-05-2011 14:33 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
25-05-2011 15:32 | Gyorgy Rethy | File Added: CR5785_resolution_v2.docx |
25-05-2011 15:35 | Gyorgy Rethy | Note Added: 0010057 |
25-05-2011 15:35 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
30-06-2011 18:44 | Ina Schieferdecker | Note Added: 0010170 |
30-06-2011 18:45 | Ina Schieferdecker | Status | assigned => resolved
30-06-2011 18:45 | Ina Schieferdecker | Fixed in Version | => Edition 4.3.2 (interim)
30-06-2011 18:45 | Ina Schieferdecker | Resolution | reopened => fixed
01-07-2011 17:52 | Ina Schieferdecker | Status | resolved => closed

Notes

(0009785)
Jacob Wieland - Spirent
14-10-2010 12:51

The main sentence of section 6.3.2 states clearly:
In the case of structured types (except the enumerated type) a value "b" of type "B" is compatible with type "A", if the effective value structures of type "B" and type "A" are compatible, in which case assignments, instantiations and comparisons are allowed.
Since the effective value structures of set and record types with the same field definitions are compatible if the field names are the same (because the field names are determinate for set types) and for every field the type of the field is compatible with the type of the field with the same name in the other type, then according to the above sentence, the set and record type are compatible.
If that is not the intended meaning, the standard should be amended with a sentence like 'Only those structured types are compatible which are described in the following sub-sections'.

(0009858)
Gyorgy Rethy
30-11-2010 16:12

STF discussion on 30-11-2010: according to the analysis above STF409 experts are correct.No need to change the standard.

(0009885)
Benjamin Zeiss
01-12-2010 10:55

This is feedback from Elvior regarding this issue and the proposal made:
Standard is ambiguous, clause 6.3.2.3 must clearly state either:
a)set of types are only type compatible with other set types and set of types
or
b)set of is types are type compatible with other set types, set of types, record types, record of types and array types
We do not like alternative b), since set is also compatible with set and set of only.
We propose to change 6.3.2.3 so that the first sentence of 6.3.2.3 starts: "set and set of types are..."
Until this ambiguity is not removed from standard, we object respective test cases in STF 409.

(0009898)
David Diaz (MTP)
01-12-2010 14:57

Dear all,
Related with the CR question: â€œIs the assignment between record and set types possible if their structures are compatible? â€œ, from our point of view, the standard is clear enough:
ETSI ES 201 873-1 V4.2.1 (2010-07) â€“ 6.3.2.3
â€œset types are only type compatible with other set types and set of typesâ€
So set type is not compatible with record type. We understand this 6.2.3 paragraph:
In the case of structured types (except the enumerated type) a value "b" of type "B" is compatible with type "A", if
the effective value structures of type "B" and type "A" are compatible, in which case assignments, instantiations and
comparisons are allowed.
is a general rule overrided by 6.3.2.3 section.
From our point of view any STF409 ATS test case where assignments between record and set types are being performed must resolve to a semantic error. If this is not the case, and different opinions on this issue are being considered, we think this set of test cases should be removed from the ATS as a preventative measure until no agreement is reached.
Best regards,
David (MTP)

(0009928)
Jacob Wieland - Spirent
02-12-2010 12:20

So, the standard is inconsistent as there are no 'overriding' rules from one statement to another. So, either the other exceptions to the general rule (for records and sets) should also be mentioned (like already for enumerated types) in the general section or the restrictions should be removed in the more specific sections to make the standard consistent.

(0009929)
Gyorgy Rethy
02-12-2010 12:54 (edited on: 02-12-2010 12:56)

I think that the general sentence in 6.3.2 should be removed and the "compatible effective value structure" be defined in clause 3.1 as a definition. As of today, seems that this general sentence is a potential source of misunderstandings/misinterpretation.
The following subclauses of 6.3.2 are defining clearly what may be compatible with what: enumerated with nothing; record, record ofs & arrays may be mutually compatible; sets and set ofs may be compatible with each other (but not with record & record ofs); union with union and anytype with anytype may be compatible. I strongly oppose to interpret any other compatibility relation based on a general sentence, meant to be, in fact, a definition, when in the relevant clauses clear compatibility rules are defined.

(0009934)
David Diaz (MTP)
02-12-2010 16:06

Dear Gyorgy, We fully agree with your proposal. Regards, David

(0010034)
Gyorgy Rethy
24-05-2011 16:15

The "if the effective value structures of type "B" and type "A" are compatible" part can be deleted as it doesn't add to the content of the subsequent clauses.

(0010054)
Ina Schieferdecker
25-05-2011 14:32

Proposal to get rid of the case â€œrecord of types and single-dimension arrays are compatible with record typesâ€ by deprecating it. In this case, "effective value structure" not needed to define type compatibility as given in the uploaded draft text. Please check.

(0010057)
Gyorgy Rethy
25-05-2011 15:35

See CR5785_resolution_v2.docx. No technical change to CR5785.docx but text is changed at several places. Note: Interestingly, also spaces are lost at several places when opening the .docx file.

(0010170)
Ina Schieferdecker
30-06-2011 18:44

Implemented basically as proposed. Changed also at other places "Type compatibility ..." to "Compatibility ..." where appropriate.