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

ID | Project | Category | View Status | Date Submitted | Last Update
0002151 | Part 01: TTCN-3 Core Language | Clarification | public | 15-10-2007 13:40 | 24-04-2008 19:45

Reporter | Gyorgy Rethy |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v3.4.1 (published 2008-09) | Fixed in Version | v3.4.1 (published 2008-09) |
Clause Reference(s) | $23
Source (company - Author) |

Summary | 0002151: Local Timers

Description

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.

Steps To Reproduce |

Additional Information

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.

Tags | No tags attached.
Relationships |

Attached Files

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
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
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
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
Date Modified | Username | Field | Change
15-10-2007 13:40 | Gyorgy Rethy | New Issue |
15-10-2007 13:40 | Gyorgy Rethy | Status | new => assigned
15-10-2007 13:40 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
15-10-2007 13:40 | Gyorgy Rethy | Clause Reference(s) | => $23
15-10-2007 13:40 | Gyorgy Rethy | Source (company - Author) | =>
15-10-2007 19:08 | Ina Schieferdecker | Note Added: 0003633 |
15-10-2007 19:14 | Ina Schieferdecker | Assigned To | Gyorgy Rethy => Jens Grabowski
18-10-2007 13:46 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
18-10-2007 13:59 | Ina Schieferdecker | Target Version | => Edition 3.3.1 (not yet published)
03-12-2007 13:50 | Jens Grabowski | Note Added: 0004230 |
03-12-2007 13:50 | Jens Grabowski | Target Version | Edition 3.3.1 (not yet published) => Edition 4.1.1 (not yet published)
13-03-2008 14:15 | Jens Grabowski | Note Added: 0005225 |
13-03-2008 14:16 | Jens Grabowski | File Added: CR-2151-Local-Timers-part-1-JG-080313.doc |
13-03-2008 18:19 | Ina Schieferdecker | Note Added: 0005228 |
14-03-2008 09:37 | Jens Grabowski | Note Added: 0005231 |
14-03-2008 09:53 | Ina Schieferdecker | Note Added: 0005232 |
21-04-2008 08:50 | Ina Schieferdecker | Target Version | Edition 4.1.1 (not yet published) => Edition 3.4.1 (not yet published)
22-04-2008 17:28 | Gyorgy Rethy | File Added: CR-2151-Local-Timers-part-1-RG-080422.doc |
22-04-2008 17:30 | Gyorgy Rethy | Note Added: 0005504 |
24-04-2008 12:52 | Jens Grabowski | Note Added: 0005550 |
24-04-2008 12:53 | Jens Grabowski | File Added: CR-2151-Local-Timers-part-4-Resolution.doc |
24-04-2008 12:53 | Jens Grabowski | Assigned To | Jens Grabowski => Thomas DeiÃŸ
24-04-2008 14:53 | Thomas DeiÃŸ | Note Added: 0005551 |
24-04-2008 14:54 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Jens Grabowski
24-04-2008 15:01 | Jens Grabowski | Note Added: 0005552 |
24-04-2008 15:02 | Jens Grabowski | File Added: CR-2151-Local-Timers-part-4-Resolution-v2.doc |
24-04-2008 15:04 | Jens Grabowski | Assigned To | Jens Grabowski => Ina Schieferdecker
24-04-2008 15:04 | Jens Grabowski | Status | assigned => resolved
24-04-2008 15:04 | Jens Grabowski | Resolution | open => fixed
24-04-2008 19:45 | Ina Schieferdecker | Status | resolved => closed
24-04-2008 19:45 | Ina Schieferdecker | Fixed 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!