ETSI's Bug Tracker - Part 04: TTCN-3 Operational Semantics
View Issue Details
0000411Part 04: TTCN-3 Operational SemanticsNew Featurepublic24-11-2006 14:2320-04-2009 11:42
Stephan Schulz 
Jens Grabowski 
highfeatureN/A
closedfixed 
v3.1.1 (published 2005-06) 
v4.1.1 (published 2009-06)v4.1.1 (published 2009-06) 
 Annex A
dr. György Réthy, Ericsson
0000411: Formal parameter default values (non-mandatory parameters)
Development of test suites and TTCN-3 libraries is normally an incremental process. In parallel with the development of the SUT, also "old" test suites has to be upgraded and new functionalities has to be added to library functions/altsteps. This very often requires adding of new formal parameters to existing templates, functions, altsteps or testcases. Today it is impossible add new parameters and preserve backward compatibility at the same time.
Users consider this to be a significant drawback of TTCN-3 today.

Currently two workarounds are used:
1) Types of formal parameters are defined as records; parameterized objects have a single formal parameter of such record type; when a new parameter to be added, a new optional field is added to the related record type. This approach, though provides backward compatibility, has significant drawbacks: decreases coding efficiency and execution performance and increases code size. For almost all parameterized object an additional record type shall be added to the test suite. Syntax of actual parameter lists are more complex, access to the parameter values inside the object requires a more complex syntax and often extra assignments are needed (e.g. to assign a (received) value into a variable field of the formal parameter type before calling a template or function instead of passing it directly).
2) Cloning: copying an existing parameterized object into a new definition, changing its name and adding new formal parameters. Often the copied objects are big but the needed changes are small. This workaround increases the code size significantly, hence decreases tool and execution efficiency and, on long term, leads to a so called "spaghetti" code that is difficult and very laborious to maintain (if something has to be changed in the merely-copied part of the code, it has to be changed in several cloned objects; but often it is even difficult to identify which objects are the clones). Some of our users decided to change from TTCN-2 to TTCN-3 because of this effect (and re-write the old code, but now they are facing the same situation).
No tags attached.
related to 0000417closed Ina Schieferdecker Part 01: TTCN-3 Core Language Assignment notation in actual parameter lists 
doc CR_406 Formal parameter default values (non-mandatory parameters).doc (66,048) 24-11-2006 14:23
http://oldforge.etsi.org/mantis/file_download.php?file_id=39&type=bug
ppt General_Extension_status_13_08_08_default_values.ppt (48,640) 14-08-2008 12:28
http://oldforge.etsi.org/mantis/file_download.php?file_id=1597&type=bug
doc CR_411_417_Formal_parameter_default_values_part1_01.doc (1,310,720) 17-10-2008 09:24
http://oldforge.etsi.org/mantis/file_download.php?file_id=1709&type=bug
doc CR_411_417_Formal_parameter_default_values_part4_01.doc (199,680) 17-10-2008 09:25
http://oldforge.etsi.org/mantis/file_download.php?file_id=1710&type=bug
doc CR_411_417_Formal_parameter_default_values_part6_01.doc (340,480) 17-10-2008 09:25
http://oldforge.etsi.org/mantis/file_download.php?file_id=1711&type=bug
doc CR_411_417_Formal_parameter_default_values_part1_02.doc (1,314,304) 26-11-2008 15:27
http://oldforge.etsi.org/mantis/file_download.php?file_id=1791&type=bug
doc CR_411_417_Formal_parameter_default_values_part4_02.doc (201,728) 26-11-2008 15:27
http://oldforge.etsi.org/mantis/file_download.php?file_id=1792&type=bug
doc CR_411_417_Formal_parameter_default_values_part4_03.doc (201,728) 27-11-2008 08:31
http://oldforge.etsi.org/mantis/file_download.php?file_id=1807&type=bug
doc CR_411_417_Formal_parameter_default_values_part1_03.doc (1,317,376) 27-11-2008 08:32
http://oldforge.etsi.org/mantis/file_download.php?file_id=1808&type=bug
Issue History
24-11-2006 14:23Stephan SchulzNew Issue
24-11-2006 14:23Stephan SchulzFile Added: CR_406 Formal parameter default values (non-mandatory parameters).doc
24-11-2006 14:23Stephan SchulzClause Reference(s) => Annex A
24-11-2006 14:23Stephan SchulzSource (company - Author) => dr. György Réthy, Ericsson
24-11-2006 14:37Stephan SchulzRelationship addedrelated to 0000417
15-06-2007 19:16Stephan SchulzStatusnew => assigned
15-06-2007 19:16Stephan SchulzAssigned To => Ina Schieferdecker
13-10-2007 19:18Ina SchieferdeckerAssigned ToIna Schieferdecker => developer_u
15-10-2007 12:56Ina SchieferdeckerNote Added: 0003611
17-10-2007 11:48Ina SchieferdeckerNote Added: 0003660
17-10-2007 12:41user10Assigned Todeveloper_u => Thomas Deiß
18-10-2007 11:35Ina SchieferdeckerTarget Version => Edition 4.1.1 (not yet published)
18-10-2007 11:54Ina SchieferdeckerNote Deleted: 0003611
14-08-2008 12:28Thomas DeißFile Added: General_Extension_status_13_08_08_default_values.ppt
17-10-2008 09:24Thomas DeißFile Added: CR_411_417_Formal_parameter_default_values_part1_01.doc
17-10-2008 09:25Thomas DeißFile Added: CR_411_417_Formal_parameter_default_values_part4_01.doc
17-10-2008 09:25Thomas DeißFile Added: CR_411_417_Formal_parameter_default_values_part6_01.doc
17-10-2008 09:26Thomas DeißAssigned ToThomas Deiß => Gyorgy Rethy
26-11-2008 15:18Gyorgy RethyFile Added: CR_411_417_Formal_parameter_default_values_part1_01 v2.doc
26-11-2008 15:19Gyorgy RethyFile Deleted: CR_411_417_Formal_parameter_default_values_part1_01 v2.doc
26-11-2008 15:26Gyorgy RethyNote Added: 0007452
26-11-2008 15:27Gyorgy RethyFile Added: CR_411_417_Formal_parameter_default_values_part1_02.doc
26-11-2008 15:27Gyorgy RethyFile Added: CR_411_417_Formal_parameter_default_values_part4_02.doc
26-11-2008 15:28Gyorgy RethyAssigned ToGyorgy Rethy => Thomas Deiß
26-11-2008 15:28Gyorgy RethyNote Edited: 0007452
27-11-2008 08:28Thomas DeißFile Added: CR_411_417_Formal_parameter_default_values_part1_03.doc
27-11-2008 08:28Thomas DeißFile Deleted: CR_411_417_Formal_parameter_default_values_part1_03.doc
27-11-2008 08:30Thomas DeißFile Added: CR_412_2012_BehaviourTypes_03.doc
27-11-2008 08:31Thomas DeißFile Added: CR_411_417_Formal_parameter_default_values_part4_03.doc
27-11-2008 08:31Thomas DeißFile Deleted: CR_412_2012_BehaviourTypes_03.doc
27-11-2008 08:32Thomas DeißFile Added: CR_411_417_Formal_parameter_default_values_part1_03.doc
27-11-2008 08:34Thomas DeißNote Added: 0007464
27-11-2008 08:34Thomas DeißAssigned ToThomas Deiß => Ina Schieferdecker
09-12-2008 18:01Ina SchieferdeckerNote Added: 0007610
09-12-2008 18:02Ina SchieferdeckerResolutionopen => fixed
09-12-2008 18:12Ina SchieferdeckerNote Added: 0007611
09-12-2008 18:12Ina SchieferdeckerAssigned ToIna Schieferdecker => Thomas Deiß
09-12-2008 18:13Ina SchieferdeckerNote Edited: 0007611
10-12-2008 07:37Thomas DeißNote Added: 0007616
10-12-2008 07:37Thomas DeißAssigned ToThomas Deiß => Ina Schieferdecker
10-12-2008 10:40Ina SchieferdeckerNote Added: 0007623
10-12-2008 10:40Ina SchieferdeckerAssigned ToIna Schieferdecker => Thomas Deiß
10-12-2008 10:56Thomas DeißNote Added: 0007625
10-12-2008 10:56Thomas DeißAssigned ToThomas Deiß => Ina Schieferdecker
10-12-2008 12:33Ina SchieferdeckerNote Added: 0007628
10-12-2008 12:33Ina SchieferdeckerAssigned ToIna Schieferdecker => Jens Grabowski
10-12-2008 12:33Ina SchieferdeckerProjectPart 01: TTCN-3 Core Language => Part 04: TTCN-3 Operational Semantics
10-03-2009 10:51Ina SchieferdeckerStatusassigned => resolved
10-03-2009 10:51Ina SchieferdeckerFixed in Version => Edition 4.1.1 (not yet published)
20-04-2009 11:42Ina SchieferdeckerStatusresolved => closed

