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

ID | Project | Category | View Status | Date Submitted | Last Update
0002753 | Part 01: TTCN-3 Core Language | Clarification | public | 23-01-2008 08:45 | 24-04-2008 12:01

Reporter | Thomas DeiÃŸ |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v3.2.1 (published 2007-02) |
Target Version | v3.4.1 (published 2008-09) | Fixed in Version | v3.4.1 (published 2008-09) |
Clause Reference(s) | part 1, clause 12; part 4 clause 9.40
Source (company - Author) | Thomas DeiÃŸ, Nokia Siemens Networks

Summary | 0002753: Clarification on timer lifetime

Description

It is unclear whether a timer declared and started in a scope unit such as e.g. a function does still exist after the function is left.
Clause 12 contains a note stating: "Visibility of timer names follow the scoping rules given in clause 5. For example, the name of a timer defined locally in a function can be seen within that function only, though the timer is started on the component instance; on returning from that function the specific timer cannot be stopped directly, but only indirectly by an all timer.stop statement. Also, its timeout cannot be checked directly, but only indirectly by an any timer.timeout statement."
This means that after executing the function f() as defined below
function f() {
timer t := 5.0;
t.start;
return
}
the timer t would still be running and might cause a timeout in the statement
any timer.timeout;
So, even if the scope unit in which the timer was declared has ceased to exist, the timer would still exist and might contribute to the test case.
The note exists in both 3.2.1 and 3.3.x.
On the other hand, if one is reading part 4, i.e. the operational semantics, this mentions quite explicitly that entering a new scope unit and declaring a timer in this scope unit means to create a new 'timer-binding' on a stack of timer-bindings. Leaving the scope unit means to destroy also this timer-binding, meaning that the timer ceases to exist. This is mentioned several times, e.g. in the definition of the semantics of the return statement (clause 9.40 of part4).
This means that there is a contradiction between parts 1 and 4.
Proposed solution: remove the note completely or change it to:
"Timers declared and started in scope units such as functions cease to exist when the scope unit is left. They do not contribute to the behaviour once the scope unit is left."

Steps To Reproduce |
Additional Information | Originally, the issue has been found by Wolfgang Seka.
Tags | No tags attached.
Relationships |
Attached Files | CR-2753-Clarification-on-timer-lifetime.doc (124,928) 23-04-2008 15:51 http://oldforge.etsi.org/mantis/file_download.php?file_id=1441&type=bug

Issue History
Date Modified | Username | Field | Change
23-01-2008 08:45 | Thomas DeiÃŸ | New Issue |
23-01-2008 08:45 | Thomas DeiÃŸ | Status | new => assigned
23-01-2008 08:45 | Thomas DeiÃŸ | Assigned To | => Ina Schieferdecker
23-01-2008 08:45 | Thomas DeiÃŸ | Clause Reference(s) | => part 1, clause 12; part 4 clause 9.40
23-01-2008 08:45 | Thomas DeiÃŸ | Source (company - Author) | => Thomas DeiÃŸ, Nokia Siemens Networks
12-03-2008 13:59 | Ina Schieferdecker | Note Added: 0005207 |
23-04-2008 11:20 | Ina Schieferdecker | Target Version | => Edition 3.4.1 (not yet published)
23-04-2008 15:43 | Jens Grabowski | Assigned To | Ina Schieferdecker => Jens Grabowski
23-04-2008 15:51 | Jens Grabowski | File Added: CR-2753-Clarification-on-timer-lifetime.doc |
23-04-2008 15:52 | Jens Grabowski | Note Added: 0005522 |
23-04-2008 15:52 | Jens Grabowski | Assigned To | Jens Grabowski => Thomas DeiÃŸ
23-04-2008 16:12 | Thomas DeiÃŸ | Note Added: 0005528 |
23-04-2008 16:12 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
23-04-2008 16:12 | Thomas DeiÃŸ | Status | assigned => resolved
23-04-2008 16:12 | Thomas DeiÃŸ | Resolution | open => fixed
24-04-2008 12:01 | Ina Schieferdecker | Status | resolved => closed
24-04-2008 12:01 | Ina Schieferdecker | Fixed in Version | => Edition 3.4.1 (not yet published)

Notes

(0005207)
Ina Schieferdecker
12-03-2008 13:59

This note made it into v3.2.1 as result of reviewing the draft by ETSI members. We have not been careful when accepting the change: it is in conflict with the current part 4 semantics and with clause 23.1 in part 1. It relates to CR 2151.

(0005522)
Jens Grabowski
23-04-2008 15:52

The attached file implements the proposal of the CR.

(0005528)
Thomas DeiÃŸ
23-04-2008 16:12

STF 349, Thomas. Proposal checked: ok.