Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007172Part 01: TTCN-3 Core LanguageClarificationpublic10-09-2015 10:3514-12-2015 13:03
ReporterJacob Wieland - Spirent 
Assigned ToGyorgy Rethy 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionv4.7.1 (published 2015-06) 
Target Versionv4.8.1 (published 2016-07)Fixed in Versionv4.8.1 (published 2016-07) 
Summary0007172: Is variable initialization with undefined function result allowed?
DescriptionIt 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.
Tagstechnically agreed
Clause Reference(s)11.1, 11.2, 19
Source (company - Author)Testing Technologies - Jacob Wieland
Attached Filesdocx file icon CR7172_resolution_v1.docx [^] (91,441 bytes) 23-09-2015 17:54
docx file icon CR7172_resolution_v2.docx [^] (103,298 bytes) 24-09-2015 15:33
docx file icon CR7172_resolution_v3.docx [^] (103,083 bytes) 24-09-2015 16:36
docx file icon CR7172_resolution_v4.docx [^] (105,421 bytes) 25-09-2015 09:55
docx file icon CR7172_resolution_v5.docx [^] (107,562 bytes) 25-09-2015 13:50
docx file icon CR7172_resolution_v6.docx [^] (105,950 bytes) 13-10-2015 16:54
docx file icon CR7172_resolution_v7.docx [^] (109,746 bytes) 13-10-2015 17:26
docx file icon CR7172_resolution_v8.docx [^] (112,222 bytes) 16-10-2015 08:39
docx file icon CR7172_resolution_v8-Comments.docx [^] (84,298 bytes) 16-10-2015 10:54
docx file icon CR7172_resolution_v9.docx [^] (113,761 bytes) 02-11-2015 15:58
docx file icon CR7172_resolution_v10.docx [^] (132,430 bytes) 03-11-2015 10:42

- Relationships

-  Notes
(0013235)
Gyorgy Rethy (reporter)
22-09-2015 10:13

STF discussion: clarify that initialization is an assignment. Check also functions returning uninitialized.
(0013280)
Gyorgy Rethy (reporter)
23-09-2015 17:56

Proposed resolution is in CR7172_resolution_v1.docx. Please review.
(0013286)
Jacob Wieland - Spirent (reporter)
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 (reporter)
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 (reporter)
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 (reporter)
25-09-2015 09:57

changed the wording of completely initialized to be less ambiguous. please review
(0013313)
Gyorgy Rethy (reporter)
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 (reporter)
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 (reporter)
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 (reporter)
13-10-2015 17:26

I have added another proposal that, in my opinion, is airtight regarding this issue.
(0013380)
Jacob Wieland - Spirent (reporter)
13-10-2015 17:27

please review and resolve
(0013419)
Jens Grabowski (manager)
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 (reporter)
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 (manager)
16-10-2015 10:55

I can live with this definition.
(0013447)
Gyorgy Rethy (reporter)
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 (reporter)
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 (reporter)
14-12-2015 13:03

Added to drfat V4.7.4

