ETSI's Bug Tracker - Part 04: TTCN-3 Operational Semantics
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0000411 | Part 04: TTCN-3 Operational Semantics | New Feature | public | 24-11-2006 14:23 | 20-04-2009 11:42

Reporter | Stephan Schulz |
Assigned To | Jens Grabowski |
Priority | high | Severity | feature | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v3.1.1 (published 2005-06) |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | Annex A
Source (company - Author) | dr. György Réthy, Ericsson

Summary | 0000411: Formal parameter default values (non-mandatory parameters)

Description

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).

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

Relationships

related to | 0000417 | closed | Ina Schieferdecker | Part 01: TTCN-3 Core Language | Assignment notation in actual parameter lists

Attached Files

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
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
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
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
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
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
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
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
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
Date Modified | Username | Field | Change
24-11-2006 14:23 | Stephan Schulz | New Issue |
24-11-2006 14:23 | Stephan Schulz | File Added: CR_406 Formal parameter default values (non-mandatory parameters).doc |
24-11-2006 14:23 | Stephan Schulz | Clause Reference(s) | => Annex A
24-11-2006 14:23 | Stephan Schulz | Source (company - Author) | => dr. György Réthy, Ericsson
24-11-2006 14:37 | Stephan Schulz | Relationship added | related to 0000417
15-06-2007 19:16 | Stephan Schulz | Status | new => assigned
15-06-2007 19:16 | Stephan Schulz | Assigned To | => Ina Schieferdecker
13-10-2007 19:18 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => developer_u
15-10-2007 12:56 | Ina Schieferdecker | Note Added: 0003611 |
17-10-2007 11:48 | Ina Schieferdecker | Note Added: 0003660 |
17-10-2007 12:41 | user10 | Assigned To | developer_u => Thomas DeiÃŸ
18-10-2007 11:35 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
18-10-2007 11:54 | Ina Schieferdecker | Note Deleted: 0003611 |
14-08-2008 12:28 | Thomas DeiÃŸ | File Added: General_Extension_status_13_08_08_default_values.ppt |
17-10-2008 09:24 | Thomas DeiÃŸ | File Added: CR_411_417_Formal_parameter_default_values_part1_01.doc |
17-10-2008 09:25 | Thomas DeiÃŸ | File Added: CR_411_417_Formal_parameter_default_values_part4_01.doc |
17-10-2008 09:25 | Thomas DeiÃŸ | File Added: CR_411_417_Formal_parameter_default_values_part6_01.doc |
17-10-2008 09:26 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Gyorgy Rethy
26-11-2008 15:18 | Gyorgy Rethy | File Added: CR_411_417_Formal_parameter_default_values_part1_01 v2.doc |
26-11-2008 15:19 | Gyorgy Rethy | File Deleted: CR_411_417_Formal_parameter_default_values_part1_01 v2.doc |
26-11-2008 15:26 | Gyorgy Rethy | Note Added: 0007452 |
26-11-2008 15:27 | Gyorgy Rethy | File Added: CR_411_417_Formal_parameter_default_values_part1_02.doc |
26-11-2008 15:27 | Gyorgy Rethy | File Added: CR_411_417_Formal_parameter_default_values_part4_02.doc |
26-11-2008 15:28 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
26-11-2008 15:28 | Gyorgy Rethy | Note Edited: 0007452 |
27-11-2008 08:28 | Thomas DeiÃŸ | File Added: CR_411_417_Formal_parameter_default_values_part1_03.doc |
27-11-2008 08:28 | Thomas DeiÃŸ | File Deleted: CR_411_417_Formal_parameter_default_values_part1_03.doc |
27-11-2008 08:30 | Thomas DeiÃŸ | File Added: CR_412_2012_BehaviourTypes_03.doc |
27-11-2008 08:31 | Thomas DeiÃŸ | File Added: CR_411_417_Formal_parameter_default_values_part4_03.doc |
27-11-2008 08:31 | Thomas DeiÃŸ | File Deleted: CR_412_2012_BehaviourTypes_03.doc |
27-11-2008 08:32 | Thomas DeiÃŸ | File Added: CR_411_417_Formal_parameter_default_values_part1_03.doc |
27-11-2008 08:34 | Thomas DeiÃŸ | Note Added: 0007464 |
27-11-2008 08:34 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
09-12-2008 18:01 | Ina Schieferdecker | Note Added: 0007610 |
09-12-2008 18:02 | Ina Schieferdecker | Resolution | open => fixed
09-12-2008 18:12 | Ina Schieferdecker | Note Added: 0007611 |
09-12-2008 18:12 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
09-12-2008 18:13 | Ina Schieferdecker | Note Edited: 0007611 |
10-12-2008 07:37 | Thomas DeiÃŸ | Note Added: 0007616 |
10-12-2008 07:37 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
10-12-2008 10:40 | Ina Schieferdecker | Note Added: 0007623 |
10-12-2008 10:40 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
10-12-2008 10:56 | Thomas DeiÃŸ | Note Added: 0007625 |
10-12-2008 10:56 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
10-12-2008 12:33 | Ina Schieferdecker | Note Added: 0007628 |
10-12-2008 12:33 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Jens Grabowski
10-12-2008 12:33 | Ina Schieferdecker | Project | Part 01: TTCN-3 Core Language => Part 04: TTCN-3 Operational Semantics
10-03-2009 10:51 | Ina Schieferdecker | Status | assigned => resolved
10-03-2009 10:51 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published)
20-04-2009 11:42 | Ina Schieferdecker | Status | resolved => 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.