by Marcus Gerhold & Vadim Zaytsev & others

WAG Weighted Attribute Grammars


Weighted Attribute Grammars (WAG) are grammars which production rules can have weights or probabilities, while nonterminals can have inherited, synthesised or local attributes. In WAG, weights coexist with attributes, and either can refer to the other.

It is an extension of both weighted grammars as well as attribute grammars, in terms of both notation and expressiveness.

Research on WAG is ongoing and is mostly done in collaboration with Marcus Gerhold.
If you're interested in collaboration, get in touch!


Completed constituent projects (latest leftmost)

reimagined/regenerated WADT 2018 logo
Gerhold & Zaytsev (2026)Reconciling Weighted and Attribute Grammars
scroll emoji
Nick Wolters (2025)Generating Samples for WAG
scroll emoji
Lotte Steenmeijer (2025)WAG for HMI in IoT
Rust logo (CC-BY)
Rafael Dulfer (2024)WAGon: WAG Oriented Notation
C# logo (public domain)
Suzanne van der Veen (2024)NoWa: A CNF Converter for WAG
Pokémon Showdown
Andrei Popa (2023)Gotta adjust them all! DDA of RPG through PCG of NPC
Grammarware
Vadim Zaytsev (2022)Speak Well or Be Still: Solving Conversational AI with WAG
Java Duke logo (BSD)
Berke Güdücü (2022)WASTs for Program Comprehension in Java
scroll emoji
Jan Douwe Beekman (2021)Procedural Location Generation with WAG

Tools and artefacts



The page is maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated: June 2026.
HTML 5 CSS 3