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

ID | Project | Category | View Status | Date Submitted | Last Update
0006785 | Part 01: TTCN-3 Core Language | Clarification | public | 20-06-2014 09:19 | 06-01-2015 18:41

Reporter | Gyorgy Rethy |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.6.1 (published 2014-06) |
Target Version | v4.7.1 (published 2015-06) | Fixed in Version | v4.7.1 (published 2015-06) |
Clause Reference(s) | C.5.3, C.5.4
Source (company - Author) | L.M.Ericsson

Summary | 0006785: Change name and add description of string_encoding parameter

Description

In the encvalue_unichar and decvalue_unichar predefined functions the parameter string_encoding is specified. Its name is the same as the name of the similar parameter used in the oct2unichar and unichar2oct predefined functions, however its semantical behaviour is completely different. It is controlling how to serialize the universal charstring to the bitstring sent to the encoder and deserialize the bitstring received from the codec.
Proposed soltion:
change the name of the parameter to "serialization"
Add a textual description to the first paragraph specifying what the parameter controls.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR6785_v1.docx (50,571) 04-11-2014 14:10 http://oldforge.etsi.org/mantis/file_download.php?file_id=3159&type=bug CR6785_v2.docx (52,258) 06-11-2014 12:12 http://oldforge.etsi.org/mantis/file_download.php?file_id=3172&type=bug CR6785_v3.docx (52,752) 06-11-2014 13:34 http://oldforge.etsi.org/mantis/file_download.php?file_id=3177&type=bug

Issue History
Date Modified | Username | Field | Change
20-06-2014 09:19 | Gyorgy Rethy | New Issue |
20-06-2014 10:57 | Gyorgy Rethy | Product Version | => v4.6.1 (published 2014-06)
20-06-2014 10:57 | Gyorgy Rethy | Target Version | => v4.7.1 (published 2015-06)
20-06-2014 11:40 | Jacob Wieland - Spirent | Note Added: 0012186 |
06-10-2014 12:22 | Gyorgy Rethy | Note Added: 0012230 |
06-10-2014 16:41 | Jacob Wieland - Spirent | Note Added: 0012239 |
03-11-2014 16:38 | Gyorgy Rethy | Assigned To | => Tomas Urban
03-11-2014 16:38 | Gyorgy Rethy | Status | new => assigned
04-11-2014 13:57 | Tomas Urban | Note Added: 0012399 |
04-11-2014 14:10 | Tomas Urban | File Added: CR6785_v1.docx |
04-11-2014 14:36 | Tomas Urban | Note Added: 0012403 |
04-11-2014 14:36 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
04-11-2014 14:36 | Tomas Urban | Status | assigned => confirmed
04-11-2014 18:54 | Jacob Wieland - Spirent | Note Added: 0012410 |
04-11-2014 18:58 | Jacob Wieland - Spirent | Note Edited: 0012410 | bug_revision_view_page.php?bugnote_id=12410#r95
05-11-2014 16:39 | Gyorgy Rethy | Note Added: 0012440 |
05-11-2014 17:11 | Gyorgy Rethy | Note Added: 0012441 |
05-11-2014 17:12 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Tomas Urban
05-11-2014 17:13 | Gyorgy Rethy | Note Edited: 0012441 | bug_revision_view_page.php?bugnote_id=12441#r97
05-11-2014 17:14 | Gyorgy Rethy | Note Edited: 0012441 | bug_revision_view_page.php?bugnote_id=12441#r98
06-11-2014 12:12 | Tomas Urban | File Added: CR6785_v2.docx |
06-11-2014 12:13 | Tomas Urban | Note Added: 0012457 |
06-11-2014 12:13 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
06-11-2014 13:34 | Gyorgy Rethy | File Added: CR6785_v3.docx |
06-11-2014 13:35 | Gyorgy Rethy | Note Added: 0012466 |
06-11-2014 13:36 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Tomas Urban
06-11-2014 14:06 | Tomas Urban | Note Added: 0012469 |
06-11-2014 14:06 | Tomas Urban | Status | confirmed => resolved
06-11-2014 14:06 | Tomas Urban | Fixed in Version | => v4.7.1 (published 2015-06)
06-11-2014 14:06 | Tomas Urban | Resolution | open => fixed
06-11-2014 14:06 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
06-01-2015 18:41 | Gyorgy Rethy | Note Added: 0012652 |
06-01-2015 18:41 | Gyorgy Rethy | Status | resolved => closed

