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

ID | Project | Category | View Status | Date Submitted | Last Update
0000389 | Part 01: TTCN-3 Core Language | Technical | public | 23-11-2006 14:37 | 12-03-2008 10:24

Reporter | Stephan Schulz |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v3.3.2 (published 2008-04) | Fixed in Version | v3.3.2 (published 2008-04) |
Clause Reference(s) | BNF, B1.2.1, B1.2.2
Source (company - Author) | Stephan Tobies, Nokia

Summary | 0000389: allow templates in valuelist templates
Description | There is a restriction that only constant expressions should be usable in a valuelist template. This is unnecessary and arbitrary templates should be usable.
Steps To Reproduce |

Additional Information

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_

Tags | No tags attached.
Relationships |
Attached Files | 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
Date Modified | Username | Field | Change
23-11-2006 14:37 | Stephan Schulz | New Issue |
23-11-2006 14:37 | Stephan Schulz | Clause Reference(s) | => BNF, B1.2.1, B1.2.2
23-11-2006 14:37 | Stephan Schulz | Source (company - Author) | => Stephan Tobies, Nokia
24-11-2006 15:04 | Stephan Schulz | Note Added: 0000333 |
15-06-2007 19:12 | Stephan Schulz | Status | new => assigned
15-06-2007 19:12 | Stephan Schulz | Assigned To | => Ina Schieferdecker
13-10-2007 19:30 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => developer_u
17-10-2007 12:41 | user10 | Assigned To | developer_u => Thomas DeiÃŸ
18-10-2007 12:11 | Ina Schieferdecker | Target Version | => Edition 3.3.1 (not yet published)
19-10-2007 13:35 | Thomas DeiÃŸ | File Added: CR_389.doc |
19-10-2007 13:37 | Thomas DeiÃŸ | Note Added: 0003706 |
19-10-2007 13:38 | Thomas DeiÃŸ | Resolution | open => won't fix
19-10-2007 13:39 | Thomas DeiÃŸ | Note Added: 0003707 |
19-10-2007 13:39 | Thomas DeiÃŸ | Resolution | won't fix => fixed
19-10-2007 13:40 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Jens Grabowski
04-12-2007 13:41 | Jens Grabowski | Assigned To | Jens Grabowski => Thomas DeiÃŸ
04-12-2007 16:40 | Thomas DeiÃŸ | Note Added: 0004284 |
04-12-2007 18:07 | Thomas DeiÃŸ | Note Added: 0004302 |
04-12-2007 18:07 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Jens Grabowski
04-12-2007 18:30 | Thomas DeiÃŸ | Note Added: 0004303 |
04-12-2007 18:30 | Thomas DeiÃŸ | Assigned To | Jens Grabowski => Ina Schieferdecker
04-12-2007 18:30 | Thomas DeiÃŸ | Status | assigned => resolved
05-12-2007 17:26 | Ina Schieferdecker | Status | resolved => closed
05-12-2007 17:26 | Ina Schieferdecker | Fixed in Version | => Edition 3.3.1 (not yet published)
12-03-2008 10:22 | user10 | Fixed in Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published)
12-03-2008 10:24 | user10 | Target Version | Edition 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