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

ID | Project | Category | View Status | Date Submitted | Last Update
0007826 | Part 01: TTCN-3 Core Language | Technical | public | 13-02-2019 08:26 | 29-12-2019 13:04

Reporter | Wolfgang Seka |
Assigned To | Gyorgy Rethy |
Priority | high | Severity | major | Reproducibility | have not tried
Status | closed | Resolution | no change required |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version | 4.12.1 (published 2020-05) |
Clause Reference(s) | Annex A.1.5 (maybe others)
Source (company - Author) | MCC160 (Wolfgang)

Summary | 0007826: Non-backward compatibility issue with reserved words of extension packages

Description

Table A.5 defines reserved words in extension packages but it is not clear how these shall be treated in test suites not using extensions:
1. TTCN-3 type definitions: Annex A says "... Using these terminals in the code is not recommended as it might lead to issues in the future"
This is not a technical specification and therefore does not say exactly whether or not a TTCN-3 type may use one of the keywords (e.g. as field name in a record).
On the other hand if it would not be allowed to use the extension package keywords in TTCN-3 type definitions there is not backward compatibility anymore with TTCN projects being older than the extension.
2. It is not clear whether or under which condition for fieldnames in external type definition a "_" extension is needed. If it would be needed for keywords of extension packages - again - there would be a compatibility issue.
On the other hand it is not clear whether or not compilers expect the "_" (e.g. if we add the "_", do all tools and compilers accept this ??).
In practice different compiler behaviour can be observed and it seems that some compilers are changing (=> compatibility issues).
Conclusions:
To avoid compatibility issues reserved words of extension packages shall not affect test suites which do not use any extension. It is up to tool implementation to cope with potential extensions but tools shall be able to cope with test suites which ignore reserved words of extension packages.

Steps To Reproduce |
Additional Information | Example: "timestamp" is used as field name in ETSI's "LibSip" and in several XSD type definitions.
Tags | No tags attached.
Relationships |
Attached Files | CR7826.docx (166,693) 08-08-2019 09:24 http://oldforge.etsi.org/mantis/file_download.php?file_id=3843&type=bug CR7826-2.docx (166,436) 08-08-2019 10:08 http://oldforge.etsi.org/mantis/file_download.php?file_id=3846&type=bug

Issue History
Date Modified | Username | Field | Change
13-02-2019 08:26 | Wolfgang Seka | New Issue |
13-02-2019 11:00 | Jacob Wieland - Spirent | Note Added: 0015332 |
27-05-2019 11:26 | Jacob Wieland - Spirent | Note Added: 0015345 |
06-08-2019 10:01 | KristÃ³f Szabados | Note Added: 0015371 |
06-08-2019 10:01 | KristÃ³f Szabados | Status | new => resolved
06-08-2019 10:01 | KristÃ³f Szabados | Resolution | open => no change required
06-08-2019 10:01 | KristÃ³f Szabados | Assigned To | => Gyorgy Rethy
08-08-2019 07:39 | KristÃ³f Szabados | Note Added: 0015416 |
08-08-2019 07:39 | KristÃ³f Szabados | Assigned To | Gyorgy Rethy => KristÃ³f Szabados
08-08-2019 07:39 | KristÃ³f Szabados | Status | resolved => assigned
08-08-2019 09:24 | KristÃ³f Szabados | File Added: CR7826.docx |
08-08-2019 09:25 | KristÃ³f Szabados | Note Added: 0015423 |
08-08-2019 09:25 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
08-08-2019 09:25 | KristÃ³f Szabados | Status | assigned => confirmed
08-08-2019 10:08 | Jacob Wieland - Spirent | File Added: CR7826-2.docx |
08-08-2019 10:09 | Jacob Wieland - Spirent | Note Added: 0015430 |
08-08-2019 10:09 | Jacob Wieland - Spirent | Status | confirmed => resolved
08-08-2019 10:09 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
29-12-2019 11:27 | Gyorgy Rethy | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
29-12-2019 13:04 | Gyorgy Rethy | Note Added: 0015604 |
29-12-2019 13:04 | Gyorgy Rethy | Status | resolved => closed
29-12-2019 13:04 | Gyorgy Rethy | Fixed in Version | => 4.12.1 (published 2020-05)

Notes

(0015332)
Jacob Wieland - Spirent
13-02-2019 11:00

This is basically how it was handled in the past. However, this carries its own set of problems that need solving as well.
If you import from a module of a different language, it is dependent on what languages your module uses how the identifiers of the other module are mapped to TTCN-3. Thus, it could even be the case that the same external module used by two different modules would need a different mapping on import.
This causes maintenance nightmares and as soon as some additional language is used in a later version of that module, it would introduce backward incompatibility for the other definitions in that module as well.
That is why we decided that all reserved words should be treated equally, no matter what language features are used. It is then the only responsibility of the tool providers to deal with the global list of reserved words (which should be in the core standard document so they are mandatory). Also, we (the Evolution STF) try to stay away from new non-@ keywords (we introduced the @-words for exactly that reason) when introducing new language constructs to not cause backward compatibility issues in the future.
However, there's no perfect fully non-backward-incompatible solution of this problem, so we opted for one where we thought it would cause the least amount of problems, i.e. necessity for refactoring of old code.

(0015345)
Jacob Wieland - Spirent
27-05-2019 11:26

To avoid compatibility issues in test suites, the modules of these test suites should always be marked with the language version. If that is the case, no backward compatibility issues should occur with correct tools as the tools would treat the package keywords as reserved in all cases only for languagues after the version where this was introduced.

(0015371)
KristÃ³f Szabados
06-08-2019 10:01

STF discussion: we aggree that this is a tool issue. Tools should correctly implement the reserved word mapping based on the language version of the importing module.

(0015416)
KristÃ³f Szabados
08-08-2019 07:39

STF discussion: make the sentence in question more clear.

(0015423)
KristÃ³f Szabados
08-08-2019 09:25

Please check.

(0015430)
Jacob Wieland - Spirent
08-08-2019 10:09

deleted doubled sentence, otherwise ok

(0015604)
Gyorgy Rethy
29-12-2019 13:04

Included in final draft V4.11.3