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

ID | Project | Category | View Status | Date Submitted | Last Update
0007288 | Part 01: TTCN-3 Core Language | Clarification | public | 06-01-2016 11:49 | 12-12-2016 11:06

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.9.1 (published 2017-05) | Fixed in Version | v4.9.1 (published 2017-05) |
Clause Reference(s) | 6.2.3, 27.7, 3.1
Source (company - Author) | Elvior

Summary | 0007288: Not described use cases for optional attribute

Description

The current rules for the optional attribute describe very well the situation when the RHS of an assignment contains a value or field list (6.2.3).
However, other assignments of a record (or set) value are possible:
a) a direct assignment (either from a function or a different record), e.g.:
type record R {
integer field1 optional,
integer field2 optional
}
...
var R v_var1 := { 1, - };
var R v_var2 with { optional "implicit omit" };
v_var2 := v_var1; // will we get { 1, omit } or { 1, - }?
b) only individual fields are assigned
var R v_var3 with { optional "implicit omit" };
// what is the value now? uninitialized or {omit, omit}?
v_var3.field1 := 1; // is the value of v_var3 { 1, omit } or { 1, - }?
The specification doesn't provide any examples on how to handle these situations. The rules of 27.7 seem to point in the direction of inserting the omit symbol, but e.g. the note 2 in the section on partially defined values in 3.1 mentions the list syntax specifically.
Proposal: Add rules/notes/examples describing TTCN-3 behaviour in the above mentioned cases.

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

Relationships

related to | 0007453 | closed | Gyorgy Rethy | Restriction on use of optional attibutes in variables
related to | 0007473 | closed | Gyorgy Rethy | Chapter 6.2.1 inconsitencies in optionial attribute "explicit omit"

Attached Files | CR_7288.docx (20,572) 19-07-2016 09:58 http://oldforge.etsi.org/mantis/file_download.php?file_id=3415&type=bug CR7288_v2.docx (159,145) 20-07-2016 09:10 http://oldforge.etsi.org/mantis/file_download.php?file_id=3421&type=bug

Issue History
Date Modified | Username | Field | Change
06-01-2016 11:49 | Tomas Urban | New Issue |
07-01-2016 08:50 | Gyorgy Rethy | Target Version | => v4.6.2 (interim 2014)
18-07-2016 11:13 | Jens Grabowski | Assigned To | => KristÃ³f Szabados
18-07-2016 11:13 | Jens Grabowski | Status | new => assigned
18-07-2016 11:15 | Jens Grabowski | Note Added: 0013976 |
18-07-2016 15:00 | KristÃ³f Szabados | Note Added: 0013982 |
18-07-2016 15:31 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Tomas Urban
18-07-2016 15:59 | Tomas Urban | Relationship added | related to 0007453
18-07-2016 16:05 | Tomas Urban | Note Added: 0013983 |
18-07-2016 16:05 | Tomas Urban | Assigned To | Tomas Urban => KristÃ³f Szabados
19-07-2016 09:58 | KristÃ³f Szabados | File Added: CR_7288.docx |
19-07-2016 09:59 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Tomas Urban
19-07-2016 10:05 | KristÃ³f Szabados | Note Added: 0013985 |
19-07-2016 10:05 | KristÃ³f Szabados | Status | assigned => feedback
20-07-2016 09:10 | KristÃ³f Szabados | File Added: CR7288_v2.docx |
20-07-2016 13:52 | Thilo Lauer | Note Added: 0014008 |
21-07-2016 08:12 | Tomas Urban | Note Added: 0014017 |
21-07-2016 08:19 | Tomas Urban | Note Added: 0014018 |
21-07-2016 08:19 | Tomas Urban | Assigned To | Tomas Urban => KristÃ³f Szabados
21-07-2016 08:19 | Tomas Urban | Status | feedback => assigned
22-07-2016 13:50 | KristÃ³f Szabados | Note Added: 0014039 |
22-07-2016 13:50 | KristÃ³f Szabados | Status | assigned => resolved
22-07-2016 13:50 | KristÃ³f Szabados | Resolution | open => fixed
22-07-2016 13:50 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Gyorgy Rethy
17-08-2016 05:26 | KristÃ³f Szabados | Relationship added | related to 0007473
17-08-2016 10:52 | Jacob Wieland - Spirent | Status | resolved => feedback
17-08-2016 10:52 | Jacob Wieland - Spirent | Resolution | fixed => reopened
17-08-2016 10:52 | Jacob Wieland - Spirent | Target Version | v4.6.2 (interim 2014) => v4.9.1 (published 2017-05)
17-08-2016 10:54 | Jacob Wieland - Spirent | Status | feedback => resolved
17-08-2016 10:54 | Jacob Wieland - Spirent | Resolution | reopened => fixed
12-12-2016 11:06 | Gyorgy Rethy | Note Added: 0014378 |
12-12-2016 11:06 | Gyorgy Rethy | Status | resolved => closed
12-12-2016 11:06 | Gyorgy Rethy | Fixed in Version | => v4.9.1 (published 2017-05)

Notes

(0013976)
Jens Grabowski
18-07-2016 11:15

Majority for a) v_var2 := v_var1; // will we get { 1, omit } b) v_var3.field1 := 1; // is the value of v_var3 { 1, omit }

(0013982)
KristÃ³f Szabados
18-07-2016 15:00

As far as I understand this usage against the standard.
In version 4.8.1 (the latest I can reach) optional attributes can not be associated to variables.
27.7 starts with
"The optional attribute can be used to indicate that optional fields of constants, module parameters or templates of record and set types are implicitly set to omit."
restriction "a" in this section explicitly states that variables can not be associated with optional attributes:
"Data type, port type, procedure signature and variable definitions and import statements shall not have an optional attribute associated to them directly"

(0013983)
Tomas Urban
18-07-2016 16:05

I created a new CR regarding this issue (0007453). Regardless of the resolution of this CR, the first issue has to be still addressed as constants, templates and module parameters can be initialized without using value list or assignment notation.

(0013985)
KristÃ³f Szabados
19-07-2016 10:05

after separating the issue of variables into a new CR "v_var2 := v_var1; // will we get { 1, omit }" sounds good (constants/templates/moduleparameters)

(0014008)
Thilo Lauer
20-07-2016 13:52

It seems that there is a general misunderstanding of (-) and omit in this CR:
(-) in current TTCN-3 is a "skip this assignment" symbol and no(!) value that can be stored e.g. in a variable!
omit is a special value that can be stored e.g. in a template variable!
Therefore a variable can never(!) have a "value" { 1, - } !!!
The variable "value" here can only be { 1, omit } or { 1, <unbound> }
or it can have a template "value" or a value "value":
{ 1, ? } or { 1, 99 }

(0014017)
Tomas Urban
21-07-2016 08:12

The skip symbol is used as <unbound> or UNINITIALIZED in this context. It is just shorter to write is this way.

(0014018)
Tomas Urban
21-07-2016 08:19

The last proposal solves the first issue. The solution for the second issue is dependent on the resolution of 0007453. If it allows to use optional attributes for variables, the proposal has to be extended. Otherwise, you can mark te CR as resolved.

(0014039)
KristÃ³f Szabados
22-07-2016 13:50

The first issue was corrected. The second should be considered when CR 7453 is handled.

(0014378)
Gyorgy Rethy
12-12-2016 11:06

Added to V4.8.2