ETSI's Bug Tracker |
Anonymous | Login | Signup for local Mantis account | 03-05-2024 04:38 IST |
Main | My View | View Issues | Change Log | Roadmap | Monitor project |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003946 | Part 01: TTCN-3 Core Language | Technical | public | 11-08-2008 11:46 | 09-12-2008 14:36 | ||||
Reporter | Gyorgy Rethy | ||||||||
Assigned To | Ina Schieferdecker | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) | ||||||
Summary | 0003946: Harmonize the semantics of assignments and parameterization | ||||||||
Description | The definition of out formal parameters says: " kind of parameterization where the value of the actual parameter (the argument) is not bound to the formal parameter when the parameterized object is invoked, but the value of the formal parameter is passed back to the actual parameter when the invoked object completes ... NOTE 2: An out formal parameter is uninitialized (unbound) when the invoked object is entered." Therefore, if no value is assigned to the out formal parameter, it should make the content of the actual parameter uninitialized. On the other hand, note 1 of 5.4.1 says: "NOTE 1: Although out parameters can be read within the parameterized object, they do not inherit the value of their actual parameter; i.e. they should be set before they are read." There are two observations regarding this: 1) Writing back the content of the out parameter to the actual parameter can be considered as reading the parameter 2) Writing back the content of the out parameter is a kind of assignment; thus the two semantics should be harmonized (no unbound value is allowed on the right hand side of assignments); except language consistency this would simplify the language 3) In TTCN-3 an already initialized variable should never be done uninitialized again, as this is increasing the probability of test case errors. Clarify the semantics of out formal parameters. | ||||||||
Additional Information | In practical terms the only possible use of out parameterization is identical to inout parameterization plus new value assignment. EXAMPLE 1: function f(out integer p_int) runs oc Comp_CT { //trying to use p_int inside the function before initializition would //lead to an error (except passing on as actual parameter to an inout //or our parameter of another function, but this just shifts the problem p_int := 5; v_compVar := 2*5; } This results the same behaviour as: function f1(inout integer p_int) runs oc Comp_CT { p_int := 5; v_compVar := 2*5; } EXAMPLE 2: function f2(out integer p_int) runs oc Comp_CT { //p_int left unitialized } function f3(){ var integer vl_int := 5;//initializetion here does not change the example; f2(vl_int); //at this point vl_int should be uninitialized; hence it shall be intialized (again) before using it in an expression vl_int := 10; ... } This results the same behaviour as: function f4(inout integer p_int) runs oc Comp_CT { //p_int left unchanged } function f3(){ var integer vl_int := 5;//initializetion here does not change the example; f2(vl_int); vl_int := 10; ... } | ||||||||
Tags | No tags attached. | ||||||||
Clause Reference(s) | L.M.Ericsson | ||||||||
Source (company - Author) | |||||||||
Attached Files | CR3946_OutParameterization.doc [^] (24,576 bytes) 28-11-2008 08:24 CR3946_OutParameterization v2.doc [^] (24,576 bytes) 28-11-2008 10:21 | ||||||||
Notes | |
(0007497) Gyorgy Rethy (reporter) 28-11-2008 10:21 edited on: 28-11-2008 10:22 |
Just minor editorial changes. OK with me. From my side it is OK to be implemented. |
Issue History | |||
Date Modified | Username | Field | Change |
11-08-2008 11:46 | Gyorgy Rethy | New Issue | |
11-08-2008 11:46 | Gyorgy Rethy | Status | new => assigned |
11-08-2008 11:46 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker |
11-08-2008 11:46 | Gyorgy Rethy | Clause Reference(s) | => L.M.Ericsson |
11-08-2008 11:46 | Gyorgy Rethy | Source (company - Author) | => |
11-08-2008 12:12 | Gyorgy Rethy | Description Updated | |
17-08-2008 09:11 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published) |
28-11-2008 08:24 | Ina Schieferdecker | File Added: CR3946_OutParameterization.doc | |
28-11-2008 08:24 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy |
28-11-2008 08:24 | Ina Schieferdecker | Resolution | open => fixed |
28-11-2008 10:21 | Gyorgy Rethy | File Added: CR3946_OutParameterization v2.doc | |
28-11-2008 10:21 | Gyorgy Rethy | Note Added: 0007497 | |
28-11-2008 10:22 | Gyorgy Rethy | Note Edited: 0007497 | |
28-11-2008 10:22 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker |
09-12-2008 14:36 | Ina Schieferdecker | Status | assigned => resolved |
09-12-2008 14:36 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published) |
09-12-2008 14:36 | Ina Schieferdecker | Status | resolved => closed |
MantisBT 1.2.14 [^] Copyright © 2000 - 2024 MantisBT Team |