Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006158Part 01: TTCN-3 Core LanguageTechnicalpublic04-07-2012 11:5810-08-2012 11:44
ReporterTomas Urban 
Assigned ToIna Schieferdecker 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionv4.3.2 (interim 2011) 
Target Versionv4.5.1 (published 2013-04)Fixed in Versionv4.5.1 (published 2013-04) 
Summary0006158: Referencing elements of templates: record of terminated with AnyElementsOrNone
DescriptionThe chapter 15.6.3 doesn't contain rules for handling record of and set of templates whose last symbol is AnyElementsOrNone. However, the example section seems to be using rules similar to the rules described in the paragraph b:

type record of integer RoI;
var template RoI t_RoI;
t_RoI := ? length (2..5);
t_RoI[1] := 1;
// after the assignment t_RoI will be {?,1,*} length(2..5);
t_RoI[3] := ?
// after the assignment t_RoI will be {?,1,?,?,*} length(2..5);

According to the current rules, the last assignment should actually produce (using the general rules from 6.2.3) {?, 1, *, -, ?) length(2..5). Nevertheless, I think that the example is logically correct and the following paragraph (or similar) should be added to the chapter 15.6.3:

d) AnyElementsOrNone: when referencing an element of a record of or set of template or field that contains AnyElementsOrNone as the last element, in case the index of the reference is greater or equal to the index of the last element, at the right hand side of an assignment, AnyElementsOrNone shall be returned. If a length attribute is attached to the template, the index of the reference shall not violate the length attribute.
When referencing an element of a record of or set of template or field that contains AnyElementsOrNone as the last element, in case the index of the reference is greater or equal to the index of the last element, at the left hand side of an assignment, the last AnyElementsOrNone shall be replaced with a AnyElement, the value or matching mechanism at the right hand side of the assignment shall be assigned to the referenced element, AnyElement shall be assigned to all elements between the referenced one and the replaced AnyElementsOrNone (if any) and a single AnyElementsOrNone shall be added at the end. A length attribute attached to the template or field shall be left unchanged.
The index shall not violate type restrictions in any of the above cases.

Examples:
type record of integer RoI;
:
var template RoI vt_RoI;
var template integer vt_I;
vt_RoI := {1, *}
vt_I := vt_RoI[3]; // after the assignment vt_I will be *
vt_RoI[3] := 4; // after the assignment vt_RoI will be { 1, ?, ?, 4, * }
TagsNo tags attached.
Clause Reference(s)15.6.3
Source (company - Author)     
Attached Filesdoc file icon CR_6158.doc [^] (79,360 bytes) 11-07-2012 14:59
docx file icon CR_6158_resolution_v2.docx [^] (56,200 bytes) 06-08-2012 18:08
docx file icon CR_6158_resolution_v3.docx [^] (54,711 bytes) 09-08-2012 10:52
docx file icon CR_6158_resolution_v4.docx [^] (53,885 bytes) 09-08-2012 12:18

- Relationships

-  Notes
(0010738)
Gyorgy Rethy (reporter)
10-07-2012 10:46
edited on: 10-07-2012 10:47

STF discussion 2012-07-10:
- index is on the rigth hand side: allow expansion if * is at the end of the referenced lists and return ?. If the * is followed by anything else than a * or ?, should cause an error.
- index is on the left hand side: the same rule as above: * is expanded by ?-s up to the element to be attached, attach the element and add an * at the end of the list.

Check consistency with the existing rules.

(0010837)
Tomas Urban (developer)
11-07-2012 15:01

Draft uploaded. I added several additional rules for situations when a length restriction is involved.
(0010981)
Tomas Urban (developer)
06-08-2012 18:14

I changed the document according to Jens's comments. The most important changes are highlighted for better orientation.
All template names were modified so that they are the same as in already existing examples for the sake of better integrity of the document.
I also updated the section on the * occurrence in the middle of templates to be consistent with discussed modifications.
(0011000)
Tomas Urban (developer)
09-08-2012 10:57

I modified the draft according to Jen's proposals. There are less rules now and no mathematical formulas anymore. The rules for left and right hand side of the assignment are separated now.
(0011001)
Tomas Urban (developer)
09-08-2012 12:19

Rules for the right hand side simplified + one correction in the example 5
(0011002)
Jens Grabowski (manager)
09-08-2012 13:04

I am OK with the Resolution.
Assigned to Ina for Implementation.
(0011025)
Ina Schieferdecker (reporter)
10-08-2012 11:44

as proposed

- Issue History
Date Modified Username Field Change
04-07-2012 11:58 Tomas Urban New Issue
04-07-2012 11:58 Tomas Urban Clause Reference(s) => 15.6.3
04-07-2012 11:58 Tomas Urban Source (company - Author) =>
10-07-2012 10:46 Gyorgy Rethy Note Added: 0010738
10-07-2012 10:46 Gyorgy Rethy Assigned To => Tomas Urban
10-07-2012 10:46 Gyorgy Rethy Status new => assigned
10-07-2012 10:46 Gyorgy Rethy Target Version => Edition 4.5.1
10-07-2012 10:47 Gyorgy Rethy Note Edited: 0010738
11-07-2012 14:59 Tomas Urban File Added: CR_6158.doc
11-07-2012 14:59 Tomas Urban Assigned To Tomas Urban => Jens Grabowski
11-07-2012 15:01 Tomas Urban Note Added: 0010837
06-08-2012 18:08 Tomas Urban File Added: CR_6158_resolution_v2.docx
06-08-2012 18:14 Tomas Urban Note Added: 0010981
09-08-2012 10:52 Tomas Urban File Added: CR_6158_resolution_v3.docx
09-08-2012 10:57 Tomas Urban Note Added: 0011000
09-08-2012 12:18 Tomas Urban File Added: CR_6158_resolution_v4.docx
09-08-2012 12:19 Tomas Urban Note Added: 0011001
09-08-2012 13:04 Jens Grabowski Note Added: 0011002
09-08-2012 13:04 Jens Grabowski Assigned To Jens Grabowski => Ina Schieferdecker
10-08-2012 11:44 Ina Schieferdecker Note Added: 0011025
10-08-2012 11:44 Ina Schieferdecker Status assigned => closed
10-08-2012 11:44 Ina Schieferdecker Resolution open => fixed
10-08-2012 11:44 Ina Schieferdecker Fixed in Version => Edition 4.5.1


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker