1. A computer-implemented method for verifying a design, comprising: converting test specifications of the design into a set of constraints defined over variables, such that solutions satisfying the set of constraints define respective valid test cases for verifying the design; defining an objective function over at least some of the variables; repeatedly invoking an optimization process over an input comprising the set of constraints and the objective function, and randomly modifying the input of each invocation so as to cause the optimization process to produce multiple different solutions that satisfy the set of constraints, and wherein the set of constraints given in the input define a space of valid solutions, and wherein invoking the optimization process comprises producing a solution, which is an extremum of the objective function given in the input within the space of valid solutions, and wherein modifying the input comprises modifying the objective function without modifying the set of constraints, so as to cause the optimization process to produce the multiple different solutions located on a boundary of the space of the valid solutions; and generating multiple random test cases for verifying a compliance of the design with the specifications based respectively on the multiple different solutions produced by the optimization process.