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
0003946Part 01: TTCN-3 Core LanguageTechnicalpublic11-08-2008 11:4609-12-2008 14:36
ReporterGyorgy Rethy 
Assigned ToIna Schieferdecker 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Versionv4.1.1 (published 2009-06)Fixed in Versionv4.1.1 (published 2009-06) 
Summary0003946: Harmonize the semantics of assignments and parameterization
DescriptionThe 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 InformationIn 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;
...
}
TagsNo tags attached.
Clause Reference(s)L.M.Ericsson
Source (company - Author)     
Attached Filesdoc file icon CR3946_OutParameterization.doc [^] (24,576 bytes) 28-11-2008 08:24
doc file icon CR3946_OutParameterization v2.doc [^] (24,576 bytes) 28-11-2008 10:21

- Relationships

-  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
Powered by Mantis Bugtracker