Notes
(0003660)
Ina Schieferdecker   
17-10-2007 11:48   
to be considered with CR 417 - deferred to 2008
(0007452)
Gyorgy Rethy   
26-11-2008 15:26   
(edited on: 26-11-2008 15:28)
Added: default values of component and default parameters shall be the null value. Some minor editorial changes (see the ~_02 versions).

(0007464)
Thomas Deiß   
27-11-2008 08:34   
part1
references to type parameterization removed.
default values of type default can just be 'null'
default values of component types can just be null, system, mtc, self.

part4: typo corrected

v03 of part1 and part 4 uploaded
(0007610)
Ina Schieferdecker   
09-12-2008 18:01   
Part 1 edited according to the changes except of default values for type parameters as those go into the "Advanced parameterization package"
(0007611)
Ina Schieferdecker   
09-12-2008 18:12   
(edited on: 09-12-2008 18:13)
I propose that default values of parameters are to be resolved by the TE and would hence not be visible at the TCI. Therefore, no change to the TCI would be needed. Please check.

(0007616)
Thomas Deiß   
10-12-2008 07:37   
If it is not visible at the TCI whether a parameter is a default parameter or not, then for testcases the TCI-TM will have to consider all test case parameters as mandatory. The TM cannot know for which parameters it has to provide a value and for which other ones this is not needed (and would be provided by the TE).

