English

Tahr: The Generative Attribute Grammar Framework

Formal Languages and Automata Theory 2025-12-02 v1

Abstract

In this article, we present Tahr, a framework that allows taking attribute grammar specifications and generating a set of software artefacts that can be used programmatically to operate on text compliant with the grammars. Tahr can be used as an algorithmic workbench to test different manipulations of attribute grammars and support translation between different languages out of the box. We describe the framework's organisation, how the user can specify an attribute grammar, and the generated software artefacts. We also discuss how Tahr deals with ambiguous grammar specifications, and how this ambiguity can be effectively exploited when using attribute grammars for text generation. We test the correctness of Tahr by showing the practical possibility of translating MIPS programs into their corresponding equivalents for x86 architectures and a custom virtual machine.

Keywords

Cite

@article{arxiv.2512.01872,
  title  = {Tahr: The Generative Attribute Grammar Framework},
  author = {Matteo Ciccaglione and Pierciro Caliandro and Alessandro Pellegrini},
  journal= {arXiv preprint arXiv:2512.01872},
  year   = {2025}
}
R2 v1 2026-07-01T08:04:05.696Z