ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0000389Part 01: TTCN-3 Core LanguageTechnicalpublic23-11-2006 14:3712-03-2008 10:24
Stephan Schulz 
Ina Schieferdecker 
normalminorN/A
closedfixed 
 
v3.3.2 (published 2008-04)v3.3.2 (published 2008-04) 
BNF, B1.2.1, B1.2.2
Stephan Tobies, Nokia
0000389: allow templates in valuelist templates
There is a restriction that only constant expressions should be usable in a valuelist template. This is unnecessary and arbitrary templates should be usable.
B.1.2.1 Value list
Value lists specify lists of acceptable incoming values. It can be used on values of all types. A template field that uses a value list matches the corresponding incoming field if, and only if, the incoming field value matches any one of the _templates_ in the value list. Each _template_ in the value list shall be of the type declared for the template field in which this mechanism is used.
EXAMPLE:
    template Mymessage MyTemplate:=
    {
        field1 := (2,4,6), // list of integer values
        field2 := ("String1", "String2", _? length (20) ),_ // list of charstring values templates
        :
        :
    }
B.1.2.2 Complemented value list
The keyword complement denotes a list of _templates_ that _the_ incoming values _shall not match_ (i.e. it is the complement of a value list). It can be used on all values of all types.
Each _template_ in the list shall be of the type declared for the template field in which the complement is used. A template field that uses complement matches the corresponding incoming field if and only if the incoming field does not match any of the _templates_ listed in the value list. The value list may be a single _template_, of course.
EXAMPLE:
    template Mymessage MyTemplate:=
    {
            complement (1,3,5), // list of unacceptable integer values
        :
        field3 not(true) // will match false
        <Sto: what is this?>
        :
    }

B.1.3.3 Permutation
Permutation is an operation for matching that shall be used only on values of record of types. Permutation is denoted by the keyword permutation. Permutation in place of a single element means that any series of elements is acceptable provided it __ matches the _template_ list in the permutation, though possibly in a different order. If both permutation and AnyElementsOrNone are used inside a value, the AnyElementsOrNone shall be evaluated first. Each element listed in the permutation shall be of the type declared inside the record of type.
EXAMPLE:
    type record of integer MySequenceOfType;

    template MySequenceOfType MyTemplate1 := { permutation ( 1, 2, 3 ), 5 };
    // any sequence of 4 integers that matches 1,2,3,5; 1,3,2,5; 2,1,3,5; 2,3,1,5; 3,1,2,5; or 3,2,1,5


120. Complement ::= ComplementKeyword _ValueOrAttribList_
xxx. PermutationMatch ::= PermutationKeyword _ValueOrAttribList_
No tags attached.
doc CR_389.doc (440,320) 19-10-2007 13:35
http://oldforge.etsi.org/mantis/file_download.php?file_id=1064&type=bug
Issue History
23-11-2006 14:37Stephan SchulzNew Issue
23-11-2006 14:37Stephan SchulzClause Reference(s) => BNF, B1.2.1, B1.2.2
23-11-2006 14:37Stephan SchulzSource (company - Author) => Stephan Tobies, Nokia
24-11-2006 15:04Stephan SchulzNote Added: 0000333
15-06-2007 19:12Stephan SchulzStatusnew => assigned
15-06-2007 19:12Stephan SchulzAssigned To => Ina Schieferdecker
13-10-2007 19:30Ina SchieferdeckerAssigned ToIna Schieferdecker => developer_u
17-10-2007 12:41user10Assigned Todeveloper_u => Thomas Deiß
18-10-2007 12:11Ina SchieferdeckerTarget Version => Edition 3.3.1 (not yet published)
19-10-2007 13:35Thomas DeißFile Added: CR_389.doc
19-10-2007 13:37Thomas DeißNote Added: 0003706
19-10-2007 13:38Thomas DeißResolutionopen => won't fix
19-10-2007 13:39Thomas DeißNote Added: 0003707
19-10-2007 13:39Thomas DeißResolutionwon't fix => fixed
19-10-2007 13:40Thomas DeißAssigned ToThomas Deiß => Jens Grabowski
04-12-2007 13:41Jens GrabowskiAssigned ToJens Grabowski => Thomas Deiß
04-12-2007 16:40Thomas DeißNote Added: 0004284
04-12-2007 18:07Thomas DeißNote Added: 0004302
04-12-2007 18:07Thomas DeißAssigned ToThomas Deiß => Jens Grabowski
04-12-2007 18:30Thomas DeißNote Added: 0004303
04-12-2007 18:30Thomas DeißAssigned ToJens Grabowski => Ina Schieferdecker
04-12-2007 18:30Thomas DeißStatusassigned => resolved
05-12-2007 17:26Ina SchieferdeckerStatusresolved => closed
05-12-2007 17:26Ina SchieferdeckerFixed in Version => Edition 3.3.1 (not yet published)
12-03-2008 10:22user10Fixed in VersionEdition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published)
12-03-2008 10:24user10Target VersionEdition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published)

Notes
(0000333)
Stephan Schulz   
24-11-2006 15:04   
Using templates in other matching mechanisms should also be considered
(0003706)
Thomas Deiß   
19-10-2007 13:37   
solution proposed

added to text that templates can be used in value list and complemented value lists.

for subset, superset, permutation: these remain lists of values. no templates to be used.
The real problem is the subset, which can be operationalized only if the valuelist is finite.
(0003707)
Thomas Deiß   
19-10-2007 13:39   
previous change of resolution was erroneous.
(0004284)
Thomas Deiß   
04-12-2007 16:40   
lists used superset, subset, and permutation shall not contain templates, because for superset and permutation it has to be checked whether all values denoted by the templates occur within the value to be matched. To check whether all valued occur would require to enumerate all values one by one and check them against. Enumerated the values of a give type is considered as too complicated for the tools, therefore no templates are allowed for superset and permutation.

For subset there would actually not be a problem, but the same limitation as for superset was applied.
(0004302)
Thomas Deiß   
04-12-2007 18:07   
ok now?
(0004303)
Thomas Deiß   
04-12-2007 18:30   
checked by Jens