ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0003783Part 01: TTCN-3 Core LanguageTechnicalpublic17-07-2008 10:4309-07-2009 10:43
Gyorgy Rethy 
Ina Schieferdecker 
normalminorhave not tried
closedfixed 
 
v4.2.1 (published 2010-07)v4.2.1 (published 2010-07) 
6.2.1.2, 6.2.2.2
     
0003783: Recursive references of record and set types shall be optional
Recursive references are not specified. such fields shall be optional for records and sets, otherwise no legal value can be written for the type.
Proposed:
Add a sentence to 6.2.1.2 and 6.2.2.2:
Fields containing recursive reference, i.e. referencing to its type, shall be optional.
EXAMPLE 2:<for the record clause only>
    type record MyType
    {
        FieldType1 field1,
        MyType field2 optional,
         :
        FieldTypeN fieldN
    }
No tags attached.
doc CR-3783-Recursive-references-Resolution-V1.doc (150,528) 16-12-2008 12:53
http://oldforge.etsi.org/mantis/file_download.php?file_id=1901&type=bug
doc CR3783_RecursiveReference_RecordSet_v2.doc (143,360) 08-07-2009 10:45
http://oldforge.etsi.org/mantis/file_download.php?file_id=2183&type=bug
doc CR3783_RecursiveReference_RecordSet_v3.doc (144,384) 08-07-2009 11:12
http://oldforge.etsi.org/mantis/file_download.php?file_id=2186&type=bug
doc CR3783_RecursiveReference_RecordSet_v4.doc (146,944) 09-07-2009 10:37
http://oldforge.etsi.org/mantis/file_download.php?file_id=2199&type=bug
Issue History
17-07-2008 10:43Gyorgy RethyNew Issue
17-07-2008 10:43Gyorgy RethyStatusnew => assigned
17-07-2008 10:43Gyorgy RethyAssigned To => Ina Schieferdecker
17-07-2008 10:43Gyorgy RethyClause Reference(s) => 6.2.1.2, 6.2.2.2
17-07-2008 10:43Gyorgy RethySource (company - Author) =>
18-07-2008 11:22Ina SchieferdeckerAssigned ToIna Schieferdecker => Jens Grabowski
17-08-2008 09:14Ina SchieferdeckerTarget Version => Edition 4.1.1 (not yet published)
27-11-2008 12:45Thomas DeißNote Added: 0007469
16-12-2008 12:53Jens GrabowskiFile Added: CR-3783-Recursive-references-Resolution-V1.doc
16-12-2008 12:54Jens GrabowskiAssigned ToJens Grabowski => Thomas Deiß
16-12-2008 12:54Jens GrabowskiStatusassigned => resolved
16-12-2008 14:09Thomas DeißNote Added: 0007717
16-12-2008 14:09Thomas DeißAssigned ToThomas Deiß => Jens Grabowski
16-12-2008 14:09Thomas DeißStatusresolved => assigned
17-12-2008 09:35Ina SchieferdeckerNote Added: 0007728
17-12-2008 09:35Ina SchieferdeckerTarget VersionEdition 4.1.1 (not yet published) => Edition 4.2.1 (not yet published)
20-04-2009 12:01Ina SchieferdeckerAssigned ToJens Grabowski => Tibor Csöndes
08-07-2009 10:45Tibor CsöndesFile Added: CR3783_RecursiveReference_RecordSet_v2.doc
08-07-2009 10:51Tibor CsöndesNote Added: 0008863
08-07-2009 10:51Tibor CsöndesAssigned ToTibor Csöndes => Gyorgy Rethy
08-07-2009 11:12Gyorgy RethyFile Added: CR3783_RecursiveReference_RecordSet_v3.doc
08-07-2009 11:13Gyorgy RethyNote Added: 0008865
08-07-2009 11:13Gyorgy RethyAssigned ToGyorgy Rethy => Ina Schieferdecker
08-07-2009 11:38Tibor CsöndesNote Added: 0008866
09-07-2009 10:36Ina SchieferdeckerNote Added: 0008880
09-07-2009 10:37Ina SchieferdeckerFile Added: CR3783_RecursiveReference_RecordSet_v4.doc
09-07-2009 10:43Ina SchieferdeckerResolutionopen => fixed
09-07-2009 10:43Ina SchieferdeckerStatusassigned => resolved
09-07-2009 10:43Ina SchieferdeckerFixed in Version => Edition 4.2.1 (not yet published)
09-07-2009 10:43Ina SchieferdeckerStatusresolved => closed

Notes
(0007469)
Thomas Deiß   
27-11-2008 12:45   
The recursion might involve several definitions, in this case it remains open which field should be optional.

Also, there is the possibility to break the recursion by using a union type.
Also, for a recursive record of type the recursion could stop with an empty record.

It will become difficult to guarantee that the recursion can be broken via syntactical constraints.
(0007717)
Thomas Deiß   
16-12-2008 14:09   
The text as such is ok for record and set.

For unions it should be stated that there has to be an alternative with a different type.
The unions U1 and U2 should not be allowed
type union U1 {U1 u1}
type union U2 {U2 v1, U2 v2}

Nevertheless, for me it is still open whether we should have such a requirement at all. There are quite a number of recursive type definitions that do not have the restrictions stated, but still allow finite values. And therefore would be valid type definitions. Is it really worth to exclude a few cases that do not allow finite values?
(0007728)
Ina Schieferdecker   
17-12-2008 09:35   
This CR requires more discussion and hence moved to v4.2.1
(0008863)
Tibor Csöndes   
08-07-2009 10:51   
New version uploaded based on the previous comments. In case of record and set types to avoid the infinite recursions the suggestion is the optional field, for union types minimum one filed with different type (no recursion). Examples included for record and union types.
(0008865)
Gyorgy Rethy   
08-07-2009 11:13   
CR3783_RecursiveReference_RecordSet_v3.doc:
OK with me, to be agreed with a wider audience
(0008866)
Tibor Csöndes   
08-07-2009 11:38   
I found a mistype:
// Mistype
type record MyRecord1
    {
        FieldType1 field1,
        MyRecord1 field2 optional, FieldType3 field3
    }
// Correct
type record MyRecord1
    {
        FieldType1 field1,
        MyRecord1 field2 optional,
        FieldType3 field3
    }

Example 6 and 7 should be merged, as it is in Example 5.
(0008880)
Ina Schieferdecker   
09-07-2009 10:36   
as proposed with some editorial changes