Tahr: The Generative Attribute Grammar Framework

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ciccaglione, Matteo, Caliandro, Pierciro, Pellegrini, Alessandro
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866915647203573760
author Ciccaglione, Matteo
Caliandro, Pierciro
Pellegrini, Alessandro
author_facet Ciccaglione, Matteo
Caliandro, Pierciro
Pellegrini, Alessandro
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2512_01872
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Tahr: The Generative Attribute Grammar Framework
Ciccaglione, Matteo
Caliandro, Pierciro
Pellegrini, Alessandro
Formal Languages and Automata Theory
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.
title Tahr: The Generative Attribute Grammar Framework
topic Formal Languages and Automata Theory
url https://arxiv.org/abs/2512.01872