Notes

(0012186)
Jacob Wieland - Spirent
20-06-2014 11:40

Can you explain the difference? I don't see one.

(0012230)
Gyorgy Rethy
06-10-2014 12:22

The encvalue/decvalue functions are calling the/a (textual) codec and they return what the codec is actually returns; for example, to a SIP encoder I can send a TTCN-3 abstract value representing a SIP message and get the encoded SIP message, i.e. a sequence of (abstract) unicode characters: this doesn't have any encoding. This sequence of characters are sent by the codec to the TE as a bitstring that the TE has to convert to abstract character data: the string_encoding parameter defines the type of serialization the encoder uses when creating the bitstring sent to the TE. Actually, if an internal control mechanism would handle this at TCI, this parameter would not be needed at all in TTCN-3 (or we could say that if the parameter is missing, it handled at TCI automatically).
The oct2unichar and unichar2oct are converting the values within the TE (as seen by the user) and the string_encoding parameter is really controlling how the TTCN-3 characters are encoded within the TTCN-3 octetstring value.

(0012239)
Jacob Wieland - Spirent
06-10-2014 16:41

I still do not really get what you are saying at all.
How does this relate to the equivalency:
encvalue_unichar(val, dec_rule) == oct2unichar(bit2oct(encvalue(val)), dec_rule)
Here, obviously, the dec_rule has the same semantics, it is used to determine how to deserialize the bits generated by the (binary) encoder as character data.
The same is true for the decvalue_unichar function.
What is a textual codec?

(0012399)
Tomas Urban
04-11-2014 13:57

Jacob, you are absolutely right and the unichar functions do work exactly as you describe. The problem is that a user that doesn't read the specification carefuly might get an impression that the parameter is an instruction to the codec (especially if it is a textual codec) influencing the encoding of the value. For that reason we want to change the name of the parameter so that it is more obvious what it actually does.

(0012403)
Tomas Urban
04-11-2014 14:36

Proposal uploaded. Please review.

(0012410)
Jacob Wieland - Spirent
04-11-2014 18:54 (edited on: 04-11-2014 18:58)

I think the terminus string-encoding is pretty commonly used while I have never heard the term string serialization. Sure, it might be confused with encoding as used otherwise in the standard, but do we really have to invent new words because of that? Also, I still do not get the "semantic difference" to the same parameter in oct2unichar and unichar2oct.

(0012440)
Gyorgy Rethy
05-11-2014 16:39

http://en.wikipedia.org/wiki/Serialization [^] You are rigth, encoding and serialization are pritty much similar, sometimes the same thing. Both terms are used in computing, but serialization is not used in networking terminology. This term is selected to make the distinction.

(0012441)
Gyorgy Rethy
05-11-2014 17:11 (edited on: 05-11-2014 17:14)

My understanding of the semantical difference is:
In oct2unichar and unichar2oct the string_encoding parameter is directly influencing the return value of these functions, I think their semantics is clear.
Now, if looking at decvalue_unichar. Let encoded_value be a raw SIP message received from the line (note, it has several options, ie. short/long header formats, headers are unordered, possible line breaks etc.), so we want to send it to a codec for decoding. The codec will decode it into an abstract TTCN-3 data e.g. SIP_PDU, this is the type of decoded_value. Pls. note, the raw SIP message is a character string only it doesn't need any identification of string encoding. My understanding is that the string_serialization controls how our raw SIP message will be serialized by the TE into a bitstring when sending to the codec. Pls. correct me if I'm wrong.
Shall it appear in the TTCN-3 code or should it be a tool internal issue, I do not really know, maybe allowing it in the TTCN-3 code gives more option to change the codec.
Anyway, in both cases, if I'm correct or I'm wrong, the purpose of the parameter seems to be unclear from the current text.

(0012457)
Tomas Urban
06-11-2014 12:13

Textual description of the encvalue_unichar and decvalue_unichar functions addded. Please review.

(0012466)
Gyorgy Rethy
06-11-2014 13:35

CR6785_v3.docx: no technical change, but a small explanatory addition (in brackets) to CR6785_v2.docx. Please check.

(0012469)
Tomas Urban
06-11-2014 14:06

I have no objections. I think the CR can be marked as resolved and it is ready to be added to the next version of the TTCN-3 core language standard.

(0012652)
Gyorgy Rethy
06-01-2015 18:41

Added to draft V4.6.3