ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0007910Part 01: TTCN-3 Core LanguageNew Featurepublic13-02-2020 15:2623-11-2021 09:34
Jacob Wieland - Spirent 
Jens Grabowski 
normalminorhave not tried
closedfixed 
4.12.1 (published 2020-05) 
4.13.1 (ongoing)4.13.1 (ongoing) 
8.3, 21.3
Spirent - Jacob Wieland
0007910: Allow parallel control parts/components
Proposal:

Allow creation of components (called maybe parallel control components or PCC) from a control component. The current main control part would run on the MCC (master control component).

Example:

control {
  var ControlComponent pcc1 := ControlComponent.create;
  var ControlComponent pcc2 := ControlComponent.create;
  pcc1.start(f_start_testcase());
  pcc2.start(f_start_mirror_testcase());
  all component.done;
}

function @control f_start_testcase() {
  execute(TC());
}

function @control f_start_mirror_testcase() {
  execute(TC_mirror());
}

Semantics:

Every parallel control part has the same semantics and capabilities as the current control part. Since there are no global variables in TTCN-3, there should be no interference between the testcases, so parallelization should not be an issue.
 
The semantics of 'all component', 'any component' would need to be defined in the control context. It should refer only to the control components.
Stopping and killing of control components should kill the testcase currently running on the component (if any).

Intercomponent communication for synchronization purposes between control components could also be allowed (for instance if information needs to flow between the MCC and the PCCs).

Even system communication could be allowed, e.g. when system resources need to be allocated globally for a parallel testcase run or other upper tester communication.
Use cases:

- running actual testcase and mock/mirror-testcase in parallel
- running testcases in parallel to use system resources (multiple cores etc.) more efficiently and thus being able to produce test results faster

Of course, only those testcases that don't interfere with each other (for instance by trying to use the same system ports) can be parallelized, but that is outside the scope of TTCN-3 (the same problem arises if you start multiple TTCN-3 tools in parallel).
No tags attached.
related to 0007978closed Gyorgy Rethy Ext Pack: Config & Deployment Support (ES 202 781) Dealing with parallel control components 
docx CR7910.docx (262,278) 13-08-2020 14:49
http://oldforge.etsi.org/mantis/file_download.php?file_id=3936&type=bug
Issue History
13-02-2020 15:26Jacob Wieland - SpirentNew Issue
15-03-2020 13:58Kristóf SzabadosNote Added: 0015618
15-03-2020 14:01Kristóf SzabadosNote Added: 0015619
16-03-2020 11:40Jacob Wieland - SpirentNote Added: 0015620
10-08-2020 10:36Jens GrabowskiProjectTTCN-3 Change Requests => Part 01: TTCN-3 Core Language
10-08-2020 10:51Jens GrabowskiAssigned To => Jacob Wieland - Spirent
10-08-2020 10:51Jens GrabowskiStatusnew => assigned
13-08-2020 14:49Jacob Wieland - SpirentFile Added: CR7910.docx
13-08-2020 14:49Jacob Wieland - SpirentNote Added: 0015731
13-08-2020 14:49Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Tomas Urban
13-08-2020 14:49Jacob Wieland - SpirentStatusassigned => confirmed
13-08-2020 15:01Jacob Wieland - SpirentRelationship addedrelated to 0007978
14-08-2020 11:52Tomas UrbanAssigned ToTomas Urban => Jacob Wieland - Spirent
14-08-2020 11:52Tomas UrbanStatusconfirmed => assigned
14-08-2020 11:53Tomas UrbanNote Added: 0015751
09-10-2020 15:13Jacob Wieland - SpirentProjectPart 01: TTCN-3 Core Language => Ext Pack: Config & Deployment Support (ES 202 781)
07-12-2020 14:56Jacob Wieland - SpirentNote Added: 0015801
07-12-2020 14:56Jacob Wieland - SpirentStatusassigned => resolved
07-12-2020 14:56Jacob Wieland - SpirentResolutionopen => fixed
10-12-2020 09:27Jens GrabowskiAssigned ToJacob Wieland - Spirent => Jens Grabowski
10-12-2020 09:27Jens GrabowskiStatusresolved => assigned
10-12-2020 09:27Jens GrabowskiStatusassigned => resolved
17-12-2020 16:11Gyorgy RethyAssigned ToJens Grabowski => Gyorgy Rethy
17-12-2020 16:11Gyorgy RethyStatusresolved => assigned
17-12-2020 16:12Gyorgy RethyStatusassigned => resolved
17-12-2020 16:12Gyorgy RethyDescription Updatedbug_revision_view_page.php?rev_id=535#r535
17-12-2020 16:12Gyorgy RethySteps to Reproduce Updatedbug_revision_view_page.php?rev_id=537#r537
17-12-2020 17:19Gyorgy RethyProjectExt Pack: Config & Deployment Support (ES 202 781) => Part 01: TTCN-3 Core Language
17-12-2020 17:20Gyorgy RethyNote Added: 0015890
17-12-2020 17:20Gyorgy RethyStatusresolved => closed
17-12-2020 17:20Gyorgy RethyProduct Version => 4.12.1 (published 2020-05)
17-12-2020 17:20Gyorgy RethyFixed in Version => 4.13.1 (ongoing)
17-12-2020 17:20Gyorgy RethyTarget Version => 4.13.1 (ongoing)
17-12-2020 17:20Gyorgy RethyDescription Updatedbug_revision_view_page.php?rev_id=538#r538
17-12-2020 17:20Gyorgy RethyNote Edited: 0015890bug_revision_view_page.php?bugnote_id=15890#r540
09-09-2021 09:36Jens GrabowskiAssigned ToGyorgy Rethy => Jens Grabowski
09-09-2021 09:36Jens GrabowskiNote Added: 0015963
09-09-2021 09:36Jens GrabowskiStatusclosed => feedback
09-09-2021 09:36Jens GrabowskiResolutionfixed => reopened
10-09-2021 16:09Jacob Wieland - SpirentNote Added: 0015986
10-09-2021 16:09Jacob Wieland - SpirentStatusfeedback => assigned
10-09-2021 16:09Jacob Wieland - SpirentStatusassigned => resolved
10-09-2021 16:09Jacob Wieland - SpirentResolutionreopened => fixed
23-11-2021 09:34Jens GrabowskiNote Added: 0016090
23-11-2021 09:34Jens GrabowskiStatusresolved => closed

