ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0003379Part 01: TTCN-3 Core LanguageClarificationpublic16-05-2008 09:3118-07-2008 10:56
Thomas Deiß 
Ina Schieferdecker 
normalminorN/A
closedfixed 
 
v4.1.1 (published 2009-06)v4.1.1 (published 2009-06) 
clauses 15, 10, 11, 8.2.1
Nokia Siemens Networks, Thomas Deiß
0003379: Cyclic definitions
It is not clear from part1 to which cyclic definitions are erroneous.

For types and functions/altsteps this is explicitly allowed. Whereas for component type extension and template modification it is explicitly forbidden.

For constants, modulepars, variables, and templates in general this is not clear. Consider the following the example:

module CyclicConstants {

//const charstring x := "la" & y; //no finite value
//const charstring y := x;
  
  type record ab {
    integer a,
    integer b
  }

  const ab AB := { a := 1, b := BA.a }; //{1,2}
  const ab BA := { a := 2, b := AB.a }; //{2,1}
}

Obviously, the definition of x and y is incorrect as there is no corresponding finite value. But for AB and BA there are finite values as indicated.

I suggest to add a restriction to the corresponding clauses for constants, modulepars, variables, and templates in general that cyclic definitions are not allowed and that cycles are determined on the level of the used identifiers. In the example above it would be checked whether there is a cycle AB -> BA -> AB.

The restriction could be similar to the one for modified templates:
clause 15.5, restriction a) a) A modified template shall not refer to itself, either directly or indirectly, i.e. recursive derivation is not allowed.
No tags attached.
doc CR-3379-Resolution-JG-080716.doc (160,256) 16-07-2008 12:08
http://oldforge.etsi.org/mantis/file_download.php?file_id=1552&type=bug
doc CR-3379-Resolution-JG-TD-080718.doc (148,480) 18-07-2008 08:40
http://oldforge.etsi.org/mantis/file_download.php?file_id=1555&type=bug
doc CR-3379-Resolution-JG-TD-IS-080719.doc (153,088) 18-07-2008 10:55
http://oldforge.etsi.org/mantis/file_download.php?file_id=1567&type=bug
Issue History
16-05-2008 09:31Thomas DeißNew Issue
16-05-2008 09:31Thomas DeißStatusnew => assigned
16-05-2008 09:31Thomas DeißAssigned To => Thomas Deiß
16-05-2008 09:31Thomas DeißClause Reference(s) => clauses 15, 10, 11, 8.2.1
16-05-2008 09:31Thomas DeißSource (company - Author) => Nokia Siemens Networks, Thomas Deiß
16-05-2008 09:32Thomas DeißProjectTTCN-3 Change Requests => Part 01: TTCN-3 Core Language
16-05-2008 09:33Thomas DeißAssigned ToThomas Deiß => Ina Schieferdecker
20-06-2008 13:46Thomas DeißNote Added: 0006047
14-07-2008 15:23Ina SchieferdeckerAssigned ToIna Schieferdecker => Jens Grabowski
16-07-2008 12:08Jens GrabowskiFile Added: CR-3379-Resolution-JG-080716.doc
16-07-2008 12:09Jens GrabowskiNote Added: 0006295
16-07-2008 12:09Jens GrabowskiAssigned ToJens Grabowski => Thomas Deiß
18-07-2008 08:40Thomas DeißFile Added: CR-3379-Resolution-JG-TD-080718.doc
18-07-2008 08:42Thomas DeißNote Added: 0006318
18-07-2008 08:42Thomas DeißAssigned ToThomas Deiß => Ina Schieferdecker
18-07-2008 08:42Thomas DeißResolutionopen => fixed
18-07-2008 10:55Ina SchieferdeckerFile Added: CR-3379-Resolution-JG-TD-IS-080719.doc
18-07-2008 10:56Ina SchieferdeckerStatusassigned => closed
18-07-2008 10:56Ina SchieferdeckerFixed in Version => Edition 4.1.1 (not yet published)
18-07-2008 10:56Ina SchieferdeckerTarget Version => Edition 4.1.1 (not yet published)

Notes
(0006047)
Thomas Deiß   
20-06-2008 13:46   
Consider also the example, is this allowed or is this not allowed because the declarations can be considered as cyclic?

type integer X (three, four);
  
const X three := 3;
const X four := 4;
(0006295)
Jens Grabowski   
16-07-2008 12:09   
Proposal for Resolution attached.
(0006318)
Thomas Deiß   
18-07-2008 08:42   
CR will be resolved as new clause 5.5. First proposal updated accordingly.
Reference to clause 5 to be added to each restriction.