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

ID | Project | Category | View Status | Date Submitted | Last Update
0005091 | Part 01: TTCN-3 Core Language | Technical | public | 17-04-2009 14:30 | 09-07-2009 11:08

Reporter | Gyorgy Rethy |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | always
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.2.1 (published 2010-07) | Fixed in Version | v4.2.1 (published 2010-07) |
Clause Reference(s) | 15.5
Source (company - Author) | L.M.Ericsson

Summary | 0005091: How to handle modified template parameters with (no) default value

Description

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.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR5091_resolution v1.doc (211,968) 06-07-2009 17:54 http://oldforge.etsi.org/mantis/file_download.php?file_id=2174&type=bug 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
Date Modified | Username | Field | Change
17-04-2009 14:30 | Gyorgy Rethy | New Issue |
17-04-2009 14:30 | Gyorgy Rethy | Clause Reference(s) | => 15.5
17-04-2009 14:30 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
20-04-2009 11:07 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
20-04-2009 11:07 | Ina Schieferdecker | Assigned To | => Ina Schieferdecker
20-04-2009 11:07 | Ina Schieferdecker | Status | new => assigned
20-04-2009 11:07 | Ina Schieferdecker | Target Version | => Edition 4.2.1 (not yet published)
06-07-2009 13:45 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
06-07-2009 17:54 | Gyorgy Rethy | File Added: CR5091_resolution v1.doc |
06-07-2009 17:55 | Gyorgy Rethy | Note Added: 0008850 |
06-07-2009 17:55 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
07-07-2009 12:16 | Ina Schieferdecker | Note Added: 0008854 |
07-07-2009 12:17 | Ina Schieferdecker | File Added: CR5091_resolution v2.doc |
07-07-2009 12:17 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
08-07-2009 10:30 | Gyorgy Rethy | Note Added: 0008859 |
08-07-2009 10:30 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
08-07-2009 10:30 | Gyorgy Rethy | Status | assigned => resolved
08-07-2009 10:30 | Gyorgy Rethy | Resolution | open => fixed
08-07-2009 10:31 | Gyorgy Rethy | Note Added: 0008860 |
08-07-2009 10:38 | Gyorgy Rethy | Note Added: 0008861 |
09-07-2009 10:45 | Ina Schieferdecker | Note Deleted: 0008859 |
09-07-2009 10:45 | Ina Schieferdecker | Note Deleted: 0008861 |
09-07-2009 11:08 | Ina Schieferdecker | Status | resolved => closed
09-07-2009 11:08 | Ina Schieferdecker | Fixed 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.