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

ID | Project | Category | View Status | Date Submitted | Last Update
0006737 | Ext Pack: Advanced Matching (ES 203 022) | New Feature | public | 22-04-2014 12:25 | 24-12-2016 13:25

Reporter | Jacob Wieland - Spirent |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v1.1.1 (published 2017-07) | Fixed in Version | v1.1.1 (published 2017-07) |
Clause Reference(s) | 7.1.3
Source (company - Author) | Testing Technologies - Jacob Wieland
TS version |

Summary | 0006737: Allow equality operator also on omit symbol and templates with restriction omit.

Description

At the moment, two fields can be compared and they are equal if both are omit and not equal if one is omit and the other is not.
This definition should be enlarged so that equality can be tested against the explicit omit-symbol (i.e. x.f == omit) and against templates with restriction omit (i.e. x.f == t, where t is an omit-template).
Basically, an omit-template should be treatable always like a field reference.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR6737.docx (125,510) 19-08-2016 14:58 http://oldforge.etsi.org/mantis/file_download.php?file_id=3504&type=bug

Issue History
Date Modified | Username | Field | Change
22-04-2014 12:25 | Jacob Wieland - Spirent | New Issue |
11-05-2014 20:47 | Gyorgy Rethy | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
18-06-2014 09:11 | Gyorgy Rethy | Product Version | => v4.6.1 (published 2014-06)
18-06-2014 09:11 | Gyorgy Rethy | Target Version | => v4.7.1 (published 2015-06)
03-11-2014 14:14 | Gyorgy Rethy | Note Added: 0012378 |
03-11-2014 15:33 | Jacob Wieland - Spirent | Note Added: 0012380 |
06-11-2014 09:19 | Gyorgy Rethy | Target Version | v4.7.1 (published 2015-06) => v4.8.1 (ongoing)
03-08-2015 16:34 | Gyorgy Rethy | Note Added: 0013043 |
03-08-2015 16:34 | Gyorgy Rethy | Assigned To | => Jens Grabowski
03-08-2015 16:34 | Gyorgy Rethy | Status | new => assigned
02-11-2015 15:39 | Jens Grabowski | Note Added: 0013446 |
02-11-2015 15:40 | Jens Grabowski | Assigned To | Jens Grabowski => Gyorgy Rethy
03-11-2015 08:03 | Gyorgy Rethy | Target Version | v4.8.1 (ongoing) => Next version (to be defined)
05-11-2015 11:02 | Gyorgy Rethy | Project | Part 01: TTCN-3 Core Language => Ext Pack: Advanced Matching (ES 203 022)
05-11-2015 11:07 | Gyorgy Rethy | Product Version | v4.6.1 (published 2014-06) =>
05-11-2015 11:07 | Gyorgy Rethy | Target Version | Next version (to be defined) => v1.1.1 (published 2017-07)
18-07-2016 11:24 | Jens Grabowski | Assigned To | Gyorgy Rethy => Jens Grabowski
15-08-2016 13:18 | Jens Grabowski | Assigned To | Jens Grabowski => KristÃ³f Szabados
19-08-2016 09:32 | Jens Grabowski | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
19-08-2016 14:58 | Jacob Wieland - Spirent | File Added: CR6737.docx |
19-08-2016 14:59 | Jacob Wieland - Spirent | Note Added: 0014184 |
19-08-2016 14:59 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
19-08-2016 14:59 | Jacob Wieland - Spirent | Status | assigned => confirmed
17-11-2016 12:38 | Jens Grabowski | Status | confirmed => resolved
17-11-2016 12:38 | Jens Grabowski | Resolution | open => fixed
24-12-2016 13:25 | Jens Grabowski | Status | resolved => closed
24-12-2016 13:25 | Jens Grabowski | Fixed in Version | => v1.1.1 (published 2017-07)

Notes

(0012378)
Gyorgy Rethy
03-11-2014 14:14

For values:
if (isbound(x.f) and ispresent(x.f)) { /* do something */ }
and
if (isbound(x.f) {
if (x.f==omit) { /* do something */ }
}
would give the same result; isbound shall be used in both cases anyway, if there is a possibility that x.f may be uninitialized and may be skipped otherwise. In the above case the the whole contsruct for the x.f==omit syntax is more complicated and it could strengthen the frequent misunderstanding that omit is a value (what omit is *not*).
For templates we are introducing a more generic matching checking mechanism, while this syntax would relate to the particular omit case only (but, what it should return for ispresent?)
So, I think, this would be just a syntactical sugar of limited usability, and hence I don't support it.

(0012380)
Jacob Wieland - Spirent
03-11-2014 15:33

what about template parameters which may be omit? fields are not the only things you want to check for omit and using the istemplatekind function for this seems heavy-handed to me.
Basically, at the moment I would use a workaround by defining record with an optional field and declaring a constant where that field is omit and then use that field for comparison.
If such a workaround is available, why not allow it directly, I wonder. It might be of "limited usability" but for those who like the usability, it would be much nicer than such nasty workarounds. I don't see the harm in the feature, either.

(0013043)
Gyorgy Rethy
03-08-2015 16:34

STF discussion 03-08-2015: Discussion tends to if for the specific case when a value field is matched to omit (literal, template(omit)), should this be shorthanded by using the "==". I.e. match(x.f,omit) -> x.f==omit?

(0013446)
Jens Grabowski
02-11-2015 15:39

CR should be resolved next year as part of the new Extension Package on "Advanced matching".

(0014184)
Jacob Wieland - Spirent
19-08-2016 14:59

please review