ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0007172Part 01: TTCN-3 Core LanguageClarificationpublic10-09-2015 10:3514-12-2015 13:03
Jacob Wieland - Spirent 
Gyorgy Rethy 
normalminorhave not tried
closedfixed 
v4.7.1 (published 2015-06) 
v4.8.1 (published 2016-07)v4.8.1 (published 2016-07) 
11.1, 11.2, 19
Testing Technologies - Jacob Wieland
0007172: Is variable initialization with undefined function result allowed?
It is forbidden to assign a variable an undefined value, but it is allowed to explicitly initialize with -, i.e. leave it explicitly uninitialized.

The intent of this was to disallow uninitializing things that are already initialized.

Therefore, it should be clarified that variable initialization with a function call that returns an uninitialized result is allowed (in my understanding, it is, but some customers question that).

Also, maybe the restriction should be relaxed to apply only to (partially) initialized variables. I.e. assignment of uninitialized to an uninitialized variable should be allowed, as it can not be harmful.
technically agreed
docx CR7172_resolution_v1.docx (91,441) 23-09-2015 17:54
http://oldforge.etsi.org/mantis/file_download.php?file_id=3275&type=bug
docx CR7172_resolution_v2.docx (103,298) 24-09-2015 15:33
http://oldforge.etsi.org/mantis/file_download.php?file_id=3283&type=bug
docx CR7172_resolution_v3.docx (103,083) 24-09-2015 16:36
http://oldforge.etsi.org/mantis/file_download.php?file_id=3285&type=bug
docx CR7172_resolution_v4.docx (105,421) 25-09-2015 09:55
http://oldforge.etsi.org/mantis/file_download.php?file_id=3287&type=bug
docx CR7172_resolution_v5.docx (107,562) 25-09-2015 13:50
http://oldforge.etsi.org/mantis/file_download.php?file_id=3291&type=bug
docx CR7172_resolution_v6.docx (105,950) 13-10-2015 16:54
http://oldforge.etsi.org/mantis/file_download.php?file_id=3305&type=bug
docx CR7172_resolution_v7.docx (109,746) 13-10-2015 17:26
http://oldforge.etsi.org/mantis/file_download.php?file_id=3306&type=bug
docx CR7172_resolution_v8.docx (112,222) 16-10-2015 08:39
http://oldforge.etsi.org/mantis/file_download.php?file_id=3327&type=bug
docx CR7172_resolution_v8-Comments.docx (84,298) 16-10-2015 10:54
http://oldforge.etsi.org/mantis/file_download.php?file_id=3331&type=bug
docx CR7172_resolution_v9.docx (113,761) 02-11-2015 15:58
http://oldforge.etsi.org/mantis/file_download.php?file_id=3340&type=bug
docx CR7172_resolution_v10.docx (132,430) 03-11-2015 10:42
http://oldforge.etsi.org/mantis/file_download.php?file_id=3346&type=bug
Issue History
10-09-2015 10:35Jacob Wieland - SpirentNew Issue
21-09-2015 09:51Gyorgy RethyProjectTTCN-3 Change Requests => Part 01: TTCN-3 Core Language
21-09-2015 10:26Gyorgy RethyTarget Version => v4.8.1 (published 2016-07)
22-09-2015 10:12Gyorgy RethyTag Attached: technically agreed
22-09-2015 10:13Gyorgy RethyNote Added: 0013235
22-09-2015 10:13Gyorgy RethyAssigned To => Gyorgy Rethy
22-09-2015 10:13Gyorgy RethyStatusnew => assigned
23-09-2015 17:54Gyorgy RethyFile Added: CR7172_resolution_v1.docx
23-09-2015 17:56Gyorgy RethyNote Added: 0013280
23-09-2015 17:56Gyorgy RethyAssigned ToGyorgy Rethy => Jacob Wieland - Spirent
23-09-2015 17:56Gyorgy RethyStatusassigned => confirmed
23-09-2015 17:56Gyorgy RethyProduct Version => v4.7.1 (published 2015-06)
24-09-2015 10:53Jacob Wieland - SpirentNote Added: 0013286
24-09-2015 10:53Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Gyorgy Rethy
24-09-2015 10:53Jacob Wieland - SpirentStatusconfirmed => assigned
24-09-2015 15:33Jacob Wieland - SpirentFile Added: CR7172_resolution_v2.docx
24-09-2015 16:36Gyorgy RethyFile Added: CR7172_resolution_v3.docx
24-09-2015 16:39Gyorgy RethyNote Added: 0013298
24-09-2015 16:39Gyorgy RethyAssigned ToGyorgy Rethy => Jacob Wieland - Spirent
24-09-2015 16:39Gyorgy RethyStatusassigned => confirmed
24-09-2015 16:56Jacob Wieland - SpirentNote Added: 0013299
25-09-2015 09:51Jacob Wieland - SpirentFile Added: CR7172_resolution_v4.docx
25-09-2015 09:55Jacob Wieland - SpirentFile Deleted: CR7172_resolution_v4.docx
25-09-2015 09:55Jacob Wieland - SpirentFile Added: CR7172_resolution_v4.docx
25-09-2015 09:56Jacob Wieland - SpirentStatusconfirmed => assigned
25-09-2015 09:57Jacob Wieland - SpirentNote Added: 0013300
25-09-2015 09:57Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Gyorgy Rethy
25-09-2015 09:57Jacob Wieland - SpirentStatusassigned => confirmed
25-09-2015 13:50Gyorgy RethyFile Added: CR7172_resolution_v5.docx
25-09-2015 13:56Gyorgy RethyNote Added: 0013313
25-09-2015 13:57Gyorgy RethyAssigned ToGyorgy Rethy => Jacob Wieland - Spirent
25-09-2015 15:38Gyorgy RethyNote Edited: 0013313bug_revision_view_page.php?bugnote_id=13313#r173
26-09-2015 11:40Jacob Wieland - SpirentNote Added: 0013330
26-09-2015 12:16Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Gyorgy Rethy
26-09-2015 12:16Jacob Wieland - SpirentStatusconfirmed => assigned
13-10-2015 16:42Gyorgy RethyFile Added: CR7172_resolution_v6.docx
13-10-2015 16:50Gyorgy RethyNote Added: 0013378
13-10-2015 16:50Gyorgy RethyFile Deleted: CR7172_resolution_v6.docx
13-10-2015 16:54Gyorgy RethyFile Added: CR7172_resolution_v6.docx
13-10-2015 16:54Gyorgy RethyAssigned ToGyorgy Rethy => Jacob Wieland - Spirent
13-10-2015 16:54Gyorgy RethyStatusassigned => confirmed
13-10-2015 17:26Jacob Wieland - SpirentFile Added: CR7172_resolution_v7.docx
13-10-2015 17:26Jacob Wieland - SpirentNote Added: 0013379
13-10-2015 17:27Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Gyorgy Rethy
13-10-2015 17:27Jacob Wieland - SpirentStatusconfirmed => assigned
13-10-2015 17:27Jacob Wieland - SpirentNote Added: 0013380
13-10-2015 17:27Jacob Wieland - SpirentAssigned ToGyorgy Rethy => Jens Grabowski
13-10-2015 17:27Jacob Wieland - SpirentStatusassigned => confirmed
15-10-2015 15:50Jens GrabowskiNote Added: 0013419
15-10-2015 15:51Jens GrabowskiAssigned ToJens Grabowski => Gyorgy Rethy
15-10-2015 15:51Jens GrabowskiStatusconfirmed => assigned
16-10-2015 08:39Jacob Wieland - SpirentFile Added: CR7172_resolution_v8.docx
16-10-2015 08:42Jacob Wieland - SpirentNote Added: 0013422
16-10-2015 08:43Jacob Wieland - SpirentAssigned ToGyorgy Rethy => Jens Grabowski
16-10-2015 08:43Jacob Wieland - SpirentStatusassigned => confirmed
16-10-2015 10:54Jens GrabowskiFile Added: CR7172_resolution_v8-Comments.docx
16-10-2015 10:55Jens GrabowskiNote Added: 0013428
16-10-2015 10:55Jens GrabowskiAssigned ToJens Grabowski => Gyorgy Rethy
16-10-2015 10:55Jens GrabowskiStatusconfirmed => assigned
16-10-2015 13:26Jacob Wieland - SpirentAssigned ToGyorgy Rethy => Jacob Wieland - Spirent
16-10-2015 13:26Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Gyorgy Rethy
16-10-2015 13:26Jacob Wieland - SpirentStatusassigned => confirmed
02-11-2015 15:48Gyorgy RethyFile Added: CR7172_resolution_v9.docx
02-11-2015 15:56Gyorgy RethyNote Added: 0013447
02-11-2015 15:56Gyorgy RethyAssigned ToGyorgy Rethy => Jacob Wieland - Spirent
02-11-2015 15:56Gyorgy RethyStatusconfirmed => assigned
02-11-2015 15:58Gyorgy RethyFile Deleted: CR7172_resolution_v9.docx
02-11-2015 15:58Gyorgy RethyFile Added: CR7172_resolution_v9.docx
03-11-2015 10:42Jacob Wieland - SpirentFile Added: CR7172_resolution_v10.docx
03-11-2015 10:46Jacob Wieland - SpirentNote Added: 0013460
03-11-2015 10:46Jacob Wieland - SpirentStatusassigned => resolved
03-11-2015 10:46Jacob Wieland - SpirentFixed in Version => v4.8.1 (published 2016-07)
03-11-2015 10:46Jacob Wieland - SpirentResolutionopen => fixed
03-11-2015 10:46Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Gyorgy Rethy
14-12-2015 13:03Gyorgy RethyNote Added: 0013616
14-12-2015 13:03Gyorgy RethyStatusresolved => closed

