ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0006693Part 01: TTCN-3 Core LanguageClarificationpublic26-02-2014 10:1606-01-2015 19:22
Tomas Urban 
Gyorgy Rethy 
normalminorN/A
closedfixed 
v4.5.1 (published 2013-04) 
v4.7.1 (published 2015-06)v4.7.1 (published 2015-06) 
B.1.2.2
Elvior
0006693: Missing rules for omitted values in complement templates
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.
No tags attached.
docx 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
26-02-2014 10:16Tomas UrbanNew Issue
07-04-2014 16:14Gyorgy RethyNote Added: 0011945
07-04-2014 16:14Gyorgy RethyAssigned To => Axel Rennoch
07-04-2014 16:14Gyorgy RethyStatusnew => assigned
08-04-2014 17:02Gyorgy RethyTarget Version => v4.7.1 (published 2015-06)
16-06-2014 11:07Axel RennochNote Added: 0012078
16-06-2014 11:08Axel RennochFile Added: CR6693_update_proposal.docx
16-06-2014 11:11Axel RennochNote Added: 0012079
16-06-2014 11:11Axel RennochStatusassigned => confirmed
16-06-2014 11:12Axel RennochAssigned ToAxel Rennoch => Tomas Urban
16-06-2014 11:12Axel RennochStatusconfirmed => assigned
16-06-2014 11:13Axel RennochNote Added: 0012080
16-06-2014 11:13Axel RennochStatusassigned => confirmed
16-06-2014 11:13Axel RennochNote Deleted: 0012078
16-06-2014 11:19Tomas UrbanNote Added: 0012081
16-06-2014 11:19Tomas UrbanStatusconfirmed => resolved
16-06-2014 11:19Tomas UrbanFixed in Version => v4.7.1 (published 2015-06)
16-06-2014 11:19Tomas UrbanResolutionopen => fixed
16-06-2014 11:19Tomas UrbanAssigned ToTomas Urban => Gyorgy Rethy
20-06-2014 11:50Gyorgy RethyFixed in Versionv4.7.1 (published 2015-06) =>
06-01-2015 19:22Gyorgy RethyNote Added: 0012661
06-01-2015 19:22Gyorgy RethyStatusresolved => closed
06-01-2015 19:22Gyorgy RethyFixed 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