A genetic algorithm for automatic generation of test logic for digital circuits