The Summa Grammatica (Latin for Overview of Grammar; c. AD 1280) or Speculative Grammar (Grammatica Speculativa) was a work by the medieval Modist philosopher John of Dacia.
John calls grammar the "idiom of philosophers" and analyzes the modes using Aristotle's Metaphysics.
References
Summa Grammatica (John of Dacia) Wikipedia(Text) CC BY-SA