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

ID | Project | Category | View Status | Date Submitted | Last Update
0005876 | Part 01: TTCN-3 Core Language | Technical | public | 08-04-2011 17:13 | 01-07-2011 17:42

Reporter | Gyorgy Rethy |
Assigned To | Ina Schieferdecker |
Priority | high | Severity | minor | Reproducibility | always
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) | 6.2.3
Source (company - Author) | L.M.Ericsson

Summary | 0005876: How to use implicit omit with value list notation?

Description

Currently it is not defined in the standard, how to fill up a record/set value in case of value list notation. E.g. in the case:
type record MyRec {
integer f1,
integer f2 optional,
integer f3,
integer f4,
integer f5 optional }
const MyRec cg_MyRec := { 1,2,4 } with {optional "implicit omit"}
// the value of cg_MyRec is { f1:=1, f2:= omit, f3:=2, f4:=4, f5 :=omit }, or an error, because
// the value 2 is assigned to f2 and no value is assigned to the mandatory
// field f4.
SOLUTION PROPOSAL:
The semantics should be consistent with the semantics of actual parameter lists passed to formal parameter lists with default values, i.e. even in case of implicit omit, the unassigned optional fields should be skipped explicitly by a not used symbol. I.e. the example above should cause an error and
const MyRec cg_MyRec2 := { 1, -, 2, 4 }
//should result the value { f1:=1, f2:= omit, f3:=2, f4:=4, f5 :=omit }

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | es_20187301v040205m_CR_5876.doc (22,016) 26-05-2011 08:48 http://oldforge.etsi.org/mantis/file_download.php?file_id=2496&type=bug CR_5876_resolution_v2.doc (33,792) 27-05-2011 14:15 http://oldforge.etsi.org/mantis/file_download.php?file_id=2519&type=bug CR_5876_resolution_v3.doc (25,600) 27-05-2011 16:48 http://oldforge.etsi.org/mantis/file_download.php?file_id=2521&type=bug

Issue History
Date Modified | Username | Field | Change
08-04-2011 17:13 | Gyorgy Rethy | New Issue |
08-04-2011 17:13 | Gyorgy Rethy | Clause Reference(s) | => 6.2.3
08-04-2011 17:13 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
08-04-2011 17:18 | Gyorgy Rethy | Description Updated |
09-04-2011 07:41 | Gyorgy Rethy | Description Updated |
24-05-2011 14:10 | Gyorgy Rethy | Status | new => assigned
24-05-2011 14:10 | Gyorgy Rethy | Assigned To | => Jacob Wieland - Spirent
24-05-2011 14:11 | Gyorgy Rethy | Note Added: 0010012 |
24-05-2011 19:06 | Gyorgy Rethy | Target Version | => Edition 4.3.2 (interim)
24-05-2011 19:15 | Gyorgy Rethy | Priority | normal => high
25-05-2011 12:26 | Jacob Wieland - Spirent | Note Added: 0010048 |
26-05-2011 08:12 | Jacob Wieland - Spirent | Note Edited: 0010048 |
26-05-2011 08:48 | Jacob Wieland - Spirent | File Added: es_20187301v040205m_CR_5876.doc |
26-05-2011 09:59 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
26-05-2011 09:59 | Jacob Wieland - Spirent | Note Added: 0010077 |
27-05-2011 14:15 | Gyorgy Rethy | Note Added: 0010103 |
27-05-2011 14:15 | Gyorgy Rethy | File Added: CR_5876_resolution_v2.doc |
27-05-2011 14:15 | Gyorgy Rethy | Note Edited: 0010103 |
27-05-2011 14:16 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
27-05-2011 16:48 | Jacob Wieland - Spirent | File Added: CR_5876_resolution_v3.doc |
27-05-2011 16:49 | Jacob Wieland - Spirent | Note Added: 0010108 |
27-05-2011 16:49 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
29-06-2011 14:27 | Gyorgy Rethy | Note Added: 0010145 |
29-06-2011 14:27 | Gyorgy Rethy | Status | assigned => resolved
29-06-2011 14:27 | Gyorgy Rethy | Resolution | open => fixed
29-06-2011 14:27 | Gyorgy Rethy | Status | resolved => feedback
29-06-2011 14:27 | Gyorgy Rethy | Resolution | fixed => reopened
29-06-2011 14:28 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
29-06-2011 14:28 | Gyorgy Rethy | Status | feedback => resolved
29-06-2011 14:28 | Gyorgy Rethy | Resolution | reopened => fixed
01-07-2011 17:42 | Ina Schieferdecker | Note Added: 0010202 |
01-07-2011 17:42 | Ina Schieferdecker | Status | resolved => closed
01-07-2011 17:42 | Ina Schieferdecker | Fixed in Version | => Edition 4.3.2 (interim)

Notes

(0010012)
Gyorgy Rethy
24-05-2011 14:11

Agreed in principle as proposed, text to be prepared.

(0010048)
Jacob Wieland - Spirent
25-05-2011 12:26 (edited on: 26-05-2011 08:12)

The following should be added to section 6.2
When using value list notation in a scope where the optional attribute is set to "implicit omit", for each mandatory field there shall be an actual element. An optional field can be skipped by using dash "-" as element or by just leaving it out if no other additional element follows in the list â€“ either because the corresponding field is the last in the type or because all following fields are optional and are also left out.
EXAMPLE:
type record R {
integer f1,
integer f2 optional,
integer f3,
integer f4 optional,
integer f5 optional
}
const R x := { 1, -, 2 } with { optional "implicit omit" } // valid
const R x2 := { 1 } with { optional "implicit omit" } // invalid because of f3

(0010077)
Jacob Wieland - Spirent
26-05-2011 09:59

Please review

(0010103)
Gyorgy Rethy
27-05-2011 14:15

I have changed the text to be more explicit. Also, just saying valid or invalid in the examples is not sufficient, the user has to know what is actually happening. Thus, I have changed the examples to var-s and specified their contents after the assignment, just like in the examples before the new paragraph. Updated text is in CR_5876_resolution_v2.doc. Jacob, pls. review.

(0010108)
Jacob Wieland - Spirent
27-05-2011 16:49

corrected the explanation in some places, please review

(0010145)
Gyorgy Rethy
29-06-2011 14:27

Fine with me, see final resolution in CR_5876_resolution_v3.doc

(0010202)
Ina Schieferdecker
01-07-2011 17:42

Implemented as proposed.