Constrained Random Generation
TechniqueConstrained random generation (CRG) is a verification technique that specifies and solves constraints to produce test stimuli, yielding better tests than pure random generation. It is widely used in simulation-based hardware and property-based testing workflows where input values must satisfy predicates and valid values are sparsely distributed.
WIKI
Definition
Constrained random generation (CRG) is a test generation technique that specifies and solves constraints to produce new tests, creating better tests than pure random generation [Evidence: 670134f7-0bde-4ad8-976a-d761d02305b5; cc935418-ba6d-48b1-bd15-e85c190de33b]. In the property-based testing (PBT) literature, the corresponding problem is formalized as: given a predicate on program values, randomly sample from the set of all values satisfying that predicate, and only those values [Source: arxiv 2511.12253v2].