Gramatical Inference Using SAT