ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0002151Part 01: TTCN-3 Core LanguageClarificationpublic15-10-2007 13:4024-04-2008 19:45
Gyorgy Rethy 
Ina Schieferdecker 
normalminorhave not tried
closedfixed 
 
v3.4.1 (published 2008-09)v3.4.1 (published 2008-09) 
$23
     
0002151: Local Timers
According to the TTCN-3 core spec “any timer.timeout” or “all timer.stop” within an activated default behaviour is not to be applied to a local timer. This is not obvious on the first view in the spec and not what a user with TTCN-2 background would expect.
Example:
altstep defaultBehaviour() runs on somePTC {
  [] any timer.timeout {
    all timer.stop;
  }
}

function myFunction() runs on somePTC {
    timer localTimer := 1.0;
    alt {
        [] somePCO.receive(ExpectedMsg)) {}
    }
}
Function myFunction will wait forever when ExpectedMsg is not coming, even when defaultBehaviour is activated.
 localTimer needs to be handled explicitly in myFunction:

function myFunction() runs on somePTC {
    timer localTimer := 1.0;
    alt {
        [] somePCO.receive(ExpectedMsg)) {}
        [] localTimer.timeout {}
    }
}
Note: misinterpretations in this case may lead to unexpected run-time behaviour and probably to compiler incompatibilities which may be hard to find.
One possible solution, of course, would be using component timers for general guarding purposes and for protocol timers. When local timers are used, also a default has to be activated locally by passing the local timer as parameter to the default.

However, existing TTN-2 code may not be written in this style and these restrictions can make conversion a difficult and resource-consuming task. Hence, we shall consider changing the TTCN-3 semantics (in fact the hypothetical model of timer handling). Namely, timer semantics could be similar to semantics of defaults: running and expired timer lists are lists of the component instance; to execute operations on timers individually still requires visibility of the timer’s name at the place of the operation, but any timer… and all timer… operations are executed on all timers on the list, independently where they have been declared. Note, that timers with the same name can be declared and started in a testcase, in different functions and altsteps; hence timer names shall be put on the list prefixed with the name of the entity is has been declared in (similarly to default variables).

