ETSI's Bug Tracker - Ext Pack: Behaviour Types (ES 202 785)
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007372 | Ext Pack: Behaviour Types (ES 202 785) | New Feature | public | 04-02-2016 10:54 | 16-12-2016 22:26

Reporter | Jacob Wieland - Spirent |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | open |
Platform |  | OS |  | OS Version |
Product Version | v1.4.1 (published 2015-06) |
Target Version | v1.5.1 (published 2017-08) | Fixed in Version | v1.5.1 (published 2017-08) |
Clause Reference(s) | 5, 6
Source (company - Author) | Testing Technologies - Jacob Wieland

Summary | 0007372: types/variables for startable/executable behaviors should be possible

Description

At the moment, it is possible to define behavior types for testcase, altstep and function. However, what is not possible to store a reference (and pass as a parameter) to such an entity paired with an actual parameter list as used by the start and execute operations.
To be more concrete, at the moment, one can write:
c.start(f(p1,...,pn));
What should be possible should be:
var T x := f(p1,...,pn);
...
c.start(x);
where T must be some special behavior type which can be only restricted by runs on, system and mtc clauses.
The first idea that comes into mind would be something like this:
type function F runs on C;
type altstep A runs on C;
Entities of such types are all parameterized function/altstep references (respectively) with a runs-on compatible runs on clause (and mtc/system compatible mtc/system clauses). Such entities can be given to the start operation as parameter if the same requirements are fulfilled, i.e. runs-on compatibility with the type of the component to be started and mtc/system compatibility with the mtc/system context.
Likewise, we would introduce:
type testcase T runs on C system S;
Entities of such types would be all parameterized testcase references with compatible runs on and system clauses. Such entities can be given to the execute operation during control part execution.

Steps To Reproduce |

Additional Information

Use case.
type component C {}
type function Behavior runs on C;
type record of C Components;
type record of Behavior Behaviors;
function handleParallel(Components v_components, Behaviors v_behaviors) {
for (var integer i := 0; i < lengthof(v_components); i := i + 1) {
v_components[i].start(v_behaviors[i]);
}
for (var integer i := 0; i < lengthof(v_components); i := i + 1) {
v_components[i].done;
}
}
Or another way:
type record of record {
C comp,
Behavior behavior
} Startables;
function handle(Startables v_startables) {
for (var integer i := 0; i < lengthof(v_startables); i := i + 1) {
v_startables[i].comp.start(v_startables[i].behavior);
}
for (var integer i := 0; i < lengthof(v_startables); i := i + 1) {
v_startables[i].comp.done;
}
}
Which then can be used in a way like this:
handle({ { c1, behavior1(p1,...,pn) },
{ c2, behavior1(q1,...,qn) },
{ c3, behavior2(...) } });
At the moment, this is only possible by introducing a function for each function which wraps the start statement and then giving the function call of the wrapper-function as lazy parameter to the handle function.

Tags | No tags attached.
Relationships |
Attached Files | CR7372.doc (1,134,592) 19-07-2016 10:39 http://oldforge.etsi.org/mantis/file_download.php?file_id=3416&type=bug CR7372v2.doc (1,142,272) 20-07-2016 11:38 http://oldforge.etsi.org/mantis/file_download.php?file_id=3424&type=bug

Issue History
Date Modified | Username | Field | Change
04-02-2016 10:54 | Jacob Wieland - Spirent | New Issue |
18-07-2016 10:51 | Jens Grabowski | Assigned To | => Jacob Wieland - Spirent
18-07-2016 10:51 | Jens Grabowski | Status | new => assigned
19-07-2016 10:39 | Jacob Wieland - Spirent | File Added: CR7372.doc |
19-07-2016 10:40 | Jacob Wieland - Spirent | Note Added: 0013986 |
19-07-2016 10:40 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
19-07-2016 10:40 | Jacob Wieland - Spirent | Status | assigned => confirmed
19-07-2016 14:17 | Jens Grabowski | Note Added: 0013989 |
19-07-2016 14:18 | Jens Grabowski | Assigned To | Jens Grabowski => Tomas Urban
19-07-2016 14:18 | Jens Grabowski | Status | confirmed => assigned
19-07-2016 14:18 | Jens Grabowski | Status | assigned => confirmed
20-07-2016 09:49 | Tomas Urban | Note Added: 0013997 |
20-07-2016 09:49 | Tomas Urban | Assigned To | Tomas Urban => Jens Grabowski
20-07-2016 10:57 | Jens Grabowski | Note Added: 0014003 |
20-07-2016 10:57 | Jens Grabowski | Assigned To | Jens Grabowski => Jacob Wieland - Spirent
20-07-2016 10:57 | Jens Grabowski | Status | confirmed => assigned
20-07-2016 11:31 | Jacob Wieland - Spirent | File Added: CR7372v2.doc |
20-07-2016 11:32 | Jacob Wieland - Spirent | Note Added: 0014004 |
20-07-2016 11:32 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
20-07-2016 11:32 | Jacob Wieland - Spirent | Status | assigned => confirmed
20-07-2016 11:38 | Jacob Wieland - Spirent | File Deleted: CR7372v2.doc |
20-07-2016 11:38 | Jacob Wieland - Spirent | File Added: CR7372v2.doc |
21-07-2016 08:09 | Tomas Urban | Note Added: 0014016 |
21-07-2016 08:10 | Tomas Urban | Assigned To | Tomas Urban => Jens Grabowski
21-07-2016 08:10 | Tomas Urban | Status | confirmed => resolved
16-12-2016 22:26 | Gyorgy Rethy | Note Added: 0014457 |
16-12-2016 22:26 | Gyorgy Rethy | Assigned To | Jens Grabowski => Gyorgy Rethy
16-12-2016 22:26 | Gyorgy Rethy | Status | resolved => closed
16-12-2016 22:26 | Gyorgy Rethy | Fixed in Version | => v1.5.1 (published 2017-08)
16-12-2016 22:26 | Gyorgy Rethy | Target Version | v1.6.1 (published 2018-05) => v1.5.1 (published 2017-08)

Notes

(0013986)
Jacob Wieland - Spirent
19-07-2016 10:40

please review uploaded proposal

(0013989)
Jens Grabowski
19-07-2016 14:17

Maybe "supended" is better than "deferred". I need a further opinion on this proposal. Tomas, please check.

(0013997)
Tomas Urban
20-07-2016 09:49

I would prefer "deferred", because it is closer to the way how the pointer is actually used. "Suspended" might be understood so that the variable contains a pointer to a single function entity that has already started and then has been paused.
The restrictions on the function instance in 6.2.13.4 are currently empty, but I would add some:
a) For the actual parameters of a function, restrictions from 21.3.2 of the core language specification shall apply
b) For the actual parameters of an alstep, restrictions from 20.5.2 of the core language specification shall apply
c) For the actual parameters of a test case, restriction from 26.1 of the core language specification shall apply
d) Only variables defined in the root of the control block can be used as the actual out and inout parameters of a deferred testcase behaviour value.
I would also like to see a rule saying when exactly the actual in parameters are evaluated. In my opinion, it should be at the time of creation of the deferred behaviour value.

(0014003)
Jens Grabowski
20-07-2016 10:57

Jacob, can you check the comment from Tomas and comment or update the proposal accordingly.

(0014004)
Jacob Wieland - Spirent
20-07-2016 11:32

please review the new version

(0014016)
Tomas Urban
21-07-2016 08:09

No issues found. The proposal can be added to the next version of the advanced parameterization specification.

(0014457)
Gyorgy Rethy
16-12-2016 22:26

Added to draft V1.4.2