Notes
(0013235)
Gyorgy Rethy   
22-09-2015 10:13   
STF discussion: clarify that initialization is an assignment. Check also functions returning uninitialized.
(0013280)
Gyorgy Rethy   
23-09-2015 17:56   
Proposed resolution is in CR7172_resolution_v1.docx. Please review.
(0013286)
Jacob Wieland - Spirent   
24-09-2015 10:53   
Unfortunately, this proposal does not solve the problem. Defining initialization does not carry over the restrictions of the Assignment statement to the initialization assignment part of the variable declaration statement.

You are confusing the concept of assignment with the Assignment sintatement. The Assignment statement is a syntactical structure. Thus, all restrictions in the section Assignments is only applicable to those statements (unless stated otherwise).

What would be helpful would be adding in the Declaring Variables section that all restrictions on Assignment statements in the Assignments section also apply to the initialization part.
(0013298)
Gyorgy Rethy   
24-09-2015 16:39   
In CR7172_resolution_v3.docx restrictions are added to the value variable, template variable and template clauses. Also a sentence is added to the completely initialized definition saying that {} also initializes empty records and sets, as we just have discussed.
(0013299)
Jacob Wieland - Spirent   
24-09-2015 16:56   
First question: Why is the text about structurd types (for completely initialized definition) in a NOTE while the one for simple types isn't?

