Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003383Part 01: TTCN-3 Core LanguageClarificationpublic16-05-2008 10:2909-12-2008 14:33
ReporterThomas Deiß 
Assigned ToIna Schieferdecker 
PrioritynormalSeverityminorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionv3.3.2 (published 2008-04) 
Target Versionv4.1.1 (published 2009-06)Fixed in Versionv4.1.1 (published 2009-06) 
Summary0003383: Order of assignments of fields
DescriptionPart 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.
TagsNo tags attached.
Clause Reference(s)7, 16.1.1, 16.2.1,
Source (company - Author)Nokia Siemens Networks, Thomas Deiß
Attached Filesdoc file icon CR3383_OrderOfAssignments.doc [^] (110,592 bytes) 27-11-2008 14:29
doc file icon CR3383_OrderOfAssignments_02.doc [^] (114,688 bytes) 28-11-2008 08:19
doc file icon CR3383_InoutParameterization.doc [^] (24,576 bytes) 28-11-2008 10:57

- Relationships
related to 0004155closedIna Schieferdecker Clarification on the order of assignments 

-  Notes
(0006647)
Thomas Deiß (reporter)
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 (reporter)
27-11-2008 10:36

please check
(0007491)
Thomas Deiß (reporter)
28-11-2008 08:20

editorial corrections

- 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


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker