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

ID | Project | Category | View Status | Date Submitted | Last Update
0006511 | Part 01: TTCN-3 Core Language | Technical | public | 02-04-2013 16:07 | 28-08-2013 12:43

Reporter | Tomas Urban |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.6.1 (published 2014-06) | Fixed in Version | v4.6.1 (published 2014-06) |
Clause Reference(s) | 16.1.4
Source (company - Author) | Elvior

Summary | 0006511: One more "special place" for function call

Description

Although the chapter 16.1.4 covers most situations that can lead to a change in the snapshot state, one thing was left unnoticed. In particular, port, component and timer references used in blocking operations might contain an array index with a function call (e.g t[f()].timeout, p[f()].receive, ptc[f()].done). According to the current rules, this kind of function call is not restricted by the rules described in 16.1.4.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0006423 | closed | Ina Schieferdecker | Restriction on communication operations in functions
related to | 0006422 | closed | Ina Schieferdecker | Restrictions on operations invoked from special places

Attached Files | CR6511.docx (202,501) 10-07-2013 15:30 http://oldforge.etsi.org/mantis/file_download.php?file_id=2812&type=bug CR6511-v2.docx (202,775) 28-08-2013 12:30 http://oldforge.etsi.org/mantis/file_download.php?file_id=2868&type=bug

Issue History
Date Modified | Username | Field | Change
02-04-2013 16:07 | Tomas Urban | New Issue |
02-04-2013 16:07 | Tomas Urban | Clause Reference(s) | => 16.1.4
02-04-2013 16:07 | Tomas Urban | Source (company - Author) | => Elvior
03-04-2013 09:11 | Tomas Urban | Note Added: 0011377 |
04-04-2013 13:17 | Tomas Urban | Note Added: 0011406 |
05-04-2013 09:44 | Jacob Wieland - Spirent | Note Added: 0011407 |
08-07-2013 14:54 | Jens Grabowski | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
08-07-2013 14:55 | Jens Grabowski | Status | new => assigned
08-07-2013 14:55 | Jens Grabowski | Assigned To | => Jacob Wieland - Spirent
08-07-2013 15:43 | Jens Grabowski | Relationship added | related to 0006423
08-07-2013 15:45 | Jens Grabowski | Relationship added | related to 0006422
08-07-2013 17:11 | Gyorgy Rethy | Target Version | => v4.6.1 (published 2014-06)
09-07-2013 16:23 | Jacob Wieland - Spirent | Note Edited: 0011407 |
10-07-2013 10:09 | Gyorgy Rethy | Note Added: 0011495 |
10-07-2013 15:15 | Jacob Wieland - Spirent | Note Added: 0011505 |
10-07-2013 15:15 | Jacob Wieland - Spirent | File Added: CR6511.docx |
10-07-2013 15:17 | Jacob Wieland - Spirent | File Deleted: CR6511.docx |
10-07-2013 15:17 | Jacob Wieland - Spirent | File Added: CR6511.docx |
10-07-2013 15:28 | Jacob Wieland - Spirent | File Deleted: CR6511.docx |
10-07-2013 15:29 | Jacob Wieland - Spirent | File Added: CR6511.docx |
10-07-2013 15:30 | Jacob Wieland - Spirent | File Deleted: CR6511.docx |
10-07-2013 15:30 | Jacob Wieland - Spirent | File Added: CR6511.docx |
10-07-2013 15:32 | Jacob Wieland - Spirent | Note Added: 0011508 |
10-07-2013 18:18 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
10-07-2013 18:18 | Jacob Wieland - Spirent | Note Added: 0011527 |
11-07-2013 09:06 | Jacob Wieland - Spirent | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
11-07-2013 10:16 | Jacob Wieland - Spirent | Status | assigned => confirmed
11-07-2013 10:50 | Jacob Wieland - Spirent | Status | confirmed => assigned
11-07-2013 10:50 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Ina Schieferdecker
11-07-2013 10:53 | Jacob Wieland - Spirent | Status | assigned => confirmed
26-08-2013 16:07 | Ina Schieferdecker | Note Added: 0011601 |
26-08-2013 16:08 | Ina Schieferdecker | Status | confirmed => assigned
26-08-2013 16:08 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Jacob Wieland - Spirent
26-08-2013 16:33 | Jacob Wieland - Spirent | Note Added: 0011602 |
26-08-2013 16:36 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Ina Schieferdecker
26-08-2013 16:36 | Jacob Wieland - Spirent | Status | assigned => confirmed
28-08-2013 12:30 | Ina Schieferdecker | File Added: CR6511-v2.docx |
28-08-2013 12:42 | Ina Schieferdecker | Status | confirmed => resolved
28-08-2013 12:42 | Ina Schieferdecker | Resolution | open => fixed
28-08-2013 12:42 | Ina Schieferdecker | Fixed in Version | => v4.6.1 (published 2014-06)
28-08-2013 12:43 | Ina Schieferdecker | Status | resolved => closed

Notes

(0011377)
Tomas Urban
03-04-2013 09:11

There's one more place that is not covered by the current rules: in parameters passed to an altstep branch, e.g.:
alt
{
[]altstep1(f());
}
If such a parameter is a result of a function call, the function will be called during snapshot evaluation and if unrestricted, it might cause the feared side effects mentioned in 16.1.4.
Notice that out and inout parameters of the alstep branch cannot lead to any side effects, because their value might change only if an alternative branch is activated inside the altstep, which terminates snapshot evaluation.

(0011406)
Tomas Urban
04-04-2013 13:17

Yet another special place are functions returning an object on which a blocking operation is performed and their parameters, e.g.: alt { []fCompFunc(f()).done {} // both fCompFunc and f shall fullfil condition specified in 16.1.4 }

(0011407)
Jacob Wieland - Spirent
05-04-2013 09:44 (edited on: 09-07-2013 16:23)

To make it short, all parts (sub-expressions) of the guard and the event-part (i.e. those expressions evaluated in a snapshot) should be snapshot-safe.
This should be a further restriction in section 20.2.
Of course, the wording in the "invoking functions from special places" should also be changed so it only refers to the functions called during the evaluation of blocking communication operations.

(0011495)
Gyorgy Rethy
10-07-2013 10:09

STF decision 2013-07-10: - Side effect restrictions shall apply both to the guard and to the receiving event part of alt branches. - Make a generic statement in the text that side effects effecting a snapshot evaluation and objects evaluated in subsequent shapshots shall be avoided. Give also a list of identified cases and a note saying that the list may not be exhaustive.

(0011505)
Jacob Wieland - Spirent
10-07-2013 15:15

Since the term event is described in the semantic description of the alt statement, I think it is safe to add the restriction in a general manner in regard to this. I've also added examples that disallow all cases we have identified until now.

(0011508)
Jacob Wieland - Spirent
10-07-2013 15:32

added proposal

(0011527)
Jacob Wieland - Spirent
10-07-2013 18:18

please check and if okay, also set the related ones to resolved

(0011601)
Ina Schieferdecker
26-08-2013 16:07

Please reconsider the resolution: it forbids to have value returning functions in send and alike.

(0011602)
Jacob Wieland - Spirent
26-08-2013 16:33

What part does forbid this? Can you give an example of a forbidden value-returning function call?