GrammarLab: Foundations For a Grammar Laboratory

The shape of chemical compounds is governed by principles of molecular structure which can be understood using valence bond theory. The acquired understanding can be used to manipulate chemical compounds toobtain useful products such as plastics. Similarly, the internal shape of software is governed by the principles of source code structure which can be made insightful by the theory of grammars. This has enabled the creation of useful products such as compilers.


Grammars for programming languages are complex: two grammar rules can generate an exponential number of source code structures.  Programming languages have hundreds of grammar rules. In the context of compiler construction—one language, one grammar, one compiler—this complexity is barely manageable. In the context of IDE construction,refactoring, and reverse engineering it is multiplied by the number of different languages, dialects, versions, embeddings and grammar usecases.


The theory of grammars does not provide insight in this complexity. It fails to provide answers to common engineering questions such as:

  • How to efficiently construct grammars?
  • How to assess the quality of grammars?
  • When an erroneous structure is detected, how to relate this  effect to its grammatical cause?

These common engineering questions imply that grammars are software,thus requiring well-founded engineering principles and practices. The domain and theory of grammarware engineering is underdeveloped. This research contributes to this field by developing the scientific framework and tools for understanding, creating, versioning, analyzing, testing, debugging, visualizing, and maintaining grammars.

Key publications

  • P. Klint, R. Lämmel, C. Verhoef, Toward an Engineering Discipline for GrammarwareTransactions on Software Engineering and Methodology, Vol. 14, No. 3, July 2005, 331-380. bib, pdf, doi.
  • V. Zaytsev, Recovery, Convergence and Documentation of Languages. PhD thesis, Vrije Universiteit, October 2010. bib, pdf.

Members