- Issue History
Date Modified Username Field Change
10-09-2015 10:35 Jacob Wieland - Spirent New Issue
21-09-2015 09:51 Gyorgy Rethy Project TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
21-09-2015 10:26 Gyorgy Rethy Target Version => v4.8.1 (published 2016-07)
22-09-2015 10:12 Gyorgy Rethy Tag Attached: technically agreed
22-09-2015 10:13 Gyorgy Rethy Note Added: 0013235
22-09-2015 10:13 Gyorgy Rethy Assigned To => Gyorgy Rethy
22-09-2015 10:13 Gyorgy Rethy Status new => assigned
23-09-2015 17:54 Gyorgy Rethy File Added: CR7172_resolution_v1.docx
23-09-2015 17:56 Gyorgy Rethy Note Added: 0013280
23-09-2015 17:56 Gyorgy Rethy Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
23-09-2015 17:56 Gyorgy Rethy Status assigned => confirmed
23-09-2015 17:56 Gyorgy Rethy Product Version => v4.7.1 (published 2015-06)
24-09-2015 10:53 Jacob Wieland - Spirent Note Added: 0013286
24-09-2015 10:53 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
24-09-2015 10:53 Jacob Wieland - Spirent Status confirmed => assigned
24-09-2015 15:33 Jacob Wieland - Spirent File Added: CR7172_resolution_v2.docx
24-09-2015 16:36 Gyorgy Rethy File Added: CR7172_resolution_v3.docx
24-09-2015 16:39 Gyorgy Rethy Note Added: 0013298
24-09-2015 16:39 Gyorgy Rethy Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
24-09-2015 16:39 Gyorgy Rethy Status assigned => confirmed
24-09-2015 16:56 Jacob Wieland - Spirent Note Added: 0013299
25-09-2015 09:51 Jacob Wieland - Spirent File Added: CR7172_resolution_v4.docx
25-09-2015 09:55 Jacob Wieland - Spirent File Deleted: CR7172_resolution_v4.docx
25-09-2015 09:55 Jacob Wieland - Spirent File Added: CR7172_resolution_v4.docx
25-09-2015 09:56 Jacob Wieland - Spirent Status confirmed => assigned
25-09-2015 09:57 Jacob Wieland - Spirent Note Added: 0013300
25-09-2015 09:57 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
25-09-2015 09:57 Jacob Wieland - Spirent Status assigned => confirmed
25-09-2015 13:50 Gyorgy Rethy File Added: CR7172_resolution_v5.docx
25-09-2015 13:56 Gyorgy Rethy Note Added: 0013313
25-09-2015 13:57 Gyorgy Rethy Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
25-09-2015 15:38 Gyorgy Rethy Note Edited: 0013313 View Revisions
26-09-2015 11:40 Jacob Wieland - Spirent Note Added: 0013330
26-09-2015 12:16 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
26-09-2015 12:16 Jacob Wieland - Spirent Status confirmed => assigned
13-10-2015 16:42 Gyorgy Rethy File Added: CR7172_resolution_v6.docx
13-10-2015 16:50 Gyorgy Rethy Note Added: 0013378
13-10-2015 16:50 Gyorgy Rethy File Deleted: CR7172_resolution_v6.docx
13-10-2015 16:54 Gyorgy Rethy File Added: CR7172_resolution_v6.docx
13-10-2015 16:54 Gyorgy Rethy Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
13-10-2015 16:54 Gyorgy Rethy Status assigned => confirmed
13-10-2015 17:26 Jacob Wieland - Spirent File Added: CR7172_resolution_v7.docx
13-10-2015 17:26 Jacob Wieland - Spirent Note Added: 0013379
13-10-2015 17:27 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
13-10-2015 17:27 Jacob Wieland - Spirent Status confirmed => assigned
13-10-2015 17:27 Jacob Wieland - Spirent Note Added: 0013380
13-10-2015 17:27 Jacob Wieland - Spirent Assigned To Gyorgy Rethy => Jens Grabowski
13-10-2015 17:27 Jacob Wieland - Spirent Status assigned => confirmed
15-10-2015 15:50 Jens Grabowski Note Added: 0013419
15-10-2015 15:51 Jens Grabowski Assigned To Jens Grabowski => Gyorgy Rethy
15-10-2015 15:51 Jens Grabowski Status confirmed => assigned
16-10-2015 08:39 Jacob Wieland - Spirent File Added: CR7172_resolution_v8.docx
16-10-2015 08:42 Jacob Wieland - Spirent Note Added: 0013422
16-10-2015 08:43 Jacob Wieland - Spirent Assigned To Gyorgy Rethy => Jens Grabowski
16-10-2015 08:43 Jacob Wieland - Spirent Status assigned => confirmed
16-10-2015 10:54 Jens Grabowski File Added: CR7172_resolution_v8-Comments.docx
16-10-2015 10:55 Jens Grabowski Note Added: 0013428
16-10-2015 10:55 Jens Grabowski Assigned To Jens Grabowski => Gyorgy Rethy
16-10-2015 10:55 Jens Grabowski Status confirmed => assigned
16-10-2015 13:26 Jacob Wieland - Spirent Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
16-10-2015 13:26 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
16-10-2015 13:26 Jacob Wieland - Spirent Status assigned => confirmed
02-11-2015 15:48 Gyorgy Rethy File Added: CR7172_resolution_v9.docx
02-11-2015 15:56 Gyorgy Rethy Note Added: 0013447
02-11-2015 15:56 Gyorgy Rethy Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
02-11-2015 15:56 Gyorgy Rethy Status confirmed => assigned
02-11-2015 15:58 Gyorgy Rethy File Deleted: CR7172_resolution_v9.docx
02-11-2015 15:58 Gyorgy Rethy File Added: CR7172_resolution_v9.docx
03-11-2015 10:42 Jacob Wieland - Spirent File Added: CR7172_resolution_v10.docx
03-11-2015 10:46 Jacob Wieland - Spirent Note Added: 0013460
03-11-2015 10:46 Jacob Wieland - Spirent Status assigned => resolved
03-11-2015 10:46 Jacob Wieland - Spirent Fixed in Version => v4.8.1 (published 2016-07)
03-11-2015 10:46 Jacob Wieland - Spirent Resolution open => fixed
03-11-2015 10:46 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
14-12-2015 13:03 Gyorgy Rethy Note Added: 0013616
14-12-2015 13:03 Gyorgy Rethy Status resolved => closed


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker