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

ID | Project | Category | View Status | Date Submitted | Last Update
0002757 | Part 01: TTCN-3 Core Language | New Feature | public | 23-01-2008 10:12 | 10-03-2009 09:39

Reporter | Thomas DeiÃŸ |
Assigned To | Ina Schieferdecker |
Priority | high | Severity | feature | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v3.2.1 (published 2007-02) |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | part 1, clause 15
Source (company - Author) | Andy Rauland, Thomas DeiÃŸ, Nokia Siemens Networks

Summary | 0002757: accessing parts of received messages

Description

(applies equally to 3.3)
When several fields of received messages are used within a test case the message is often taken is taken apart by a series of assign statements using the dot notation to access the individual fields.
This approach is fragile (changes in the message structure might have effects on the access using the dot notation) as well as cumbersome (the access is done field by field causing repetitive code).
Templates provide already a compact way to define parts of a message, a similar approach could be used to access parts of a message in a compact way. The attached document contains two proposals how this could be achieved.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0004849 | closed | Ina Schieferdecker | Misuse of the assignment operator

Attached Files

assigning_parts_of_messages_02.doc (136,192) 23-01-2008 10:12
http://oldforge.etsi.org/mantis/file_download.php?file_id=1298&type=bug
CR2757_proposed_solution_v1.doc (1,071,616) 15-08-2008 10:24
http://oldforge.etsi.org/mantis/file_download.php?file_id=1608&type=bug
CR2757_proposed_solution_v1_1.doc (1,073,664) 30-09-2008 01:10
http://oldforge.etsi.org/mantis/file_download.php?file_id=1666&type=bug
CR2757_proposed_solution_v1_2.doc (1,075,200) 13-10-2008 13:24
http://oldforge.etsi.org/mantis/file_download.php?file_id=1680&type=bug
CR2757_proposed_solution_v1_3.doc (1,079,296) 26-11-2008 15:54
http://oldforge.etsi.org/mantis/file_download.php?file_id=1793&type=bug
CR2757_proposed_solution_v1_4.doc (1,080,832) 26-11-2008 17:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=1795&type=bug
CR2757_proposed_solution_v1_5.doc (1,080,320) 10-12-2008 14:41
http://oldforge.etsi.org/mantis/file_download.php?file_id=1882&type=bug
CR2757_proposed_solution_v1_6.doc (1,088,000) 12-01-2009 08:57
http://oldforge.etsi.org/mantis/file_download.php?file_id=1944&type=bug
CR2757_proposed_solution_v1_7.doc (1,094,656) 12-01-2009 17:54
http://oldforge.etsi.org/mantis/file_download.php?file_id=1946&type=bug
CR2757_proposed_solution_v1_8.doc (1,095,168) 12-01-2009 18:28
http://oldforge.etsi.org/mantis/file_download.php?file_id=1947&type=bug
CR2757_proposed_solution_v1_9.doc (1,094,656) 13-01-2009 08:28
http://oldforge.etsi.org/mantis/file_download.php?file_id=1948&type=bug
CR2757_proposed_solution_v1_10.doc (1,096,192) 10-03-2009 09:38
http://oldforge.etsi.org/mantis/file_download.php?file_id=2023&type=bug