For the start test component operation there is no problem if the TCI-CH does not know whether a parameter has a default value or not, the calling component will provide values for all parameters.

For me it would be ok to leave part6 untouched, it should not hurt the users if they have to provide actual parameters for each test case parameter.
(0007623)
Ina Schieferdecker   
10-12-2008 10:40   
Consider the statements

"e) The expression of the default value has to be compatible with the type of the parameter. The expression shall not refer to elements of the component type of the optional runs on clause. The expression shall not refer to other parameters of the same parameter list. The expression shall not contain the invocation of functions with a runs on clause."

and

"d) The template instance has to be compatible with the type of the parameter. For type compatibility see clause 6.4. The template instance may refer to elements of the component type in a runs on clause. The template instance shall not refer to other parameters in the same parameter list."

in CR_411_417_Formal_parameter_default_values_part1_03.doc

However, expressions and template instances should basically be treated the same.


Hence, to be changed to

"d) The default template instance has to be compatible with the type of the parameter. The template instance shall not refer to elements of the component type in a runs on clause. The template instance shall not refer to other parameters in the same parameter list. The template instance shall not contain the invocation of functions with a runs on clause."

Please check.
(0007625)
Thomas Deiß   
10-12-2008 10:56   
ok.
(0007628)
Ina Schieferdecker   
10-12-2008 12:33   
Jens, please add the changes to part 4.