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

ID | Project | Category | View Status | Date Submitted | Last Update
0006693 | Part 01: TTCN-3 Core Language | Clarification | public | 26-02-2014 10:16 | 06-01-2015 19:22

Reporter | Tomas Urban |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.5.1 (published 2013-04) |
Target Version | v4.7.1 (published 2015-06) | Fixed in Version | v4.7.1 (published 2015-06) |
Clause Reference(s) | B.1.2.2
Source (company - Author) | Elvior

Summary | 0006693: Missing rules for omitted values in complement templates

Description

According to the discussion in http://www.ttcn-3.org/index.php/forum/forum-core-language/2523-complemented-value-list#7836, [^] complement templates cannot match omitted fields.
However, this rule doesn't seem to be formalized anywhere. The rules for complement say that "a template field that uses complement matches the corresponding field if and only if the field does not match any of the
values or templates listed in the template list". There's no restriction saying that the match is related to the "field value", but to the field itself.
Let's demonstrate the issue on an example:
type record R
{
integer field1 optional
}
var R v_var1 := { field1 := omit }
log(match(v_var1.field1, 3)); // logs false
log(match(v_var1.field1, complement(3)));
In my opinion, the last line of the example fulfils the condition that "the field does not match any of the values or templates listed in the template list" as demonstrated on the previous line and should log "true" as a result.
If the intention of the specification is to exclude omitted values from the match, the original rule shall be amended in the following way:
A template field that uses complement matches the corresponding field if and only if the field value is present and does not match any of the
values or templates listed in the template list.
In addition to that, the following restriction shall be added:
d) Matching an omitted field with a complement template will always produce negative match.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR6693_update_proposal.docx (15,432) 16-06-2014 11:08 http://oldforge.etsi.org/mantis/file_download.php?file_id=3029&type=bug

Issue History
Date Modified | Username | Field | Change
26-02-2014 10:16 | Tomas Urban | New Issue |
07-04-2014 16:14 | Gyorgy Rethy | Note Added: 0011945 |
07-04-2014 16:14 | Gyorgy Rethy | Assigned To | => Axel Rennoch
07-04-2014 16:14 | Gyorgy Rethy | Status | new => assigned
08-04-2014 17:02 | Gyorgy Rethy | Target Version | => v4.7.1 (published 2015-06)
16-06-2014 11:07 | Axel Rennoch | Note Added: 0012078 |
16-06-2014 11:08 | Axel Rennoch | File Added: CR6693_update_proposal.docx |
16-06-2014 11:11 | Axel Rennoch | Note Added: 0012079 |
16-06-2014 11:11 | Axel Rennoch | Status | assigned => confirmed
16-06-2014 11:12 | Axel Rennoch | Assigned To | Axel Rennoch => Tomas Urban
16-06-2014 11:12 | Axel Rennoch | Status | confirmed => assigned
16-06-2014 11:13 | Axel Rennoch | Note Added: 0012080 |
16-06-2014 11:13 | Axel Rennoch | Status | assigned => confirmed
16-06-2014 11:13 | Axel Rennoch | Note Deleted: 0012078 |
16-06-2014 11:19 | Tomas Urban | Note Added: 0012081 |
16-06-2014 11:19 | Tomas Urban | Status | confirmed => resolved
16-06-2014 11:19 | Tomas Urban | Fixed in Version | => v4.7.1 (published 2015-06)
16-06-2014 11:19 | Tomas Urban | Resolution | open => fixed
16-06-2014 11:19 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
20-06-2014 11:50 | Gyorgy Rethy | Fixed in Version | v4.7.1 (published 2015-06) =>
06-01-2015 19:22 | Gyorgy Rethy | Note Added: 0012661 |
06-01-2015 19:22 | Gyorgy Rethy | Status | resolved => closed
06-01-2015 19:22 | Gyorgy Rethy | Fixed in Version | => v4.7.1 (published 2015-06)

Notes

(0011945)
Gyorgy Rethy
07-04-2014 16:14

stf478: Check and clarify text as needed.

(0012079)
Axel Rennoch
16-06-2014 11:11

Problem: “complement(…)” should not match “omit”, in case of an absent field (omit), i.e."omit" shall not match the result of a complement calculation
Analysis: According to 15.7.2: complement (…): complement of a list of values or templates; this expectation is not about a missing field, i.e. omit (not any value or “missing field”) could NOT match
Approach: to clarify with an explicit new restiction to B.1.2.2 (see attachment)

(0012080)
Axel Rennoch
16-06-2014 11:13

CR checked and draft resolution attached

(0012081)
Tomas Urban
16-06-2014 11:19

I am fine with the resolution. Gyorgy, please check it too and if you don't have any objections, I think it can be includede to the standard.

(0012661)
Gyorgy Rethy
06-01-2015 19:22

Added to draft V4.6.3