CASTOR: an expert advisor for testability enhancement of VLSI systems