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

ID | Project | Category | View Status | Date Submitted | Last Update
0005291 | Part 01: TTCN-3 Core Language | Editorial | public | 27-07-2009 15:11 | 17-08-2009 14:24

Reporter | Gyorgy Rethy |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | always
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.1.1 (published 2009-06) |
Target Version | v4.2.1 (published 2010-07) | Fixed in Version | v4.2.1 (published 2010-07) |
Clause Reference(s) | A.1.6.1.0 General
Source (company - Author) | L.M.Ericsson

Summary | 0005291: BNF - friend definitions should have no visibility

Description

The current BNF allows visibility for friend definitions, while the textual part (clause 8.2.4) does not:
8.2.4 Definition of friend modules
Syntactical Structure
friend module ModuleIdentifier { "," ModuleIdentifier } ";"
On the other hand side clause 8.2.5 says "(top level definitions) They are by default public except for imported definitions which are by default private."
Thus friend definitions, according to $8.2.5, should be public. But, in fact, they have meaning for the given module only and they are not importable; hence, as a matter of fact, they are always private.
-------------------
Two solutions are possible:
1) (preferred) Make the private keyword mandatory in $8.2.4:
Syntactical Structure
private friend module ModuleIdentifier { "," ModuleIdentifier } ";"
2) Modify the text in $8.2.5:
"They are by default public except for imported definitions and friend definitions which are by default private.
...
The visibility of imported definitions and friend definitions are by default always private. All other module definitions are by default public."
-------------
Solution 1), though would introduce a mandatory syntax, which is optional for other definitions, is the preferred one, as solution 2) would introduce a new exception; users looking at a friend definitions without a visibility keyword could think that friend lists are also imported.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
27-07-2009 15:11 | Gyorgy Rethy | New Issue |
27-07-2009 15:11 | Gyorgy Rethy | Status | new => assigned
27-07-2009 15:11 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
27-07-2009 15:11 | Gyorgy Rethy | Clause Reference(s) | => A.1.6.1.0 General
27-07-2009 15:11 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
27-07-2009 15:50 | Gyorgy Rethy | Description Updated |
27-07-2009 16:02 | Gyorgy Rethy | Description Updated |
11-08-2009 06:44 | Ina Schieferdecker | Note Added: 0008922 |
17-08-2009 14:24 | Ina Schieferdecker | Resolution | open => fixed
17-08-2009 14:24 | Ina Schieferdecker | Fixed in Version | => Edition 4.2.1 (not yet published)
17-08-2009 14:24 | Ina Schieferdecker | Target Version | => Edition 4.2.1 (not yet published)
17-08-2009 14:24 | Ina Schieferdecker | Status | assigned => resolved
17-08-2009 14:24 | Ina Schieferdecker | Status | resolved => closed

Notes

(0008922)
Ina Schieferdecker
11-08-2009 06:44

In analogy to groups, which can be public only, a solution can be:
[ private ] friend module ModuleIdentifier { "," ModuleIdentifier } ";"
Adding a restriction:
In addition to the general static rules of TTCN 3 given in clause 5, the following restrictions apply:
a) Only private visibility can be defined for friend definitions as they are always private.
And extending 8.2.5 accordingly:
Top-level module definitions and import statements have a visibility, which can be explicitly set. They are by default public except for imported and friend definitions. Import definitions are by default private. Friend definitions are private only. Group definitions are public only.