Section 13.13.1 Random stability
properties
ADD the blue
text.
Random stability
encompasses the following properties:
—
Initialization RNG
Each
module instance, interface instance, program instance, and package has an
initialization RNG. Each initialization RNG is seeded with the default
seed. The default seed is an implementation dependent value. An
initialization RNG shall be used in the creation of static threads and static
initializers (see the following
bullets).
— Thread
stability
Each thread has an
independent RNG for all randomization system calls invoked from that thread.
When a new dynamic thread is created, its RNG
is seeded with the next random value from its parent thread. This property is
called hierarchical seeding. When a static
thread is created, its RNG is seeded with the next value from the initialization
RNG of the module instance, interface instance, program instance or package
containing the thread declaration.
Program and thread
stability is guaranteed as long as thread creation and random number generation
is done in the same order as before. When adding new threads to an existing
test, they can be added at the end of a code block in order to maintain random
number stability of previously created work.
— Object
stability
Each class instance
(object) has an independent RNG for all randomization methods in the class. When
an object is created using new, its RNG is seeded with the next random
value from the thread that creates the object. When a
class object is created by a static declaration initializer, there is no active thread, thus, the RNG of the
created object is seeded with the next random value of the initialization RNG of
the module instance, interface instance, program instance or package in which
the declaration occurred.
Object stability is
guaranteed as long as object and thread creation, as well as random number
generation, are done in the same order as before. In order to maintain random
number stability, new objects, threads and random numbers can be created after
existing objects are created.
— Manual
seeding
All non-initialization RNG’s
can be manually seeded. Combined with hierarchical seeding, this facility allows
users to define the operation of a subsystem (hierarchy subtree) completely with a single seed at the root thread of
the subsystem.