ETSI's Bug Tracker |
Anonymous | Login | Signup for local Mantis account | 02-05-2024 18:59 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 | ||||
0000416 | Part 01: TTCN-3 Core Language | Clarification | public | 24-11-2006 14:34 | 12-03-2008 10:24 | ||||
Reporter | Stephan Schulz | ||||||||
Assigned To | Ina Schieferdecker | ||||||||
Priority | high | Severity | block | Reproducibility | N/A | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | v3.1.1 (published 2005-06) | ||||||||
Target Version | v3.3.2 (published 2008-04) | Fixed in Version | v3.3.2 (published 2008-04) | ||||||
Summary | 0000416: Passing omit to value formal parameters | ||||||||
Description | The TTCN-3 standard today does not defines the term "value". In common sense value means "In computer science, a value may be a number, literal string, array and anything that can be treated as if it were a number. ... The exact definition varies across programming languages." (from the English Wikipedia, Value (computer science) item). "Nothing" is not a value, i.e. omit should not be considered as value in TTCN-3. This meaning is strengthened by the TTCN-3 standard, where omit is mentioned as a matching mechanism (though it can also be PART of a value, i.e. assigned to optional fields. Titan follows this approach and allows to pass real specific values to value parameters only but not omit. This provides a big advantage: it is sufficient to check the "value" of a value formal parameter when it is passed, no need for subsequent checks when it is used e.g. in expressions. However, in many cases it would be useful to allow formal parameters accepting specific values and omit, e.g. when this parameter is passed to optional template fields in sending operations. | ||||||||
Additional Information | It is proposed to make a distinction between value formal parameters allowing omit and not allowing omit in the TTCN-3 language. Formal parameters To denote that the special value omit is allowed for a value formal parameter, the optional keyword shall be used in the formal parameter list of test cases, functions, altsteps or templates. In the testcase/function/altstep the optional parameter can be compared with omit to determine if a concrete value has been provided or omit was given when calling it. Example code: function f_MyFunc1 (optional integer par) { if (par==omit) { // omit was given for par } else { // value was provided for par } } The parameters with default value (see CR 406) and optional parameters are independent features. The user can combine the two features, Example code: function f_MyFunc2(optional integer par1, optional integer par2 := omit, integer par3 := 5 ) { ... } Actual parameters Optional value parameters may be called with a concrete value or with omit as actual parameter. Example code: f_MyFunc1(11); f_MyFunc1(omit); f_MyFunc2(omit); // par1 & par2 will have the actual value omit, // par3 will have the actual value 5 | ||||||||
Tags | No tags attached. | ||||||||
Clause Reference(s) | - | ||||||||
Source (company - Author) | dr. György Réthy, Ericsson | ||||||||
Attached Files | CR_416_v2.zip [^] (890,821 bytes) 06-12-2007 11:51 CR_416_v3.zip [^] (885,232 bytes) 06-12-2007 17:01 CR_416_v4.zip [^] (869,220 bytes) 06-12-2007 17:43 CR_416_v5.zip [^] (886,077 bytes) 06-12-2007 18:30 | ||||||||
Notes | |
(0004372) Thomas Deiß (reporter) 06-12-2007 11:52 |
solution provided (already checked by Gyorgy once) |
(0004396) Thomas Deiß (reporter) 06-12-2007 16:59 |
New solution (R3). Introduce restrictions of templates, currently just one restriction is allowed (omit). 'template (omit)' can be shortened to omit. incorrect cases are not required to be detected at compile time, similar to type compatibility. |
(0004401) Gyorgy Rethy (reporter) 06-12-2007 17:45 |
I basically agree both with the solution and handling it in the standard's text. Made some modifications to the text proposed. |
(0004407) Thomas Deiß (reporter) 06-12-2007 18:34 |
Description made more restrictive (no hints on more general usage). Example added. Parentheses changed to curly brackets to avoid confusion with value lists. please check the additional comments in the BNF. |
(0004417) Ina Schieferdecker (reporter) 07-12-2007 10:05 |
just little wording changes |
Issue History | |||
Date Modified | Username | Field | Change |
24-11-2006 14:34 | Stephan Schulz | New Issue | |
24-11-2006 14:34 | Stephan Schulz | Clause Reference(s) | => - |
24-11-2006 14:34 | Stephan Schulz | Source (company - Author) | => dr. György Réthy, Ericsson |
15-06-2007 19:15 | Stephan Schulz | Status | new => assigned |
15-06-2007 19:15 | Stephan Schulz | Assigned To | => Ina Schieferdecker |
13-10-2007 19:22 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => developer_u |
17-10-2007 12:41 | user10 | Assigned To | developer_u => Thomas Deiß |
18-10-2007 12:10 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published) |
06-12-2007 11:51 | Thomas Deiß | File Added: CR_416_v2.zip | |
06-12-2007 11:52 | Thomas Deiß | Note Added: 0004372 | |
06-12-2007 11:52 | Thomas Deiß | Assigned To | Thomas Deiß => Gyorgy Rethy |
06-12-2007 11:52 | Thomas Deiß | Resolution | open => fixed |
06-12-2007 11:52 | Thomas Deiß | Target Version | Edition 4.1.1 (not yet published) => Edition 3.3.1 (not yet published) |
06-12-2007 16:59 | Thomas Deiß | Note Added: 0004396 | |
06-12-2007 17:01 | Thomas Deiß | File Added: CR_416_v3.zip | |
06-12-2007 17:43 | Gyorgy Rethy | File Added: CR_416_v4.zip | |
06-12-2007 17:45 | Gyorgy Rethy | Note Added: 0004401 | |
06-12-2007 17:45 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jens Grabowski |
06-12-2007 18:05 | Jens Grabowski | Assigned To | Jens Grabowski => Thomas Deiß |
06-12-2007 18:30 | Thomas Deiß | File Added: CR_416_v5.zip | |
06-12-2007 18:34 | Thomas Deiß | Note Added: 0004407 | |
06-12-2007 18:34 | Thomas Deiß | Assigned To | Thomas Deiß => Ina Schieferdecker |
07-12-2007 09:38 | Ina Schieferdecker | Status | assigned => resolved |
07-12-2007 10:05 | Ina Schieferdecker | Status | resolved => closed |
07-12-2007 10:05 | Ina Schieferdecker | Note Added: 0004417 | |
07-12-2007 10:05 | Ina Schieferdecker | Fixed in Version | => Edition 3.3.1 (not yet published) |
12-03-2008 10:22 | user10 | Fixed in Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published) |
12-03-2008 10:24 | user10 | Target Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published) |
MantisBT 1.2.14 [^] Copyright © 2000 - 2024 MantisBT Team |