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

ID | Project | Category | View Status | Date Submitted | Last Update
0006624 | Part 01: TTCN-3 Core Language | New Feature | public | 07-10-2013 12:19 | 06-01-2015 18:28

Reporter | Jacob Wieland - Spirent |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.5.1 (published 2013-04) |
Target Version | v4.7.1 (published 2015-06) | Fixed in Version | v4.7.1 (published 2015-06) |
Clause Reference(s) | Annex C
Source (company - Author) | Testing Technologies - Jacob Wieland

Summary | 0006624: Allow access to random seed per component.

Description

The predefined rnd() function allows generating random numbers to allow non-deterministic test-behavior. However, sometimes, it is desirable to reproduce such behavior later on (if a problem occurred for a specific sequence of random numbers and it needs to be tested whether the problem has been fixed).
For this, it is necessary to have access to the random-seed that is used by the invocation of the rnd() function. By setting the seed at the beginning of a test case to a specific value, the same sequence of numbers shall be generated, given the same input to the test system. If parallel test components (PTCs) are used, an independent seed per test component is necessary to achieve this determinism.
Therefore, we propose to introduce a function setseed(float) which sets the seed of the invoking component to the given value which must be a float number between in the range (0.0 .. 1.0).
Given that function, the sequence
setseed(x); y := rnd();
has the same semantics as
y := rnd(x);
Calling the rnd() function always implicitly updates the seed of the calling test component to the value returned by the rnd() function.
Additionally, a function getseed() return float can be introduced to access the current seed of a component.
To gain the capability of reproducing such random test behavior, the invocation of the setseed() function maybe should lead to a tliSetSeed call on the TCI level.

Steps To Reproduce |
Additional Information | This concept was originally introduced in the draft for the security testing.
Tags | No tags attached.

Relationships

related to | 0006658 | closed | Ina Schieferdecker | Part 05: TTCN-3 Runtime Interface | random number generator should be available to test adaptation
related to | 0006659 | closed | Ina Schieferdecker | Part 06: TTCN-3 Control Interface | Generation of random numbers should be logged for analysis and reproducibility purposes.

Attached Files | CR6624.doc (157,184) 27-11-2013 11:59 http://oldforge.etsi.org/mantis/file_download.php?file_id=2945&type=bug CR6624_resolution_v2.doc (156,672) 17-06-2014 16:12 http://oldforge.etsi.org/mantis/file_download.php?file_id=3039&type=bug

Issue History
Date Modified | Username | Field | Change
07-10-2013 12:19 | Jacob Wieland - Spirent | New Issue |
07-10-2013 12:19 | Jacob Wieland - Spirent | Clause Reference(s) | => Annex C
07-10-2013 12:19 | Jacob Wieland - Spirent | Source (company - Author) | => Testing Technologies - Jacob Wieland
07-10-2013 12:20 | Jacob Wieland - Spirent | Status | new => assigned
07-10-2013 12:20 | Jacob Wieland - Spirent | Assigned To | => Jacob Wieland - Spirent
27-11-2013 11:22 | Jacob Wieland - Spirent | Note Added: 0011843 |
27-11-2013 11:58 | Jacob Wieland - Spirent | Relationship added | related to 0006658
27-11-2013 11:59 | Jacob Wieland - Spirent | Relationship added | related to 0006659
27-11-2013 11:59 | Jacob Wieland - Spirent | File Added: CR6624.doc |
27-11-2013 11:59 | Jacob Wieland - Spirent | Note Added: 0011844 |
27-11-2013 11:59 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
27-11-2013 11:59 | Jacob Wieland - Spirent | Status | assigned => confirmed
17-06-2014 16:02 | Gyorgy Rethy | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
17-06-2014 16:02 | Gyorgy Rethy | Product Version | => v4.5.1 (published 2013-04)
17-06-2014 16:02 | Gyorgy Rethy | Target Version | => v4.7.1 (published 2015-06)
17-06-2014 16:12 | Gyorgy Rethy | Note Added: 0012110 |
17-06-2014 16:12 | Gyorgy Rethy | File Added: CR6624_resolution_v2.doc |
17-06-2014 16:12 | Gyorgy Rethy | Status | confirmed => resolved
17-06-2014 16:12 | Gyorgy Rethy | Fixed in Version | => v4.7.1 (published 2015-06)
17-06-2014 16:12 | Gyorgy Rethy | Resolution | open => fixed
06-01-2015 18:28 | Gyorgy Rethy | Note Added: 0012650 |
06-01-2015 18:28 | Gyorgy Rethy | Status | resolved => closed

Notes

(0011843)
Jacob Wieland - Spirent
27-11-2013 11:22

Upon further consideration, getseed/setseed do not seem to be necessary after all, as long as the seed-per-component requirement is fulfilled. The setseed is basically done by the rnd function.
To be able to use the random number generator inside the test adapter (e.g. by external functions), a function triRnd(TriComponentId componentId, FloatValue seed) should be added to the TRI (TriPARequired?).
Also, a tliRnd log event should be added to the TCI so that the generation of random numbers can be logged and those values later be analyzed (and used for reproducing the test execution).
I will add a proposal for each of these issues.

(0011844)
Jacob Wieland - Spirent
27-11-2013 11:59

please review

(0012110)
Gyorgy Rethy
17-06-2014 16:12

CR6624_resolution_v2.doc It is OK, one editorial change: the second (new) paragraph has been changed to a note. It doesn't contain new requirement (those are already contained in the first paragraph), but explains why has each component and control part its own seeds.

(0012650)
Gyorgy Rethy
06-01-2015 18:28

Added to draft V4.6.3