1. A method for generating test vectors in cyber-physical systems, comprising: generating traces of a system model combining discrete and continuous state components as a dense-time model stored in memory using a simulation engine by using a computer processor; globally optimizing simulated inputs using a fitness objective computed using the computer processor, the simulation inputs being sampled in regions of state-space and being adjusted in accordance with feedback from the traces and fitness objective values by computing a distance between the fitness objective value and a reachability objective; searching for safety violations of systems that include non-linear dynamics using sampling in the state space; globally optimizing by use of a failed distance to compute a fitness value and a “Hit-and-Run” Monte-Carlo based sampling in a hybrid discrete continuous space; wherein globally optimizing includes sampling inputs to minimize the fitness objective value using a failed distance method, wherein globally optimizing further includes receiving feedback from the traces and updated fitness values to compare the fitness values to the reachability objectives such that an input vector set is steered to an improved set of input vectors in accordance with a constraint to limit regions of state space that are sampled; testing a system model or a program by answering reachability questions for the system model or program by searching for safety violations that include non-linear dynamics by sampling in the state-space; and using the processor, outputting test input vectors based upon optimized fitness objective values associated with the simulated inputs to test the system model or program stored in memory.