ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0000415Part 01: TTCN-3 Core LanguageNew Featurepublic24-11-2006 14:3324-04-2008 20:03
Stephan Schulz 
Ina Schieferdecker 
highfeatureN/A
closedfixed 
v3.1.1 (published 2005-06) 
v3.4.1 (published 2008-09)v3.4.1 (published 2008-09) 
-
dr. György Réthy, Ericsson
0000415: Definition IDs
In real test activities - especially in basic and function tests - logging and information being logged is one of the most important features. It is of utmost importance to effectively debug the TTCN-3 code, to be absolutely aware of what is happening during test execution and to effectively debug the SUT behaviour. For this reason users are often writing functions that are using TTCN-3 user logs to output the specific information they need. However, some information they want to log is changing dynamically during TTCN-3 code development (e.g. line number of the code generating the actual user log event), while others could be written manually but this is inefficient, inconvenient and is a potential source of errors.

The purpose of the feature is to introduce special TTCN-3 tokens beginning with a special ASCII character that is not used elsewhere in TTCN-3. The leading character shall be followed by an identifier from a predefined set.
The special tokens shall be substituted with a literal charstring values based on the rules below.
The tokens can appear anywhere in the TTCN-3 code where charstring literals are allowed (in expressions, log() statements, etc.). However, if the given token is not applicable in the corresponding context the compiler shall report an error. Substitution is not performed if the special token is given within a charstring value.

List of predefined identifiers:

Identifier Returns Applicable (type)
%moduleId name of the actual TTCN-3 module everywhere (compile time)
%fileName name of the actual TTCN-3 source file everywhere (compile time)
%lineNumber act. line no. in source code everywhere (compile time)
%definitionId name of function/altstep in functions& altsteps (compile time)
%testcaseId name of the testcase everywhere (runtime)

No tags attached.
doc CR415-DefinitionIDs-Resolution.doc (125,440) 21-04-2008 15:45
http://oldforge.etsi.org/mantis/file_download.php?file_id=1422&type=bug
doc CR415-DefinitionIDs-Resolution-V2.doc (126,464) 22-04-2008 11:35
http://oldforge.etsi.org/mantis/file_download.php?file_id=1426&type=bug
doc CR415-DefinitionIDs-Resolution-V3.doc (125,952) 22-04-2008 18:41
http://oldforge.etsi.org/mantis/file_download.php?file_id=1435&type=bug
doc CR415-DefinitionIDs-Resolution-V4.doc (133,120) 24-04-2008 19:52
http://oldforge.etsi.org/mantis/file_download.php?file_id=1456&type=bug
Issue History
24-11-2006 14:33Stephan SchulzNew Issue
24-11-2006 14:33Stephan SchulzClause Reference(s) => -
24-11-2006 14:33Stephan SchulzSource (company - Author) => dr. György Réthy, Ericsson
24-11-2006 15:03Stephan SchulzNote Added: 0000331
15-06-2007 19:13Stephan SchulzStatusnew => assigned
15-06-2007 19:13Stephan SchulzAssigned To => Ina Schieferdecker
13-10-2007 19:28Ina SchieferdeckerAssigned ToIna Schieferdecker => Jens Grabowski
17-10-2007 16:05Ina SchieferdeckerNote Added: 0003669
18-10-2007 12:06Ina SchieferdeckerTarget Version => Edition 4.1.1 (not yet published)
21-04-2008 15:45Jens GrabowskiNote Added: 0005477
21-04-2008 15:45Jens GrabowskiFile Added: CR415-DefinitionIDs-Resolution.doc
21-04-2008 15:46Jens GrabowskiAssigned ToJens Grabowski => Gyorgy Rethy
21-04-2008 19:57Gyorgy RethyNote Added: 0005483
21-04-2008 19:59Gyorgy RethyAssigned ToGyorgy Rethy => Jens Grabowski
22-04-2008 11:35Jens GrabowskiNote Added: 0005489
22-04-2008 11:35Jens GrabowskiFile Added: CR415-DefinitionIDs-Resolution-V2.doc
22-04-2008 11:36Jens GrabowskiAssigned ToJens Grabowski => Gyorgy Rethy
22-04-2008 11:37Jens GrabowskiNote Added: 0005490
22-04-2008 16:29Gyorgy RethyNote Added: 0005499
22-04-2008 16:30Gyorgy RethyAssigned ToGyorgy Rethy => Thomas Deiß
22-04-2008 18:41Thomas DeißFile Added: CR415-DefinitionIDs-Resolution-V3.doc
22-04-2008 18:43Thomas DeißNote Added: 0005507
22-04-2008 18:43Thomas DeißAssigned ToThomas Deiß => Ina Schieferdecker
23-04-2008 11:50Ina SchieferdeckerTarget VersionEdition 4.1.1 (not yet published) => Edition 3.4.1 (not yet published)
24-04-2008 19:52Ina SchieferdeckerFile Added: CR415-DefinitionIDs-Resolution-V4.doc
24-04-2008 20:03Ina SchieferdeckerStatusassigned => closed
24-04-2008 20:03Ina SchieferdeckerResolutionopen => fixed
24-04-2008 20:03Ina SchieferdeckerFixed in Version => Edition 3.4.1 (not yet published)

Notes
(0000331)
Stephan Schulz   
24-11-2006 15:03   
The metainformation name should be generalize to allow user-defined metainfo names.
(0003669)
Ina Schieferdecker   
17-10-2007 16:05   
candidate for a library - deferred to 2008
(0005477)
Jens Grabowski   
21-04-2008 15:45   
The attached proposal for resolution considers Definition IDs as preprocessor macros. This means a preprocessor can add the missing information before compilation. Runtime information can not be retrieved with this view. This means, that for example, the testcase ID or a call hierarchie of functions cannot be retrieved by this mechanism.
(0005483)
Gyorgy Rethy   
21-04-2008 19:57   
a) Let __SCOPE__ returns "control" or "<modulename>.control" in control part; think about a logging function that may be called from a function or from a control part by passing __SCOPE__ as an actual parameer. It would be more logical is logs "control", than just the name of the module the control part is within.
b) Do we need double underscore? Wouldn't it be enough just one, like _SCOPE_?
c) Would be better to call them something else as "preprocessor macros", though I do not have a good proposal just now.
(0005489)
Jens Grabowski   
22-04-2008 11:35   
Answer to <module name>.control:
changed in new proposal

Answer to double underscore question:
No, we do not need a double underscore, but a double underscore is used for the same preprocessing macros in C. Therefore, I have chosen the same notation.

Answer to name:
I changed to preprocessing macro and explained the meaning of this term. in the beginning of the proposed new annex.
(0005490)
Jens Grabowski   
22-04-2008 11:37   
I forgot: We have to decide if the new annex should become normative or informative.
(0005499)
Gyorgy Rethy   
22-04-2008 16:29   
I propose to make it a new mandatory annex (otherwise user cannot count on using it in test suites) - causes that references to shifted informative annexes shall be checked and corrected.
(0005507)
Thomas Deiß   
22-04-2008 18:43   
__SCOPE__: <modulename>.control -> control
The reason to have this more consistent with the other scope units (except the module itself), crosschecked with Gyorgy and Jens.

Otherwise, fine for me.