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

ID | Project | Category | View Status | Date Submitted | Last Update
0006426 | Part 01: TTCN-3 Core Language | Technical | public | 20-02-2013 08:37 | 11-07-2013 16:20

Reporter | Tomas Urban |
Assigned To | Jacob Wieland - Spirent |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.6.1 (published 2014-06) | Fixed in Version | v4.6.1 (published 2014-06) |
Clause Reference(s) | 6.2.10.1
Source (company - Author) | Elvior

Summary | 0006426: Missing restrictions on operations in component type declarations

Description

The current specification contains several restrictions on operations that can be used in component declaration blocks. These restrictions are mostly implicit (such as the rule from the chapter 21 restricting configuration operation to test cases, functions and altsteps).
The implicit restrictions lead to paradoxes: e.g. it is illegal to use the create operation directly in a component declaration block, but when the same create operation is wrapped in a function called from the component declaration part, it is legal (because the create operation can be used in a function).
In some cases there are no restrictions at all, so the component declaration can call a function that contains communication operations. This is rather dangerous, especially considering the fact that the component hasn't been properly initialized at that point and the ports used in these operations might not exist yet.
The current situation gives an impression that the issue hasn't been properly analyzed and additional rules are necessary.
Proposal:
The following rule shall be added to the section 6.2.10.1:
The following operations shall not be used in component type definition and in functions called directly or indirectly from component type definition:
a) All component operations, i.e. create, start (component), stop (component), kill, running (component), alive, done and killed.
b) All port operations, i.e. start (port), stop (port), halt, clear, send, receive, trigger, call, getcall, reply, getreply, raise, catch, check, connect, map, checkstate
c) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout.
d) The testcase.stop operation
Notes shall be added to the 3rd column of the table 16 saying that the above mentioned operations are only allowed in functions that are not called from component type definitions (and control part as well).

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR6426.doc (171,008) 10-07-2013 17:08 http://oldforge.etsi.org/mantis/file_download.php?file_id=2819&type=bug CR6426_v2.doc (173,568) 11-07-2013 11:26 http://oldforge.etsi.org/mantis/file_download.php?file_id=2826&type=bug

Issue History
Date Modified | Username | Field | Change
20-02-2013 08:37 | Tomas Urban | New Issue |
20-02-2013 08:37 | Tomas Urban | Clause Reference(s) | => 6.2.10.1
20-02-2013 08:37 | Tomas Urban | Source (company - Author) | => Elvior
22-02-2013 11:20 | Jacob Wieland - Spirent | Note Added: 0011327 |
08-07-2013 15:34 | Gyorgy Rethy | Note Added: 0011452 |
08-07-2013 15:34 | Jens Grabowski | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
08-07-2013 15:34 | Jens Grabowski | Status | new => assigned
08-07-2013 15:34 | Jens Grabowski | Assigned To | => Jacob Wieland - Spirent
08-07-2013 18:13 | Gyorgy Rethy | Target Version | => v4.6.1 (published 2014-06)
09-07-2013 15:27 | Jacob Wieland - Spirent | Note Added: 0011480 |
10-07-2013 17:08 | Jacob Wieland - Spirent | File Added: CR6426.doc |
10-07-2013 17:09 | Jacob Wieland - Spirent | Note Added: 0011517 |
10-07-2013 19:34 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
10-07-2013 19:34 | Jacob Wieland - Spirent | Note Added: 0011529 |
11-07-2013 09:04 | Jacob Wieland - Spirent | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
11-07-2013 10:17 | Jacob Wieland - Spirent | Status | assigned => confirmed
11-07-2013 10:48 | Jacob Wieland - Spirent | Status | confirmed => assigned
11-07-2013 10:48 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Ina Schieferdecker
11-07-2013 10:58 | Jacob Wieland - Spirent | Status | assigned => confirmed
11-07-2013 11:26 | Ina Schieferdecker | File Added: CR6426_v2.doc |
11-07-2013 11:27 | Ina Schieferdecker | Status | confirmed => assigned
11-07-2013 11:27 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Jacob Wieland - Spirent
11-07-2013 11:47 | Jacob Wieland - Spirent | Status | assigned => resolved
11-07-2013 11:47 | Jacob Wieland - Spirent | Fixed in Version | => v4.6.1 (published 2014-06)
11-07-2013 11:47 | Jacob Wieland - Spirent | Resolution | open => fixed
11-07-2013 11:47 | Jacob Wieland - Spirent | Note Added: 0011539 |
11-07-2013 16:20 | Ina Schieferdecker | Status | resolved => closed

Notes

(0011327)
Jacob Wieland - Spirent
22-02-2013 11:20

The list seems very similar to the restriction of operations in alt-guards. Probably most other operations disallowed there (i.e. function calls with 'out' or 'inout' parameters, verdict operations) should also be disallowed. The only exception I would make is external functions (which I would also exclude from the other list).
If there should really be a difference, at least a common subset should be identified and referenced from both places.

(0011452)
Gyorgy Rethy
08-07-2013 15:34

Check the existing text

(0011480)
Jacob Wieland - Spirent
09-07-2013 15:27

I think it is better (and sufficient) to restrict the configuration operations in section 21 further to be usable only in testcase-behavior, i.e. testcases and functions/altsteps called directly or indirectly from testcases or from functions started on ptcs. A NOTE could be added in the section about definition of component types, referencing this restriction.

(0011517)
Jacob Wieland - Spirent
10-07-2013 17:09

added proposal

(0011529)
Jacob Wieland - Spirent
10-07-2013 19:34

please check

(0011539)
Jacob Wieland - Spirent
11-07-2013 11:47

fine with me