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

ID | Project | Category | View Status | Date Submitted | Last Update
0007958 | Part 01: TTCN-3 Core Language | Clarification | public | 27-05-2020 07:35 | 16-12-2020 14:46

Reporter | Martin Hauch |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | 4.11.1 (published 2019-05) |
Target Version | 4.13.1 (ongoing) | Fixed in Version | 4.13.1 (ongoing) |
Clause Reference(s) | Core language 4.11.1 chapter 16.2.0
Source (company - Author) | Devoteam (Martin Hauch)

Summary | 0007958: semantic of interleave altsteps

Description

Chapter 16.2.0 General
NOTE 1: As an interleave statement is semantically equivalent with an alt statement...
I do not think that interleave- and alt-semantic are the same!
Example 3:
altstep interleave a_interleaveAltStep(in integer p_myPar1, in integer p_myPar2)
runs on MyComponentType {
var integer v_myLocalVar := f_myFunction(); // local variable
[] pCO1.receive(MyTemplate(p_myPar1, v_myLocalVar)) {}
[] pCO1.receive(MyTemplate(p_myPar2, v_myLocalVar)) {}
}
What does it mean to use the alstep in the following contexts:
var default vMyDefault:=activate(a_interleaveAltStep(5,5);
...
a_interleaveAltStep(3,5);
...
alt {
[] pCO1.receive(MyTemplate(9, 19)) {}
[] a_interleaveAltStep(3,5) {}
[] pCO1.receive(MyTemplate(10, 20)) {}
}
What is the semantic of an interleave altstep in an activate-statement? Does it mean, if default is executed, all branches of the interleave alstep must be executed?
What is the semantic of using interleave altstep by invoking without alt statement?
What is the semantich of using interleave altstep as branch in an alt statement?
Changes the semantic of the interleave altstep a_interleaeAltStep, if it is called in an alt statetment or if it is invoked without an alt statement?

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR_7958.docx (213,821) 11-08-2020 12:20 http://oldforge.etsi.org/mantis/file_download.php?file_id=3910&type=bug CR_7958_v2.docx (213,959) 12-08-2020 17:14 http://oldforge.etsi.org/mantis/file_download.php?file_id=3927&type=bug

Issue History
Date Modified | Username | Field | Change
27-05-2020 07:35 | Martin Hauch | New Issue |
27-05-2020 11:57 | Jacob Wieland - Spirent | Note Added: 0015655 |
27-05-2020 11:59 | Jacob Wieland - Spirent | Note Edited: 0015655 | bug_revision_view_page.php?bugnote_id=15655#r516
10-08-2020 10:29 | Jens Grabowski | Assigned To | => KristÃ³f Szabados
10-08-2020 10:29 | Jens Grabowski | Status | new => assigned
11-08-2020 12:20 | KristÃ³f Szabados | File Added: CR_7958.docx |
11-08-2020 12:21 | KristÃ³f Szabados | Note Added: 0015690 |
11-08-2020 12:21 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
11-08-2020 15:49 | Jacob Wieland - Spirent | Note Added: 0015699 |
11-08-2020 15:50 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => KristÃ³f Szabados
11-08-2020 16:05 | KristÃ³f Szabados | Note Added: 0015702 |
12-08-2020 13:22 | KristÃ³f Szabados | Status | assigned => resolved
12-08-2020 13:22 | KristÃ³f Szabados | Resolution | open => fixed
12-08-2020 13:22 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Gyorgy Rethy
12-08-2020 17:10 | KristÃ³f Szabados | Note Added: 0015714 |
12-08-2020 17:10 | KristÃ³f Szabados | Assigned To | Gyorgy Rethy => KristÃ³f Szabados
12-08-2020 17:10 | KristÃ³f Szabados | Status | resolved => confirmed
12-08-2020 17:14 | KristÃ³f Szabados | File Added: CR_7958_v2.docx |
12-08-2020 17:15 | KristÃ³f Szabados | Note Added: 0015715 |
12-08-2020 17:15 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
12-08-2020 17:15 | KristÃ³f Szabados | Status | confirmed => assigned
13-08-2020 10:13 | Jacob Wieland - Spirent | Status | assigned => resolved
13-08-2020 10:13 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
16-12-2020 14:46 | Gyorgy Rethy | Note Added: 0015862 |
16-12-2020 14:46 | Gyorgy Rethy | Status | resolved => closed
16-12-2020 14:46 | Gyorgy Rethy | Fixed in Version | => 4.13.1 (ongoing)
16-12-2020 14:46 | Gyorgy Rethy | Target Version | => 4.13.1 (ongoing)

Notes

(0015655)
Jacob Wieland - Spirent
27-05-2020 11:57 (edited on: 27-05-2020 11:59)

An interleave statement has an equivalent alt-statement expansion.
In this example, this would be:
altstep a_interleaveAltStep(in integer p_myPar1, in integer p_myPar2)
runs on MyComponentType {
var integer v_myLocalVar := f_myFunction(); // local variable
[] pCO1.receive(MyTemplate(p_myPar1, v_myLocalVar)) {
alt {
[] pCO1.receive(MyTemplate(p_myPar2, v_myLocalVar)) {}
}
}
[] pCO1.receive(MyTemplate(p_myPar2, v_myLocalVar)) {
alt {
[] pCO1.receive(MyTemplate(p_myPar1, v_myLocalVar)) {}
}
}
}
Thus, the same semantics as for this alt-exansion also apply to the unexpanded interleave statement.
Following this:
If activated as a default, if the head of any interleave branch matches, then all branches must be executed. If no branch is entered, the next default (if any) is tried. (The same is true for any nested alt statement).
If used as top-level statement, the same semantic as for a top-level alt-invocation is used. It is wrapped into an alt-statement with a single alternative.
If used as the match-part of an alternative in an alt-statement, the same semantic applies as for the extended alt-statement (i.e. the branches of the extended alt statement replace the single branch with the statement block of the original branch appended to the last statement blocks of the expanded alternatives).

(0015690)
KristÃ³f Szabados
11-08-2020 12:21

I have added an example to show how the interleave altstep could be replaced with a simple altstep, using the expansion rules of interleaves. Please review.

(0015699)
Jacob Wieland - Spirent
11-08-2020 15:49

how is that more helpful than what is already in the standard?

(0015702)
KristÃ³f Szabados
11-08-2020 16:05

During the first meeting we agreed to add an example that shows how "expansion" could be used to interleave altsteps, to make the equivalence more pronounced (with respect of the restrictions also present in the standard).

(0015714)
KristÃ³f Szabados
12-08-2020 17:10

reopening, to add one more clarification.

(0015715)
KristÃ³f Szabados
12-08-2020 17:15

please review.

(0015862)
Gyorgy Rethy
16-12-2020 14:46

Implemented in draft 4.12.2