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

ID | Project | Category | View Status | Date Submitted | Last Update
0006813 | Part 01: TTCN-3 Core Language | Technical | public | 05-11-2014 16:18 | 14-12-2015 14:01

Reporter | Gyorgy Rethy |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | major | Reproducibility | always
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.7.1 (published 2015-06) |
Target Version | v4.8.1 (published 2016-07) | Fixed in Version | v4.8.1 (published 2016-07) |
Clause Reference(s) | 5.4.2
Source (company - Author) | L.M.Ericsson

Summary | 0006813: Passing fields or elements of a component variable as inout parameter

Description

CR6731 raised a problem to specify the exact behaviour of inout parameters. During resolving this CR it was realized that passing a structure and also its field as inout parameters would allow making the element-parameter implicitly uninitialized. Therefore, this case has been forbidden by restriction m)of clause 5.4.2.
Note: this implicitly uninitializing probem doesn't exist for mandatory record/set fields, but for the reason of a simpler rule they have also been disallowed.
The principal same problem exists if a field/element of a component variable is passed as inout parameter to a function with a runs on clause referring directly or via compatibility to the component type containing the structured variable definition. However it was considered that this case shall be handled more cautiously, as there is much higher chance to invalidate existing and working test suites then by the above restriction. Therefore it was decided that more time is required to get user feedback and thus no restriction is added to V4.7.1 on this case.

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

Relationships

related to | 0006731 | closed | Gyorgy Rethy | Passing parameters by reference

Attached Files | CR6813_resolution.docx (179,216) 15-10-2015 17:05 http://oldforge.etsi.org/mantis/file_download.php?file_id=3326&type=bug CR6813_resolution_v2.docx (183,537) 03-11-2015 08:38 http://oldforge.etsi.org/mantis/file_download.php?file_id=3342&type=bug

Issue History
Date Modified | Username | Field | Change
05-11-2014 16:18 | Gyorgy Rethy | New Issue |
05-11-2014 16:19 | Gyorgy Rethy | Relationship added | related to 0006731
07-11-2014 13:06 | Jacob Wieland - Spirent | Note Added: 0012494 |
07-11-2014 13:09 | Jacob Wieland - Spirent | Note Deleted: 0012494 |
07-11-2014 13:15 | Jacob Wieland - Spirent | Note Added: 0012495 |
21-04-2015 08:35 | Jacob Wieland - Spirent | Note Added: 0012943 |
03-08-2015 14:56 | Gyorgy Rethy | Note Added: 0013041 |
03-08-2015 14:57 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
03-08-2015 14:57 | Gyorgy Rethy | Status | new => assigned
14-10-2015 12:32 | Gyorgy Rethy | Note Added: 0013383 |
15-10-2015 12:40 | Jacob Wieland - Spirent | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
15-10-2015 17:05 | Jacob Wieland - Spirent | File Added: CR6813_resolution.docx |
15-10-2015 17:05 | Jacob Wieland - Spirent | Note Added: 0013421 |
15-10-2015 17:05 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
15-10-2015 17:05 | Jacob Wieland - Spirent | Status | assigned => confirmed
03-11-2015 08:38 | Gyorgy Rethy | File Added: CR6813_resolution_v2.docx |
03-11-2015 08:41 | Gyorgy Rethy | Note Added: 0013449 |
03-11-2015 08:41 | Gyorgy Rethy | Status | confirmed => resolved
03-11-2015 08:41 | Gyorgy Rethy | Fixed in Version | => v4.8.1 (published 2016-07)
03-11-2015 08:41 | Gyorgy Rethy | Resolution | open => fixed
14-12-2015 14:01 | Gyorgy Rethy | Note Added: 0013622 |
14-12-2015 14:01 | Gyorgy Rethy | Status | resolved => closed

Notes

(0012495)
Jacob Wieland - Spirent
07-11-2014 13:15

For this, at least, I would propose to use the normal pass-by-reference semantics, i.e. if two variables (directly or indirectly) reference the same entity and one such reference is deleted (by the removal of the structure that referenced it), the other variable continues to reference it as long as it exists (i.e. until the function is left).

(0012943)
Jacob Wieland - Spirent
21-04-2015 08:35

on further reflection, since the runs-on component is in essence already an inout parameter, passing component variables to a function as inout parameters should only be allowed if the function does not have a runs on clause. Then, only the other inout restrictions need apply.

(0013041)
Gyorgy Rethy
03-08-2015 14:56

STF discussion 03-08-2015: prepare an example that discovers tools behavoiur, send to tool vendors and ask them to return the result.

(0013383)
Gyorgy Rethy
14-10-2015 12:32

STF discussion: Add a warning note to inout parameterization about the possible side effects and add the example to the standard.

(0013421)
Jacob Wieland - Spirent
15-10-2015 17:05

please review and resolve

(0013449)
Gyorgy Rethy
03-11-2015 08:41

CR6813_resolution_v2.docx: editorial changes and the new example is emphasised by its own example header.

(0013622)
Gyorgy Rethy
14-12-2015 14:01

Added to draft V4.7.4