Notes
(0015618)
Kristóf Szabados   
15-03-2020 13:58   
hmmm ... this make quite a big change in the language.
We will need a new way of passing parameters to testcases, which are both in and out at the same time, but not inout as in that case both testcases could modify them at the same time.

We might also need to introduce synchronization into the standard.
It is right now taken as granted, that const and module parameters are read from only one place at one time ... being read in parallel might not be the same (if for example a tool vendor uses lazy initialization).
(0015619)
Kristóf Szabados   
15-03-2020 14:01   
This might also cause some practical issues, when already existing external functions (and other user implemented pieces of functionality) is not consistently updated before the first use.

For example and external function used for acessing some efficient data structure, might no longer be safe to be used from parallel environments.
There is so much already existing code of this kind, that need to think of this situation (most probably such codes will not be updated all at once).
(0015620)
Jacob Wieland - Spirent   
16-03-2020 11:40   
I don't see the parameter passing problems. Parameter passing should work the same way as now with a single control component. Every parallel control component can run at most one execute statement at a time as it is blocking and can pass only its own variables into possible inout/out parameters of the testcase, same as now. Other information flow should be done via ports between the components.

As module parameters are to initialized deterministic, as far as I can remember (same for templates and constants), I also don't see the synchronization issue, though of course, we need to investigate that properly.

To avoid synchronization issues of old external function implementations, a tool vendor could take a sort of sandbox approach where each parallel control component code runs on its own resources (similar to now where you would have to start two different processes if you want to run testcases in parallel).
I would say, though, that this is beyond the scope of the standard and more of a tooling issue (as pretty much everything related to external function implementation is).
(0015731)
Jacob Wieland - Spirent   
13-08-2020 14:49   
added proposal for main part, please review
(0015751)
Tomas Urban   
14-08-2020 11:53   
Please move the feature to the configuration and deployment package.
(0015801)
Jacob Wieland - Spirent   
07-12-2020 14:56   
Is resolved in related issue 7978
(0015890)
Gyorgy Rethy   
17-12-2020 17:20   
Implemented in draft 4.12.3

(0015963)
Jens Grabowski   
09-09-2021 09:36   
CR has been mistakenly implemented in the wrong TTCN-3 part. Further discussion is needed.
(0015986)
Jacob Wieland - Spirent   
10-09-2021 16:09   
I have verified that the changes in the Core Language have been successfully reverted.
(0016090)
Jens Grabowski   
23-11-2021 09:34   
Document successfully reverted. The feature has already been implemented in the configuration and deployment extension