qgrammar: A Certified Grammar Compiler for Chiral Gauge Matter — typed record alphabets, anomaly certificates, repair searches, and UFO back ends
David Elliman · Neuro-Symbolic Ltd · 5 July 2026
Abstract
The engineering close of the grammar trilogy: the certified attribute grammar said what the Standard Model's interaction rules are, the semiring-parsing sequel said how amplitudes evaluate over them, and this paper ships the compiler. The public package qgrammar defines a typed particle record, a finite response alphabet, vertex productions as typed rewrite rules, exact anomaly-cancellation certificates, a small semiring parser, a minimal repair engine for illegal processes, and a scaffold exporter to the Universal FeynRules Output (UFO) model format. The aim is deliberately modest but useful: not to replace MadGraph, Pythia, Geant4, or other mature high-energy-physics tools, but to provide a certified front end that checks whether a proposed particle grammar is a consistent chiral gauge theory before it is handed to those tools. The current release certifies one Standard-Model generation with a right-handed neutrino: sixteen Weyl states, four anomaly sums that are exactly zero, twenty-nine primitive vertex classes, correct photon and Z read typing, left-handed charged-current typing, sterile-neutrino exclusion from neutral reads, diagram skeletons for e⁺e⁻ → μ⁺μ⁻, and structured repair candidates for illegal signals — a sterile photon read, μ → eγ, and anomalous mono-photon plus missing-energy events. Written as a numerate graduate-level bridge between the conceptual grammar papers and a reproducible software tool: the mathematics is the type system, the physics certificate is anomaly freedom, the computational object is a compiler, and the back end is the existing HEP simulation stack.
Keywords
How to cite
Elliman, D. (2026). qgrammar: A Certified Grammar Compiler for Chiral Gauge Matter — typed record alphabets, anomaly certificates, repair searches, and UFO back ends. Neuro-Symbolic Ltd technical report. https://doi.org/10.5281/zenodo.21211017
@techreport{elliman2026qgrammarcompiler,
author = {Elliman, David},
title = {qgrammar: A Certified Grammar Compiler for Chiral Gauge Matter — typed record alphabets, anomaly certificates, repair searches, and UFO back ends},
institution = {Neuro-Symbolic Ltd},
year = {2026},
doi = {10.5281/zenodo.21211017},
url = {https://neusym.ai/papers/qgrammar_compiler}
} The version of record is archived on Zenodo at the DOI above; this page and PDF are the publisher copies at neusym.ai. See the full list of papers for the rest of the programme.