Secondly: I still think this text leaves the question open whether or not an empty record/set type or a record of/set of/array type with min length 0 is already completely initialized without assigning {}. Since mathematically, the first sentence already applies to these types (all elements or fields - the empty set here - have been completely initialized), that sentence alone does not force any additional action for complete initialization.

The following sentence is also no further restriction on this. It says, that if you initialize with {}, then it is completely initialized, but that is not a necessary condition for completely initialized, just a valid one. I'm missing something like "at least" or "only", saying that for empty record/set types, for them to become completely initialized they HAVE to be assigned {} and the same for record of/set of/array types.
(0013300)
Jacob Wieland - Spirent   
25-09-2015 09:57   
changed the wording of completely initialized to be less ambiguous. please review
(0013313)
Gyorgy Rethy   
25-09-2015 13:56   
(edited on: 25-09-2015 15:38)
Now, in CR7172_resolution_v5.docx I have separated the cases: simple type, unions, record/set-s and record/set of-s, as we discussed. I think that trying to define common rules for record/set and record/set of-s was one of the source of the problems as they are, in fact, completely different constructs.

I have restored the NOTE that now lists "the solutions" for some interesting/specific cases. I hope that this, together with the definition of initialization solves the empty record/set issue. If not, then we will have to insert a sentence about initialization of empty record/sets to clauses 6.2.1 and 6.2.2.

