Formal Methods in the Study of Language