Mathematical and computational models of transformational grammar