ConstraintsConstraints are directives that influence the behavior of the Specman test generator. They are declared within a struct and influence the generation of values for data items within the struct and its subtree.
1. Hard Constraints
2. Soft Constraints
For constraints that might need to be overridden, we use soft constraints. Soft constraints are obeyed if not contradicted by hard constraints. The last loaded soft constraint prevails if there is a contradiction with other soft constraints. Soft constraints are used to define the default range of values of fields. Soft constraints are used to set initial settings for tests.