ETSI's Bug Tracker - Part 06: TTCN-3 Control Interface
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0005489 | Part 06: TTCN-3 Control Interface | Technical | public | 22-03-2010 14:30 | 25-03-2010 10:54

Reporter | Andrus Lehtmets |
Assigned To | Ina Schieferdecker |
Priority | high | Severity | major | 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) |
Clause Reference(s) | TCI C++ mapping, part 6
Source (company - Author) | Elvior

Summary | 0005489: TCI C++ mapping fixes
Description | TCI C++ mapping fixes separated from TRI ones. Fixes are agreed with MTP and INRIA.
Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0005485 | closed | Ina Schieferdecker | Part 05: TTCN-3 Runtime Interface | C++ mapping issues in TRI and TCI specifications (v. 4.1.1)
related to | 0005885 | closed | Ina Schieferdecker | Part 06: TTCN-3 Control Interface | Inconsistency in mapping UniversalCharstringValue (implies platform dependency)

Attached Files | CPP_Mapping_Fixes_for_TCI.doc (26,624) 22-03-2010 14:30 http://oldforge.etsi.org/mantis/file_download.php?file_id=2344&type=bug es_20187306v040103.zip (1,360,255) 25-03-2010 10:53 http://oldforge.etsi.org/mantis/file_download.php?file_id=2362&type=bug

Issue History
Date Modified | Username | Field | Change
22-03-2010 14:30 | Andrus Lehtmets | New Issue |
22-03-2010 14:30 | Andrus Lehtmets | File Added: CPP_Mapping_Fixes_for_TCI.doc |
22-03-2010 14:30 | Andrus Lehtmets | Clause Reference(s) | => TCI C++ mapping, part 6
22-03-2010 14:30 | Andrus Lehtmets | Source (company - Author) | => Elvior
22-03-2010 14:56 | Ina Schieferdecker | Relationship added | related to 0005485
22-03-2010 15:50 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 06: TTCN-3 Control Interface
22-03-2010 15:50 | Ina Schieferdecker | Status | new => assigned
22-03-2010 15:50 | Ina Schieferdecker | Assigned To | => Ina Schieferdecker
22-03-2010 15:59 | Raul Alfonso | Note Added: 0009244 |
22-03-2010 16:18 | Gyorgy Rethy | Priority | normal => high
22-03-2010 16:18 | Gyorgy Rethy | Target Version | => Edition 4.2.1 (not yet published)
23-03-2010 08:04 | Andrus Lehtmets | Note Added: 0009247 |
23-03-2010 08:07 | Ina Schieferdecker | Note Added: 0009248 |
23-03-2010 11:03 | Raul Alfonso | Note Added: 0009253 |
23-03-2010 11:46 | Andrus Lehtmets | Note Added: 0009254 |
23-03-2010 12:58 | Ina Schieferdecker | Note Added: 0009260 |
23-03-2010 16:22 | Ina Schieferdecker | Note Added: 0009268 |
23-03-2010 16:37 | Ina Schieferdecker | File Added: es_20187306v040103.zip |
24-03-2010 16:15 | Ina Schieferdecker | Note Edited: 0009248 |
24-03-2010 16:15 | Ina Schieferdecker | Note Edited: 0009260 |
24-03-2010 16:16 | Ina Schieferdecker | Note Edited: 0009260 |
24-03-2010 16:16 | Ina Schieferdecker | Note Added: 0009285 |
24-03-2010 16:18 | Ina Schieferdecker | File Deleted: es_20187306v040103.zip |
24-03-2010 16:19 | Ina Schieferdecker | File Added: es_20187306v040103.zip |
24-03-2010 16:20 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
24-03-2010 16:20 | Ina Schieferdecker | Status | assigned => resolved
24-03-2010 16:20 | Ina Schieferdecker | Resolution | open => fixed
24-03-2010 16:20 | Ina Schieferdecker | Fixed in Version | => Edition 4.2.1 (not yet published)
24-03-2010 16:48 | Ina Schieferdecker | File Deleted: es_20187306v040103.zip |
24-03-2010 16:48 | Ina Schieferdecker | File Added: es_20187306v040103.zip |
25-03-2010 10:53 | Ina Schieferdecker | File Deleted: es_20187306v040103.zip |
25-03-2010 10:53 | Ina Schieferdecker | File Added: es_20187306v040103.zip |
25-03-2010 10:54 | Ina Schieferdecker | Assigned To | Gyorgy Rethy => Ina Schieferdecker
25-03-2010 10:54 | Ina Schieferdecker | Status | resolved => closed
25-05-2011 18:04 | Ina Schieferdecker | Relationship added | related to 0005885

Notes

(0009244)
Raul Alfonso
22-03-2010 15:59

MTP is disagreed with the point 2.3 of the document. For us, typedef wchar_t TuniversalChar is OK.

(0009247)
Andrus Lehtmets
23-03-2010 08:04

"The width of wchar_t is compiler-specific and can be as small as 8 bits. Consequently, programs that need to be portable across any C or C++ compiler should not use wchar_t for storing Unicode text." (http://en.wikipedia.org/wiki/Wide_character [^])
TuniversalChar type should not be derived from wchart_t, because the size of individual characters of TTCN-3 universal charstrings is 4 bytes. Therefore TuniversalChar should be derived from 4 bytes instead:
either like in C mapping
Universal Char typedef unsigned char TciUCValue[4]
or like Elvior proposed:
typedef unsigned long TuniversalChar

(0009248)
Ina Schieferdecker
23-03-2010 08:07 (edited on: 24-03-2010 16:15)

Single characters are miscellaneous types for that purpose only. Still, single characters are treated differently in the mappings: Java Tchar --> char Tuniversalchar --> int C Tchar --> char Tuniversalchar --> TciUCValue C++ Tchar --> char Tuniversalchar --> wchar_t The simplest seems to be to agree on integer types (32 bits are enough).

(0009253)
Raul Alfonso
23-03-2010 11:03

wchar_t shall be as wide as necessary to hold the largest character in the code sets of the locales that an implementation supports. If one platform doesn't support all characters of ISO/IEC 10646, wchar_t will not be able to handle all characters, but I think it is a platform (or c++ compiler) restriction, not a problem in C++ mapping.
wchar_t was introduced to represent wide char and I don't see any reason to not use this type.
For example, Tinteger can not work with "all integer" and it is not a problem

(0009254)
Andrus Lehtmets
23-03-2010 11:46

Elvior is strongly against using wchar_t. We support Ina's suggestion to use 32 bits integer types there. more information about problems and sizes of wchar_t when using different compilers could be found at http://hristov.com/oblog/blog/post/2009/04/07/of-wchar_t/ [^]

(0009260)
Ina Schieferdecker
23-03-2010 12:58 (edited on: 24-03-2010 16:16)

This would mean Java Tchar --> char Tuniversalchar --> int C Tchar --> char Tuniversalchar --> long C++ Tchar --> char Tuniversalchar --> long Please let the STF know if that is ok.

(0009268)
Ina Schieferdecker
23-03-2010 16:22

Implemented with the following changes: - AddressType is not a class template but a class - using operator== instead of equals - removed the explicitly assigned constants in 10.5.2.14 TciTypeClass as that is still under discussion - missing semicolons were already added - change to the mapping of universal character (in chapter 10.5.1) still open as it is under discussion

(0009285)
Ina Schieferdecker
24-03-2010 16:16

Agreement was finally to go for Java Tchar --> char Tuniversalchar --> int C Tchar --> char Tuniversalchar --> wchar_t C++ Tchar --> char Tuniversalchar --> wchar_t