ETSI's Bug Tracker - Part 04: TTCN-3 Operational Semantics
View Issue Details
0007454Part 04: TTCN-3 Operational SemanticsTechnicalpublic19-07-2016 08:4218-11-2016 10:42
Tomas Urban 
Jens Grabowski 
normalminorhave not tried
closedfixed 
v4.5.1 (published 2016-07) 
v4.6.1(ongoing)v4.6.1(ongoing) 
7.11
STF 514
0007454: Operational semantics for default parameters
CR 0007294 allows to use component variables, templates and constants from the runs on clause in the expressions specifying default values. Section 7.11 of the operational semantics specification has to be changed accordingly. Since it is not always possible to copy the expression specifying the default value any more (e.g. in the execute and ptc.start statements, the component variables are not accessible), it was suggested that the expression shall be evaluated first and the result shall be appended to the actual parameter list. However, the question is if this doesn't exceed the scope of the chapter 7, because it contains steps that are made on textual level and evaluating an expression is a runtime operation.
No tags attached.
related to 0007294closed Gyorgy Rethy Part 01: TTCN-3 Core Language default values/templates of formal parameters should live in the runs-on scope 
docx CR-7454-Resolution-160721.docx (1,963,592) 21-07-2016 08:24
http://oldforge.etsi.org/mantis/file_download.php?file_id=3427&type=bug
Issue History
19-07-2016 08:42Tomas UrbanNew Issue
19-07-2016 08:42Tomas UrbanStatusnew => assigned
19-07-2016 08:42Tomas UrbanAssigned To => Jens Grabowski
19-07-2016 08:44Tomas UrbanRelationship addedrelated to 0007294
20-07-2016 10:52Jens GrabowskiNote Added: 0014001
20-07-2016 10:54Jens GrabowskiNote Added: 0014002
20-07-2016 10:54Jens GrabowskiAssigned ToJens Grabowski => Tomas Urban
20-07-2016 16:45Tomas UrbanNote Added: 0014014
20-07-2016 16:45Tomas UrbanAssigned ToTomas Urban => Jens Grabowski
21-07-2016 08:22Jens GrabowskiNote Added: 0014019
21-07-2016 08:24Jens GrabowskiFile Added: CR-7454-Resolution-160721.docx
21-07-2016 08:24Jens GrabowskiStatusassigned => resolved
21-07-2016 08:24Jens GrabowskiResolutionopen => fixed
17-08-2016 11:52Jacob Wieland - SpirentStatusresolved => feedback
17-08-2016 11:52Jacob Wieland - SpirentResolutionfixed => reopened
17-08-2016 11:52Jacob Wieland - SpirentTarget Versionv4.5.1 (published 2016-07) => v4.6.1(ongoing)
17-08-2016 11:54Jacob Wieland - SpirentStatusfeedback => resolved
17-08-2016 11:54Jacob Wieland - SpirentFixed in Version => v4.6.1(ongoing)
17-08-2016 11:54Jacob Wieland - SpirentResolutionreopened => fixed
18-11-2016 10:42Jens GrabowskiNote Added: 0014332
18-11-2016 10:42Jens GrabowskiStatusresolved => closed

Notes
(0014001)
Jens Grabowski   
20-07-2016 10:52   
Proposes resolution: Change of 7.11 in Operational Semantics to:

7.11 Adding default values of parameters

Formal parameters may have default values. If no actual parameter is provided in a specific invocation, then the default value is added to the actual parameter list. If list notation has been used for the actual parameter list, then the default value is inserted according to the order in the formal parameter list. If assignment notation has been used for the actual parameter list, then the default values are appended to the actual parameters, the order among the default values corresponds to their order in the formal parameter list.

Default values may be provided in form of concrete values or expressions. The evaluation of default values shall follow the same rules as the evaluation of actual parameters, i.e., the rules provided in clause 9.24.
(0014002)
Jens Grabowski   
20-07-2016 10:54   
Tomas, please check if the addition of the last two sentences in 7.11 is sufficient.
(0014014)
Tomas Urban   
20-07-2016 16:45   
I would prefer to have a different kind of replacement, in particular the one Jacob suggested in 0007294:

function f(T x := E) runs on C {
  S1;
  ...
  ;Sn
}

is semantically equivalent to

function f(T x) runs on C {
  if (not isbound(x)) { x := E }
  {
    S1;
    ...
    Sn
  }
}

Please notice the additional statement block which wasn't in Jacob's proposal. It is important, because function body might contain declarations and those are required to be in the block beginning.
(0014019)
Jens Grabowski   
21-07-2016 08:22   
Proposal agreed.
(0014332)
Jens Grabowski   
18-11-2016 10:42   
CR implemented in DRAFT.