Logical Representations of Grammatical Systems