Issue History
Date Modified | Username | Field | Change
23-01-2008 10:12 | Thomas DeiÃŸ | New Issue |
23-01-2008 10:12 | Thomas DeiÃŸ | Status | new => assigned
23-01-2008 10:12 | Thomas DeiÃŸ | Assigned To | => Ina Schieferdecker
23-01-2008 10:12 | Thomas DeiÃŸ | File Added: assigning_parts_of_messages_02.doc |
23-01-2008 10:12 | Thomas DeiÃŸ | Clause Reference(s) | => part 1, clause 15
23-01-2008 10:12 | Thomas DeiÃŸ | Source (company - Author) | => Andy Rauland, Thomas DeiÃŸ, Nokia Siemens Networks
09-05-2008 10:36 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
15-07-2008 10:40 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
14-08-2008 13:39 | Gyorgy Rethy | Note Added: 0006529 |
15-08-2008 10:24 | Gyorgy Rethy | File Added: CR2757_proposed_solution_v1.doc |
15-08-2008 10:25 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
30-09-2008 01:10 | Thomas DeiÃŸ | File Added: CR2757_proposed_solution_v1_1.doc |
30-09-2008 01:11 | Thomas DeiÃŸ | Note Added: 0006930 |
30-09-2008 01:11 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Gyorgy Rethy
13-10-2008 13:24 | Gyorgy Rethy | File Added: CR2757_proposed_solution_v1_2.doc |
13-10-2008 13:27 | Gyorgy Rethy | Note Added: 0007039 |
13-10-2008 13:27 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
13-10-2008 13:39 | Thomas DeiÃŸ | Note Added: 0007040 |
13-10-2008 13:39 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ =>
13-10-2008 13:41 | Thomas DeiÃŸ | Assigned To | => Ina Schieferdecker
24-11-2008 16:56 | Ina Schieferdecker | Note Added: 0007391 |
24-11-2008 16:56 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
26-11-2008 14:08 | Gyorgy Rethy | Note Added: 0007449 |
26-11-2008 14:10 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
26-11-2008 15:54 | Thomas DeiÃŸ | File Added: CR2757_proposed_solution_v1_3.doc |
26-11-2008 15:54 | Thomas DeiÃŸ | Note Added: 0007454 |
26-11-2008 15:54 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Gyorgy Rethy
26-11-2008 15:56 | Thomas DeiÃŸ | Note Edited: 0007454 |
26-11-2008 17:15 | Gyorgy Rethy | Note Added: 0007457 |
26-11-2008 17:16 | Gyorgy Rethy | Note Edited: 0007457 |
26-11-2008 17:17 | Gyorgy Rethy | File Added: CR2757_proposed_solution_v1_4.doc |
26-11-2008 17:17 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Thomas DeiÃŸ
27-11-2008 07:49 | Thomas DeiÃŸ | Note Added: 0007463 |
27-11-2008 07:49 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
10-12-2008 14:40 | Ina Schieferdecker | Note Added: 0007639 |
10-12-2008 14:41 | Ina Schieferdecker | File Added: CR2757_proposed_solution_v1_5.doc |
10-12-2008 14:41 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
11-12-2008 10:46 | Thomas DeiÃŸ | Note Added: 0007651 |
11-12-2008 10:46 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
12-12-2008 07:30 | Ina Schieferdecker | Status | assigned => resolved
12-12-2008 07:30 | Ina Schieferdecker | Resolution | open => fixed
12-12-2008 07:30 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published)
12-12-2008 07:31 | Ina Schieferdecker | Status | resolved => closed
12-01-2009 08:57 | Thomas DeiÃŸ | Status | closed => feedback
12-01-2009 08:57 | Thomas DeiÃŸ | Resolution | fixed => reopened
12-01-2009 08:57 | Thomas DeiÃŸ | Note Added: 0007818 |
12-01-2009 08:57 | Thomas DeiÃŸ | File Added: CR2757_proposed_solution_v1_6.doc |
12-01-2009 17:54 | Ina Schieferdecker | File Added: CR2757_proposed_solution_v1_7.doc |
12-01-2009 17:56 | Ina Schieferdecker | Note Added: 0007824 |
12-01-2009 17:56 | Ina Schieferdecker | Status | feedback => assigned
12-01-2009 17:56 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
12-01-2009 18:27 | Ina Schieferdecker | Note Added: 0007825 |
12-01-2009 18:28 | Ina Schieferdecker | File Added: CR2757_proposed_solution_v1_8.doc |
13-01-2009 08:28 | Thomas DeiÃŸ | File Added: CR2757_proposed_solution_v1_9.doc |
13-01-2009 08:29 | Thomas DeiÃŸ | Note Added: 0007826 |
13-01-2009 08:29 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
10-03-2009 09:37 | Ina Schieferdecker | Relationship added | related to 0004849
10-03-2009 09:38 | Ina Schieferdecker | File Added: CR2757_proposed_solution_v1_10.doc |
10-03-2009 09:38 | Ina Schieferdecker | Status | assigned => resolved
10-03-2009 09:38 | Ina Schieferdecker | Resolution | reopened => fixed
10-03-2009 09:39 | Ina Schieferdecker | Status | resolved => closed