(0013330)
Jacob Wieland - Spirent   
26-09-2015 11:40   
Unfortunately, the mandatory definition text is still implying that empty structured types are completely initialized even without assignment (all their elements/fields HAVE been completely initialized). The NOTE contradicts this and is thus more restrictive.

The last sentence that completely initialized implies "at least partially initialized" is necessary as for partially initialized it is necessary that at least one field/element has been partially initialized. For empty values, that is not true, therefore, it must be stated explicitly somewhere.
(0013378)
Gyorgy Rethy   
13-10-2015 16:50   
See CR7172_resolution_v6.docx. I have no better idea than slicing the cases further on to empty and non-empty record/set-s. jacob, if you have further comment, please come up with a concrete text proposal in a new version of the file.
(0013379)
Jacob Wieland - Spirent   
13-10-2015 17:26   
I have added another proposal that, in my opinion, is airtight regarding this issue.
(0013380)
Jacob Wieland - Spirent   
13-10-2015 17:27   
please review and resolve
(0013419)
Jens Grabowski   
15-10-2015 15:50   
I am sorry, the more I am reading the resolutions the less I understand it.

I understand that variables or parameters can be uninitialized, partially initialized or completely initialized, but I don’t understand how a value can be uninitialized, partially initialized or completely initialized.

A variable has a type which defines the possible set of values for this variable (its domain).

Uninitialized means that you can say nothing about the relation between value of the variable and its domain.

Completely initialized means that the variable value represents exactly one value in the domain of the variable.

Partially initialized means that parts of the variable value are known, i.e., are completely initialized, and that other parts remain uninitialized.

Maybe it is easier to argue along this line instead of making examples for all kinds of types.
(0013422)
Jacob Wieland - Spirent   
16-10-2015 08:42   
added another version which defines three disjoint states: uninitialized, partially initialized (only possible for structured types) and completely initialized. The attached NOTES are just for clarification of the special cases. The definitions should reflect our requirements.

please review once more.
(0013428)
Jens Grabowski   
16-10-2015 10:55   
I can live with this definition.
(0013447)
Gyorgy Rethy   
02-11-2015 15:56   
CR7172_resolution_v9.docx: I have made the different options of initialization a note as Jens proposed (no change in text).
I changed partially initialized:
- we say that completely initialized things are also fulfils partially initialized criteria, while the new text for partially initialized excluded this (saying that it is uninitialized and not completely initialized.
- I prefer some direct definition instead of saying that it is not uninitialized (it seems to be obvious, in this case no definition would be needed).
(0013460)
Jacob Wieland - Spirent   
03-11-2015 10:46   
replaced "no content initialization" with "no initialization of it or at least one of its parts" in the definition of uninitialized. content initialization is too ambiguous (someone might think that only content initialization can change the state from uninitialized to not uninitialized, but the assignment of {} does not initialize content, but still initializes).

Also deleted superfluous sub-sentence about omit in the values section (according to Jens's comment).
(0013616)
Gyorgy Rethy   
14-12-2015 13:03   
Added to drfat V4.7.4