ETSI's Bug Tracker - Ext Pack: Advanced Matching (ES 203 022)
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007821 | Ext Pack: Advanced Matching (ES 203 022) | Clarification | public | 06-12-2018 07:44 | 17-12-2019 10:12

Reporter | Martin Hauch |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | 5.2.1
Source (company - Author) | Devoteam - Martin Hauch
TS version | ?

Summary | 0007821: Clarify semantic of examples (usage of value-lists and value retrieval assignment)

Description

Comments of template mw_t1 definition describes, that variable v is assigned for values 1..3 (previous matching-value AnyValue in the value-list also matches these values).
Comments of template mw_t2 definition describes, that in case of value 3 only v_small is assigend (preference of (1..3))
mw_t2 seems to be clear, as the first matching-value in the value-list is taken and the belonging value retrieval assignment is executed.
But in mw_t1 the first matching-value in the value-list matches, why should further values also be checked? Or should they only be checked if a value retrieval assignment is used?
What about the following example:
type record MyMessage {
integer f1,
integer f2
}
template MyMessage t1(out integer p_f1) :={f1:=? ->p_f1,f2:=10};
template MyMessage t2(out integer p_f2) :={f1:=10,f2:=? ->p_f2};
template MyMessage t3 :={f1:=(1..10),f2:=10};
template MyMessage tVal(out integer p_f1, out integer p_f2):=(t3, t1(p_f1),t2(p_f2));
Which elements of the value-list should be evaluated in case of {f1:=10, f2:=10}?

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

Relationships

related to | 0007820 | closed | Jens Grabowski | Wrong definition of templates in EXAMPLE.

Attached Files | CR7821.docx (125,746) 06-08-2019 08:10 http://oldforge.etsi.org/mantis/file_download.php?file_id=3812&type=bug

Issue History
Date Modified | Username | Field | Change
06-12-2018 07:44 | Martin Hauch | New Issue |
18-12-2018 11:37 | Jens Grabowski | Note Added: 0015285 |
18-12-2018 11:37 | Jens Grabowski | Assigned To | => Jacob Wieland - Spirent
18-12-2018 11:37 | Jens Grabowski | Status | new => assigned
14-01-2019 09:25 | Martin Hauch | Note Added: 0015328 |
22-01-2019 14:21 | Jacob Wieland - Spirent | Note Added: 0015329 |
06-08-2019 08:10 | Jacob Wieland - Spirent | File Added: CR7821.docx |
06-08-2019 08:11 | Jacob Wieland - Spirent | Note Added: 0015356 |
06-08-2019 08:11 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
06-08-2019 08:11 | Jacob Wieland - Spirent | Status | assigned => confirmed
06-08-2019 08:19 | Jacob Wieland - Spirent | Relationship added | related to 0007820
07-08-2019 08:58 | Tomas Urban | Note Added: 0015386 |
07-08-2019 08:58 | Tomas Urban | Status | confirmed => resolved
07-08-2019 08:58 | Tomas Urban | Resolution | open => fixed
07-08-2019 08:58 | Tomas Urban | Assigned To | Tomas Urban => Jens Grabowski
17-12-2019 10:12 | Jens Grabowski | Status | resolved => closed

Notes

(0015285)
Jens Grabowski
18-12-2018 11:37

STF discussion: the example is correct (except missing parameters) and the variables are not assigned while matching. Same is true for the example provided by the reporter. Next TTCN-3 maintenance STF will check if a clarification is needed. (@Martin Hauch: Can you pinpoint the sentences which are unclear in the description?)

(0015328)
Martin Hauch
14-01-2019 09:25

The comments regarding the tempates mw_t1, mw_t2 contradict themselves.
Comment regarding template mw_t1 suggests, that v is assigned in case of value in range (1..3), but first value-list-elemnt '?'
still matches any integer value and so in my opinion variable v should never be assgigned!
Comment regarding template mw_t2 suggests, that v_big is not assigned in case of value 3, but value 3 also matches range (3..5)!
So the comments to these examples contradict themselves, because first example always tries to match second value-list-element, but
second example does not match the 2nd value-list-element (in case of value 3).
(@Jens Grabowski: Which parameters to you mean are missing in the example with templates t1,t2,t3,tVal?)

(0015329)
Jacob Wieland - Spirent
22-01-2019 14:21

There is no contradiction. It is clearly stated that only those templates that contribute to the matching will lead to assignments. And these examples demonstrate exactly that: Since ? always matches in mw_t1, the other alternative never contributes to a successful match and is therefore ignored, together with it's assignment. And since 1..3 already matches 3, v_big is only assigned in case 4..5, but not for 3.
I would accede that the 'if' in the comment of mw_t1 should be replaced with a 'since', though, since it is always true in this example that the first part always matches.

(0015356)
Jacob Wieland - Spirent
06-08-2019 08:11

please review proposal

(0015386)
Tomas Urban
07-08-2019 08:58

Proposed resolution fixes the reported issue and it can be added to the next version of the standard.