Notes

(0006529)
Gyorgy Rethy
14-08-2008 13:39

CR was discussed and it was decided to go for an unnamed list of assignmets allowing to redirect different parts of the received message, like [] P.receive(b_r_1(false)) -> value {vt_bool:=R.b1;vl_bool:=R.b2}. Detailed solution to be developed.

(0006930)
Thomas DeiÃŸ
30-09-2008 01:11

A few (minor) comments. Ok to restrict this to message based communication.

(0007039)
Gyorgy Rethy
13-10-2008 13:27

I propose to leave semicolon to separate the redirects, it is similar to assignments following each other within a block of statements. Can be stored to values or formal parameters, the latter is added to the text. Otherwise it could be approved.

(0007040)
Thomas DeiÃŸ
13-10-2008 13:39

v1-2 checked. Ok from my side.

(0007391)
Ina Schieferdecker
24-11-2008 16:56

Please check another syntax close to the param redirect. Also, the usage of the field type is not enough - consider to use the field name.

(0007449)
Gyorgy Rethy
26-11-2008 14:08

Regarding the syntax, the param redirect syntax is suitable, see example below.
We could even define an analoguos explicit syntax for param redirect, e.g.
MyPort.getcall(MyProc:{?, ?}) -> param (param1 -> MyPar1Var, param3 -> MyPar3Var);
Pls. note that in this case no need to skip e.g. the in parameters in the list.
The type is inough, as identifes the field unanomously. Pls. note, that the whole message may also be stored when a redirection list is specified, e.g
MyPort.receive(MyType:?) -> value ( MyType -> MyPDUVar, MyType.messageId -> MyMessageIdVar )
//..................................^----------------^stores the whole message
//.....................................................^----------------^stores the messageId field.

(0007454)
Thomas DeiÃŸ
26-11-2008 15:54 (edited on: 26-11-2008 15:56)

syntax updated according to our discussion (no usage of the typename in the redirect). v1_3 uploaded. Should it be stated explicitly that also elements of record of messages can be accessed?

(0007457)
Gyorgy Rethy
26-11-2008 17:15 (edited on: 26-11-2008 17:16)

In the text the field reference is not starting with a dot, but ExtendedFieldReference does. Thus I changed bnf rule 380 to
1. ValueSpec ::= ValueKeyword ( VariableRef | "(" [ (FieldReference | TypeDefIdentifier ) ExtendedFieldReference ] PortRedirectSymbol VariableRef [","] ")" )
/*STATIC SEMANTICS â€“ FieldReference shall not be ParRef and ExtendedFieldReference shall not be TypeDefIdentifier*/
See version ~v1_4.
Except this is OK with me.

(0007463)
Thomas DeiÃŸ
27-11-2008 07:49

fine for me.

(0007639)
Ina Schieferdecker
10-12-2008 14:40

Two corrections: Check operation: "Value, sender and parameter redirects are specified in the clauses of the related receiving operations" removed as it is not entirely true as e.g. sender can be checked without a receiving operation. Also, the sentence does not add information at this point. 390. ValueSpec: { } added as several "redirects" can be given on field level Please check.

(0007651)
Thomas DeiÃŸ
11-12-2008 10:46

you are correct on both issues.

(0007818)
Thomas DeiÃŸ
12-01-2009 08:57

reopened to include result of email discussion with Jacob Wiegand. value redirection resembles more closely parameter redirection, if parts of the message are assigned.

(0007824)
Ina Schieferdecker
12-01-2009 17:56

Corrected the examples as the agreement was to use ":=" instead of "->" - see syntactical structure. Simplified the syntactical structure as it only gives an overview - the precise BNF rules are given however in annex A. See v1_7 and please check.

(0007825)
Ina Schieferdecker
12-01-2009 18:27

Had to adapt the text for receive to refer to ":=" and not to "->", see v1_8

(0007826)
Thomas DeiÃŸ
13-01-2009 08:29

changes ok. And one further use of '->' found in the Example 2 of the catch statement. corrected in v 0.9.