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

ID | Project | Category | View Status | Date Submitted | Last Update
0005783 | Part 01: TTCN-3 Core Language | Clarification | public | 06-10-2010 15:28 | 14-12-2010 12:09

Reporter | Andrus Lehtmets |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | major | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.3.1 (published 2011-06) | Fixed in Version | v4.3.1 (published 2011-06) |
Clause Reference(s) | Part 1: TTCN-3 Core Language
Source (company - Author) | Elvior

Summary | 0005783: TTCN-3 Signature templates

Description

We need clarification about using matching templates with signatures - looks like formal rules for that are missing.
So my question is are following constructions allowed or not?
[]myport.getcall(myFunction_Sign : ?)
[]myport.getreply(myFunction:?)
by the examples in CL I would say that corrects are:
[]myport.getcall(myFunction_Sign :{?, ?, ?})
[]myport.getreply(myFunction_Sign:{?,?,?} value ?)
but from the other hand - there is no formal rule in CL how matching templates for signature should be built
Shouldn't specification contain a clause that only compound expression is allowed as signature template?
If '?' is allowed then there should be explicit rules on how to handle it.
Please see also attached mail conversation.

Steps To Reproduce |

Additional Information

We propose following changes in CL spec:
1)Chapter 15.2
The sentence "A signature template defines the values and matching mechanisms of the procedure parameters only, but not the return value." should be replaced with: "A signature template defines values of procedure parameters or a matching mechanism used for matching procedure parameter values. It does not define the return value or matching mechanism for the return value."
2)New chapter 15.6.4 Referencing signature parameters
While signature templates do not allow referencing their parameters directly (e.g. using dot notation), such a reference is possible when modifying a signature template. However, there can be a matching mechanism assigned to the signature template. This clause provides rules for such cases.
a) Value lists and complemented lists: referencing a parameter of a signature template to which a value list or a complemented list is assigned, at the left hand side of an assignment, shall cause an error.
Example:
signature MySignature(in integer par1, in integer par2);
template MySignature t_mySign1 := ({ par1 := 1, par2 := 2 }, { par1 := 2, par2 := 1 });
template MySignature t_mySign2 modifies t_mySign1 := { par1 := ? }; // shall cause an error as t_mySign1 contains a value list template
b) AnyValue: when referencing a parameter within a signature to which AnyValue is assigned, at the left hand side of an assignment, the signature template is implicitly expanded to the parameter level. During this expansion an AnyValue shall be assigned to all parameters of the template. After this expansion the value or matching mechanism at the right hand side of the assignment shall be assigned to the referenced parameter.
Example:
template MySignature t_mySign3 := ?;
template MySignature t_mySign4 modifies t_mySign3 := { par1 := 3 };
// t_mySign3 is expanded to { par1 := ?, par2 := ? }
// thus t_mySign4 will be { par1 := 3, par2 := ? }
3)Chapter 15.7
A new line should be added to the table 11:
Type: Signature
Allowed matching symbols: ?, list, complement

Tags | No tags attached.
Relationships |
Attached Files | TTCN-3 Signature templates.htm (22,585) 06-10-2010 15:28 http://oldforge.etsi.org/mantis/file_download.php?file_id=2443&type=bug CR5783.doc (108,544) 01-12-2010 10:21 http://oldforge.etsi.org/mantis/file_download.php?file_id=2452&type=bug CR5783 resolution-Gyorgy-101201.doc (122,368) 01-12-2010 13:14 http://oldforge.etsi.org/mantis/file_download.php?file_id=2453&type=bug

Issue History
Date Modified | Username | Field | Change
06-10-2010 15:28 | Andrus Lehtmets | New Issue |
06-10-2010 15:28 | Andrus Lehtmets | File Added: TTCN-3 Signature templates.htm |
06-10-2010 15:28 | Andrus Lehtmets | Clause Reference(s) | => Part 1: TTCN-3 Core Language
06-10-2010 15:28 | Andrus Lehtmets | Source (company - Author) | => Elvior
30-11-2010 15:39 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
30-11-2010 15:53 | Gyorgy Rethy | Note Added: 0009855 |
30-11-2010 15:53 | Gyorgy Rethy | Assigned To | => Jacob Wieland - Spirent
30-11-2010 15:53 | Gyorgy Rethy | Status | new => assigned
30-11-2010 15:53 | Gyorgy Rethy | Target Version | => Edition 4.3.1 (not yet published)
01-12-2010 10:15 | Jacob Wieland - Spirent | File Added: CR5783.doc |
01-12-2010 10:19 | Jacob Wieland - Spirent | Note Added: 0009879 |
01-12-2010 10:20 | Jacob Wieland - Spirent | File Deleted: CR5783.doc |
01-12-2010 10:21 | Jacob Wieland - Spirent | File Added: CR5783.doc |
01-12-2010 10:24 | Jacob Wieland - Spirent | Note Added: 0009882 |
01-12-2010 10:24 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
01-12-2010 11:25 | Jens Grabowski | Note Added: 0009890 |
01-12-2010 11:25 | Jens Grabowski | Assigned To | Jens Grabowski => Gyorgy Rethy
01-12-2010 12:10 | Andrus Lehtmets | Note Added: 0009892 |
01-12-2010 13:14 | Gyorgy Rethy | File Added: CR5783 resolution-Gyorgy-101201.doc |
01-12-2010 13:17 | Gyorgy Rethy | Note Added: 0009893 |
01-12-2010 13:18 | Gyorgy Rethy | Note Edited: 0009893 |
01-12-2010 13:18 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jens Grabowski
01-12-2010 13:18 | Gyorgy Rethy | Resolution | open => fixed
01-12-2010 13:20 | Jens Grabowski | Note Added: 0009894 |
01-12-2010 13:20 | Jens Grabowski | Assigned To | Jens Grabowski => Ina Schieferdecker
01-12-2010 13:20 | Jens Grabowski | Status | assigned => resolved
14-12-2010 12:08 | Ina Schieferdecker | Note Added: 0009961 |
14-12-2010 12:09 | Ina Schieferdecker | Status | resolved => closed
14-12-2010 12:09 | Ina Schieferdecker | Fixed in Version | => Edition 4.3.1 (not yet published)

Notes

(0009855)
Gyorgy Rethy
30-11-2010 15:53

STF discussion on 30-11-2010: Add a sentence and examples for the shorthand "any signature" case.

(0009879)
Jacob Wieland - Spirent
01-12-2010 10:19

I have uploaded the proposal. I've taken most of the proposed text, but not the first sentence as I think it would change the current semantics (while I think the sentence up till now reflects the current semantics more accurately). I've also added a few more examples.

(0009882)
Jacob Wieland - Spirent
01-12-2010 10:24

please proofread

(0009890)
Jens Grabowski
01-12-2010 11:25

For me it looks ok. However, GyÃ¶rgy, please have a look into clause 15.6.4 of the resolution.

(0009892)
Andrus Lehtmets
01-12-2010 12:10

For Elvior it looks also ok.

(0009893)
Gyorgy Rethy
01-12-2010 13:17 (edited on: 01-12-2010 13:18)

Cross-checked, it is OK. Just one minor correction in CR5783 resolution-Gyorgy-101201.doc: in Example 4, the first getreply op. it seems Template2 was meant instead of Template1. This is changed plus some very minor editorials (changing formatting). Jens pls. cross-check, if Ok, can be set to resolved.

(0009894)
Jens Grabowski
01-12-2010 13:20

OK, resolved, assigned to Ina for implementation

(0009961)
Ina Schieferdecker
14-12-2010 12:08

Implemented as proposed.