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

ID | Project | Category | View Status | Date Submitted | Last Update
0003383 | Part 01: TTCN-3 Core Language | Clarification | public | 16-05-2008 10:29 | 09-12-2008 14:33

Reporter | Thomas DeiÃŸ |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v3.3.2 (published 2008-04) |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | 7, 16.1.1, 16.2.1,
Source (company - Author) | Nokia Siemens Networks, Thomas DeiÃŸ

Summary | 0003383: Order of assignments of fields

Description

Part 1 does not define the order of assignments of fields or elements of structured types. Consider the following example:
module assign {
type record t {
integer a,
integer b
}
control {
var t x;
x := {2, 3};
x := { a := 4, b := x.a }
log(x.b);
x := {2, 3};
x := {4, x.a};
log(x.b);
}
}
Part 1 leaves it open in which order the individual fields are processed. I suggest to add a statement to clause 7 that operands in expressions, including fields in structured types are evaluated from left to right.
A similar sentence should be added to the invocation of functions or altsteps: Actual parameters are evaluated from left to right.
Part 4 does not resolve this issue either.

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

Relationships

related to | 0004155 | closed | Ina Schieferdecker | Clarification on the order of assignments

Attached Files

CR3383_OrderOfAssignments.doc (110,592) 27-11-2008 14:29
http://oldforge.etsi.org/mantis/file_download.php?file_id=1817&type=bug
CR3383_OrderOfAssignments_02.doc (114,688) 28-11-2008 08:19
http://oldforge.etsi.org/mantis/file_download.php?file_id=1827&type=bug
CR3383_InoutParameterization.doc (24,576) 28-11-2008 10:57
http://oldforge.etsi.org/mantis/file_download.php?file_id=1834&type=bug

Issue History
Date Modified | Username | Field | Change
16-05-2008 10:29 | Thomas DeiÃŸ | New Issue |
16-05-2008 10:29 | Thomas DeiÃŸ | Status | new => assigned
16-05-2008 10:29 | Thomas DeiÃŸ | Assigned To | => Ina Schieferdecker
16-05-2008 10:29 | Thomas DeiÃŸ | Clause Reference(s) | => 7, 16.1.1, 16.2.1,
16-05-2008 10:29 | Thomas DeiÃŸ | Source (company - Author) | => Nokia Siemens Networks, Thomas DeiÃŸ
17-08-2008 09:34 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
29-08-2008 04:30 | Thomas DeiÃŸ | Note Added: 0006647 |
18-09-2008 04:16 | Thomas DeiÃŸ | Relationship added | related to 0004155
27-11-2008 10:35 | Ina Schieferdecker | File Added: CR3383_OrderOfAssignments.doc |
27-11-2008 10:36 | Ina Schieferdecker | Note Added: 0007468 |
27-11-2008 10:36 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Thomas DeiÃŸ
27-11-2008 10:36 | Ina Schieferdecker | Resolution | open => fixed
27-11-2008 14:28 | Ina Schieferdecker | File Deleted: CR3383_OrderOfAssignments.doc |
27-11-2008 14:29 | Ina Schieferdecker | File Added: CR3383_OrderOfAssignments.doc |
28-11-2008 08:19 | Thomas DeiÃŸ | File Added: CR3383_OrderOfAssignments_02.doc |
28-11-2008 08:20 | Thomas DeiÃŸ | Note Added: 0007491 |
28-11-2008 08:20 | Thomas DeiÃŸ | Assigned To | Thomas DeiÃŸ => Ina Schieferdecker
28-11-2008 10:57 | Ina Schieferdecker | File Added: CR3383_InoutParameterization.doc |
09-12-2008 14:33 | Ina Schieferdecker | Status | assigned => resolved
09-12-2008 14:33 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published)
09-12-2008 14:33 | Ina Schieferdecker | Status | resolved => closed

Notes

(0006647)
Thomas DeiÃŸ
29-08-2008 04:30

It should be further clarified whether expressions on the left hand side of an assignment are evaluated before or after those on the right hand side. Also the precedence of . and [] in comparison to the other operators is unclear.
In the subsequent example it is actually quite unclear, what the result would be.
module evaluation {
function inc(inout integer n) return integer {
n := n + 1
return n
}
control {
var integer i := -1
var integer a[8] := {3, 6, 4, 9, 13, 0, 23, 66}
a[inc(i)] := a[inc(a[inc(i)])] + (a[inc(i)] - a[inc(i)])
// a[0] := a[7] + (a[2] - a[3])
// a is now {3, 7, 4, 9, 13, 0, 23, 66}
// a[0] := 66 + (4 - 9)
// a[0] := 61
}
}

(0007468)
Ina Schieferdecker
27-11-2008 10:36

please check

(0007491)
Thomas DeiÃŸ
28-11-2008 08:20

editorial corrections