There are two options to carry out the changes in the text of the standards (beyond Part-1 also Part-4 may be affected):
- if no tool vendor supports the current semantics, the standard(s) can simply be changed;
- otherwise a new TTCN-3 language string shall be defined for the coming edition of TTCN-3, and an optional language clause shall be allowed for TTCN-3 modules (like module MyModule language "TTCN 3:2007" {…}). When a module is using this language string, the new semantics apply; if it is using an elder language string or not using a language string, the semantics defined today apply.
No tags attached.
doc CR-2151-Local-Timers-part-1-JG-080313.doc (186,368) 13-03-2008 14:16
http://oldforge.etsi.org/mantis/file_download.php?file_id=1377&type=bug
doc CR-2151-Local-Timers-part-1-RG-080422.doc (172,032) 22-04-2008 17:28
http://oldforge.etsi.org/mantis/file_download.php?file_id=1434&type=bug
doc CR-2151-Local-Timers-part-4-Resolution.doc (133,632) 24-04-2008 12:53
http://oldforge.etsi.org/mantis/file_download.php?file_id=1452&type=bug
doc CR-2151-Local-Timers-part-4-Resolution-v2.doc (133,632) 24-04-2008 15:02
http://oldforge.etsi.org/mantis/file_download.php?file_id=1453&type=bug
Issue History
15-10-2007 13:40Gyorgy RethyNew Issue
15-10-2007 13:40Gyorgy RethyStatusnew => assigned
15-10-2007 13:40Gyorgy RethyAssigned To => Gyorgy Rethy
15-10-2007 13:40Gyorgy RethyClause Reference(s) => $23
15-10-2007 13:40Gyorgy RethySource (company - Author) =>
15-10-2007 19:08Ina SchieferdeckerNote Added: 0003633
15-10-2007 19:14Ina SchieferdeckerAssigned ToGyorgy Rethy => Jens Grabowski
18-10-2007 13:46Ina SchieferdeckerProjectTTCN-3 Change Requests => Part 01: TTCN-3 Core Language
18-10-2007 13:59Ina SchieferdeckerTarget Version => Edition 3.3.1 (not yet published)
03-12-2007 13:50Jens GrabowskiNote Added: 0004230
03-12-2007 13:50Jens GrabowskiTarget VersionEdition 3.3.1 (not yet published) => Edition 4.1.1 (not yet published)
13-03-2008 14:15Jens GrabowskiNote Added: 0005225
13-03-2008 14:16Jens GrabowskiFile Added: CR-2151-Local-Timers-part-1-JG-080313.doc
13-03-2008 18:19Ina SchieferdeckerNote Added: 0005228
14-03-2008 09:37Jens GrabowskiNote Added: 0005231
14-03-2008 09:53Ina SchieferdeckerNote Added: 0005232
21-04-2008 08:50Ina SchieferdeckerTarget VersionEdition 4.1.1 (not yet published) => Edition 3.4.1 (not yet published)
22-04-2008 17:28Gyorgy RethyFile Added: CR-2151-Local-Timers-part-1-RG-080422.doc
22-04-2008 17:30Gyorgy RethyNote Added: 0005504
24-04-2008 12:52Jens GrabowskiNote Added: 0005550
24-04-2008 12:53Jens GrabowskiFile Added: CR-2151-Local-Timers-part-4-Resolution.doc
24-04-2008 12:53Jens GrabowskiAssigned ToJens Grabowski => Thomas Deiß
24-04-2008 14:53Thomas DeißNote Added: 0005551
24-04-2008 14:54Thomas DeißAssigned ToThomas Deiß => Jens Grabowski
24-04-2008 15:01Jens GrabowskiNote Added: 0005552
24-04-2008 15:02Jens GrabowskiFile Added: CR-2151-Local-Timers-part-4-Resolution-v2.doc
24-04-2008 15:04Jens GrabowskiAssigned ToJens Grabowski => Ina Schieferdecker
24-04-2008 15:04Jens GrabowskiStatusassigned => resolved
24-04-2008 15:04Jens GrabowskiResolutionopen => fixed
24-04-2008 19:45Ina SchieferdeckerStatusresolved => closed
24-04-2008 19:45Ina SchieferdeckerFixed in Version => Edition 3.4.1 (not yet published)

Notes
(0003633)
Ina Schieferdecker   
15-10-2007 19:08   
The meaning of "local timer" here is a timer local to the enclosing scope - but not local to the default.
(0004230)
Jens Grabowski   
03-12-2007 13:50   
Question to the vendors about their implementation of any/all timer.timeout.
(0005225)
Jens Grabowski   
13-03-2008 14:15   
The attachment is a first draft of changes in part 1 if the CR is accepted.
(0005228)
Ina Schieferdecker   
13-03-2008 18:19   
Awaiting steering committee decision

Check also clause 12
(0005231)
Jens Grabowski   
14-03-2008 09:37   
As part of the resolution of this CR also the lifetime of a timer object has to be clarified:

- Option 1: A timer is destroyed when the scope unit is left.

- Option 2: A timer is destroyed when a component is destroyed.

Option 2 has implications on alive components.
(0005232)
Ina Schieferdecker   
14-03-2008 09:53   
The lifetime of a timer is already questioned in CR 2753 - the CRs should be resolved together
(0005504)
Gyorgy Rethy   
22-04-2008 17:30   
I propose to change just the place of the word "individual" in $23.1 Note2 in the file CR-2151-Local-Timers-part-1-RG-080422.doc
(0005550)
Jens Grabowski   
24-04-2008 12:52   
Attached resolution for part 4 includes the corrected figures that resolve the CR. Text need not to be changed in part 4.
(0005551)
Thomas Deiß   
24-04-2008 14:53   
proposal checked: ok.
editorial: change timerID -> timerId
(0005552)
Jens Grabowski   
24-04-2008 15:01   
Editorial Changes Done!