ETSI's Bug Tracker |
Anonymous | Login | Signup for local Mantis account | 03-05-2024 04:33 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 | ||||
0005084 | Part 01: TTCN-3 Core Language | Clarification | public | 16-04-2009 14:12 | 15-07-2009 14:29 | ||||
Reporter | Gyorgy Rethy | ||||||||
Assigned To | Ina Schieferdecker | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | v4.2.1 (published 2010-07) | Fixed in Version | v4.2.1 (published 2010-07) | ||||||
Summary | 0005084: Use of the __SCOPE__ macro | ||||||||
Description | As currently defined, the __SCOPE__ TTCN-3 macro shall return the identifyer of the named scope unit it is used in. However, it raises the problem of using the macro in global templates. Global parameterized templates behave like scope units as formal parameter names are local names obeying to scoping rules. But parameterized templates are not defined as scope units today. As a consequence it is not possible to get the template name with the __SCOPE__ macro. See the example below: template myType t_MyTemplate (charstring p_char := __SCOPE__) { f1 := p_char,...} The module name can be obtained by using __MODULE__, therefore it would be practical if __SCOPE__ returned the name of the template and not the module name. Proposal: define (at least parameterized) templates as scope units and add templates to $D.4 as "...basic scope units of TTCN-3 are module definitions part, module control part, component types, functions, altsteps, test cases, statement blocks and templates. ... (g) a template name, if the lowest named scope is a template definition." | ||||||||
Tags | No tags attached. | ||||||||
Clause Reference(s) | 5.2, D.4 | ||||||||
Source (company - Author) | |||||||||
Attached Files | CR5084_SCOPE_macro.doc [^] (26,624 bytes) 22-04-2009 16:06 CR5084_SCOPE_macro_v2.doc [^] (247,296 bytes) 03-07-2009 15:07 CR5084_SCOPE_macro_v3.doc [^] (260,096 bytes) 06-07-2009 12:49 CR5084_SCOPE_macro_Figure.ppt [^] (43,520 bytes) 08-07-2009 10:00 scope.ttcn3 [^] (1,359 bytes) 08-07-2009 17:20 def.ttcn3 [^] (1,371 bytes) 08-07-2009 17:21 scope_v2.ttcn3 [^] (1,848 bytes) 10-07-2009 12:30 CR5084_SCOPE_macro_v4.doc [^] (295,936 bytes) 10-07-2009 12:36 CR5084_SCOPE_macro_Figure_v2.ppt [^] (31,232 bytes) 10-07-2009 12:36 CR5084_SCOPE_macro_v5.doc [^] (298,496 bytes) 10-07-2009 14:44 | ||||||||
Relationships | ||||||
|
Notes | |
(0008511) Ina Schieferdecker (reporter) 20-04-2009 11:29 |
One could also think about types as scope units. All potential scope units need to be checked. |
(0008543) Tibor Csöndes (reporter) 22-04-2009 16:09 |
Changes uploaded based on the proposal. Correct, standalone example: template charstring t_MyTemplate (charstring p_char := __SCOPE__) := p_char; |
(0008833) Tibor Csöndes (reporter) 03-07-2009 15:10 |
Version 2 uploaded. Templates and structured types included as a new scope unit. Figure, "Hierarchy of scope units" redraw, examples included into __SCOPE__ macro section. |
(0008841) Gyorgy Rethy (reporter) 06-07-2009 12:49 |
I'm at figure 1. Thinking about what to draw below Templates and Types. Template fields may be of structured typed as well but are they scope units? For conssitency they should be (though at this moment I cannot see a practical consequence, except more clarity). A structured type can be defined embedded within other structured types, this shall be drawn on the figure (just an embedded structured type below structured type, embedded structured type below embedded structured type, dashed line. Textual description of templates and types as scope units is missing from above the figure. See the rest in CR5084_SCOPE_macro_v3.doc. I noticed that the figure cannot be edited if embedded this way. This may be a pro or a cons. If we find a good place to store it for next editions, it is a pro. If not, they should be embedded as Powerpoint objects. |
(0008858) Tibor Csöndes (reporter) 08-07-2009 09:59 |
It is possible to edit the figure because this is an embedded .ppt object: right click on the object -> Presentation Object -> Edit. In addition I have uploaded the original PowerPoint slide. |
(0008877) Tibor Csöndes (reporter) 08-07-2009 17:21 |
Uploaded scope.ttcn3 and def.ttcn3 are working examples for __SCOPE__ and __DEF__ macro. |
(0008888) Tibor Csöndes (reporter) 10-07-2009 12:30 edited on: 10-07-2009 12:35 |
After our discussion the decision is the following: - do not introduce __DEF__ macro only __SCOPE__ - we will use unqualified names (only "control" and not "modulename.control") - new scope units: templates and user-defined types, i.e. basic types like integer, charstring are not scope units, but type restrictions of a basic type shall be a scope unit. Based on our discussion new examples (scope_v2.ttcn3) created and uploaded. New version (CR5084_SCOPE_macro_v4.doc) also uploaded. |
(0008890) Gyorgy Rethy (reporter) 10-07-2009 14:08 |
CR5084_SCOPE_macro_v5.doc: Note 2 of D.4 deleted, Example 2 is extended to show also a default value of a formal parameter, plus a few editorials. Otherwise OK with me. |
(0008891) Tibor Csöndes (reporter) 10-07-2009 14:46 |
It's OK with me! |
Issue History | |||
Date Modified | Username | Field | Change |
16-04-2009 14:12 | Gyorgy Rethy | New Issue | |
16-04-2009 14:12 | Gyorgy Rethy | Clause Reference(s) | => 5.2, D.4 |
16-04-2009 14:12 | Gyorgy Rethy | Source (company - Author) | => |
20-04-2009 11:29 | Ina Schieferdecker | Note Added: 0008511 | |
20-04-2009 11:30 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language |
20-04-2009 11:30 | Ina Schieferdecker | Assigned To | => Tibor Csöndes |
20-04-2009 11:30 | Ina Schieferdecker | Status | new => assigned |
20-04-2009 11:30 | Ina Schieferdecker | Category | TTCN-3 Core Language => Clarification |
20-04-2009 11:30 | Ina Schieferdecker | Target Version | => Edition 4.2.1 (not yet published) |
22-04-2009 16:06 | Tibor Csöndes | File Added: CR5084_SCOPE_macro.doc | |
22-04-2009 16:09 | Tibor Csöndes | Note Added: 0008543 | |
03-07-2009 15:07 | Tibor Csöndes | File Added: CR5084_SCOPE_macro_v2.doc | |
03-07-2009 15:10 | Tibor Csöndes | Note Added: 0008833 | |
03-07-2009 15:10 | Tibor Csöndes | Assigned To | Tibor Csöndes => Gyorgy Rethy |
06-07-2009 12:49 | Gyorgy Rethy | Note Added: 0008841 | |
06-07-2009 12:49 | Gyorgy Rethy | File Added: CR5084_SCOPE_macro_v3.doc | |
06-07-2009 12:49 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Tibor Csöndes |
08-07-2009 09:59 | Tibor Csöndes | Note Added: 0008858 | |
08-07-2009 10:00 | Tibor Csöndes | File Added: CR5084_SCOPE_macro_Figure.ppt | |
08-07-2009 13:20 | Tibor Csöndes | File Added: CR5084_SCOPE.ttcn | |
08-07-2009 13:22 | Tibor Csöndes | Note Added: 0008868 | |
08-07-2009 15:08 | Ina Schieferdecker | Note Added: 0008874 | |
08-07-2009 15:08 | Ina Schieferdecker | File Added: CR5084_scope.ttcn3 | |
08-07-2009 16:46 | Ina Schieferdecker | File Deleted: CR5084_scope.ttcn3 | |
08-07-2009 16:48 | Ina Schieferdecker | File Added: scope.ttcn3 | |
08-07-2009 17:02 | Tibor Csöndes | Relationship added | related to 0005268 |
08-07-2009 17:13 | Ina Schieferdecker | File Deleted: scope.ttcn3 | |
08-07-2009 17:20 | Tibor Csöndes | File Deleted: CR5084_SCOPE.ttcn | |
08-07-2009 17:20 | Tibor Csöndes | File Added: scope.ttcn3 | |
08-07-2009 17:21 | Tibor Csöndes | File Added: def.ttcn3 | |
08-07-2009 17:21 | Tibor Csöndes | Note Added: 0008877 | |
09-07-2009 09:33 | Ina Schieferdecker | Note Deleted: 0008868 | |
09-07-2009 09:33 | Ina Schieferdecker | Note Deleted: 0008874 | |
10-07-2009 12:30 | Tibor Csöndes | Note Added: 0008888 | |
10-07-2009 12:30 | Tibor Csöndes | File Added: scope_v2.ttcn3 | |
10-07-2009 12:35 | Tibor Csöndes | Note Edited: 0008888 | |
10-07-2009 12:36 | Tibor Csöndes | File Added: CR5084_SCOPE_macro_v4.doc | |
10-07-2009 12:36 | Tibor Csöndes | File Added: CR5084_SCOPE_macro_Figure_v2.ppt | |
10-07-2009 12:39 | Tibor Csöndes | Assigned To | Tibor Csöndes => Gyorgy Rethy |
10-07-2009 14:08 | Gyorgy Rethy | Note Added: 0008890 | |
10-07-2009 14:09 | Gyorgy Rethy | File Added: CR5084_SCOPE_macro_v5.doc | |
10-07-2009 14:09 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Tibor Csöndes |
10-07-2009 14:09 | Gyorgy Rethy | Resolution | open => fixed |
10-07-2009 14:44 | Gyorgy Rethy | File Deleted: CR5084_SCOPE_macro_v5.doc | |
10-07-2009 14:44 | Gyorgy Rethy | File Added: CR5084_SCOPE_macro_v5.doc | |
10-07-2009 14:46 | Tibor Csöndes | Note Added: 0008891 | |
10-07-2009 14:46 | Tibor Csöndes | Assigned To | Tibor Csöndes => Ina Schieferdecker |
10-07-2009 14:46 | Tibor Csöndes | Status | assigned => resolved |
15-07-2009 14:29 | Ina Schieferdecker | Status | resolved => closed |
15-07-2009 14:29 | Ina Schieferdecker | Fixed in Version | => Edition 4.2.1 (not yet published) |
MantisBT 1.2.14 [^] Copyright © 2000 - 2024 MantisBT Team |