ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0005091Part 01: TTCN-3 Core LanguageTechnicalpublic17-04-2009 14:3009-07-2009 11:08
Gyorgy Rethy 
Ina Schieferdecker 
normalminoralways
closedfixed 
 
v4.2.1 (published 2010-07)v4.2.1 (published 2010-07) 
15.5
L.M.Ericsson
0005091: How to handle modified template parameters with (no) default value
See the example below:
template MyType x ( integer p1, integer p2 := 20 ) := {
        f1 := p1,
        f2 := p2,
        f3 := omit,
        f4 := 40
}

template MyData y ( integer p1, integer p2 ) modifies x :=
{
        f3 := 30
}

In the modified template y the default value of p2, present in the parent template, is left out. According to the current text this is not forbidden:
$15.5 Restrictions item b):
"1) the derived template shall not omit parameters defined at any of the modification steps between the base template and the actual modified template;"

But this raises the question: is p2 of y mandatory in this case or does it inherit the default value from p2 of x?

Proposal: though there are arguments for both alternatives, it is proposed that default values of formal parameters have effect on the very parameter only it is applied to (i.e. not inherited by modified templates). This is more straighforward both for the users and the tools, prevents error situations and/or exception cases (e.g. different default values applied at the different steps of modification) and more flexible for the users. Whatever is the decision, it shall explicitly be stated in the standard.
No tags attached.
doc CR5091_resolution v1.doc (211,968) 06-07-2009 17:54
http://oldforge.etsi.org/mantis/file_download.php?file_id=2174&type=bug
doc CR5091_resolution v2.doc (215,552) 07-07-2009 12:17
http://oldforge.etsi.org/mantis/file_download.php?file_id=2177&type=bug
Issue History
17-04-2009 14:30Gyorgy RethyNew Issue
17-04-2009 14:30Gyorgy RethyClause Reference(s) => 15.5
17-04-2009 14:30Gyorgy RethySource (company - Author) => L.M.Ericsson
20-04-2009 11:07Ina SchieferdeckerProjectTTCN-3 Change Requests => Part 01: TTCN-3 Core Language
20-04-2009 11:07Ina SchieferdeckerAssigned To => Ina Schieferdecker
20-04-2009 11:07Ina SchieferdeckerStatusnew => assigned
20-04-2009 11:07Ina SchieferdeckerTarget Version => Edition 4.2.1 (not yet published)
06-07-2009 13:45Ina SchieferdeckerAssigned ToIna Schieferdecker => Gyorgy Rethy
06-07-2009 17:54Gyorgy RethyFile Added: CR5091_resolution v1.doc
06-07-2009 17:55Gyorgy RethyNote Added: 0008850
06-07-2009 17:55Gyorgy RethyAssigned ToGyorgy Rethy => Ina Schieferdecker
07-07-2009 12:16Ina SchieferdeckerNote Added: 0008854
07-07-2009 12:17Ina SchieferdeckerFile Added: CR5091_resolution v2.doc
07-07-2009 12:17Ina SchieferdeckerAssigned ToIna Schieferdecker => Gyorgy Rethy
08-07-2009 10:30Gyorgy RethyNote Added: 0008859
08-07-2009 10:30Gyorgy RethyAssigned ToGyorgy Rethy => Ina Schieferdecker
08-07-2009 10:30Gyorgy RethyStatusassigned => resolved
08-07-2009 10:30Gyorgy RethyResolutionopen => fixed
08-07-2009 10:31Gyorgy RethyNote Added: 0008860
08-07-2009 10:38Gyorgy RethyNote Added: 0008861
09-07-2009 10:45Ina SchieferdeckerNote Deleted: 0008859
09-07-2009 10:45Ina SchieferdeckerNote Deleted: 0008861
09-07-2009 11:08Ina SchieferdeckerStatusresolved => closed
09-07-2009 11:08Ina SchieferdeckerFixed in Version => Edition 4.2.1 (not yet published)

Notes
(0008850)
Gyorgy Rethy   
06-07-2009 17:55   
CR5091_resolution v1.doc:
First resolution draft.
(0008854)
Ina Schieferdecker   
07-07-2009 12:16   
made explicit that an error is caused whenever dash is used for a parameter without default

and some editorial changes
(0008860)
Gyorgy Rethy   
08-07-2009 10:31   
Changes in text of CR5091_resolution v2.doc are checked, all OK.