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

ID | Project | Category | View Status | Date Submitted | Last Update
0000370 | Part 01: TTCN-3 Core Language | Technical | public | 22-11-2006 15:55 | 12-12-2008 11:56

Reporter | Stephan Schulz |
Assigned To |  |
Priority | high | Severity | major | Reproducibility | always
Status | closed | Resolution | won't fix |
Platform |  | OS |  | OS Version |
Product Version | v3.1.1 (published 2005-06) |
Target Version | v3.2.1 (published 2007-02) | Fixed in Version |  |
Clause Reference(s) | 5.2.1.0
Source (company - Author) | Ina Schieferdecker FOKUS

Summary | 0000370: Component Parameters

Description

Component parameters are handled differently than port and timer parameters. The ï¿½architectural/configurationï¿½ objects should all be handled the same. Either they are considered to be references (then, all should be always in parameters) or they are considered to be objects (then, all should be always inout parameters). One of the choices should be taken but not a mix as it is currently done:
5.2.1.0:
By default, all actual parameters of basic types, basic string types, user-defined structured types, address type and component type are passed by value. This may optionally be denoted by the keyword in. To pass parameters of the mentioned types by reference the keywords out or inout shall be used.
Timers and ports are always passed by reference and are identified by the keywords timer and port. The keyword inout may optionally be used to denote passing by reference

Steps To Reproduce |

Additional Information

The smallest change to TTCN-3 is to make component parameters also inout parameters:
By default, all actual parameters of basic types, basic string types, user-defined structured types, and address type and component type are passed by value. This may optionally be denoted by the keyword in. To pass parameters of the mentioned types by reference the keywords out or inout shall be used.
Timers Components, timers and ports are always passed by reference. Timer parameters and are identified by the keywords timer and port. The keyword inout may optionally be used to denote passing by reference.

Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
22-11-2006 15:55 | Stephan Schulz | New Issue |
22-11-2006 15:55 | Stephan Schulz | Clause Reference(s) | => 5.2.1.0
22-11-2006 15:55 | Stephan Schulz | Source (company - Author) | => Ina Schieferdecker FOKUS
22-11-2006 15:56 | Stephan Schulz | Status | new => closed
22-11-2006 15:56 | Stephan Schulz | Note Added: 0000291 |
22-11-2006 15:56 | Stephan Schulz | Resolution | open => won't fix
12-12-2008 11:56 | Ina Schieferdecker | Target Version | => Edition 3.2.1
12-12-2008 11:56 | Ina Schieferdecker | Description Updated |

Notes

(0000291)
Stephan Schulz
22-11-2006 15:56

For the following reasons, I recommend rejecting this CR:
• The handling of component references is more comparable to the handling of values data types than the handling of ports and timers. It is allowed to have variables of component references, but it is not allowed to have variables of ports and timers. Therefore, component types should be handled more like data types than port types or timers.
• The statement ports and timers are passed by reference is not completely correct. Correct is that names (= references) of ports and timers are passed in by constant value, i.e., you are not allowed to change the value (= references) of these names even within the called function (Note: setting or resetting a timer changes the status of a timer object but the name of the timer, which may be passed in, does not change), which is possible when passing in a variable of a component type or integer. In fact, timers and ports are more passed in like values than like references.
• The call by value mechanism is a programming mechanism, which supports secure programming. I.e., it avoids the unwanted change of values as a side effect within a function. Disallowing, this mechanism for component references just because some people think that timers are closer to components than integer is very strange.