{'fraction_non_alphanumeric': 0.014138817480719794, 'fraction_numerical': 0.0, 'mean_word_length': 5.6581196581196584, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A New Foundation of Attribute Grammars in Traced Symmetric Monoidal Categories

In this paper we propose a new categorical formulation of attribute grammars in traced symmetric monoidal categories. The new formulation, called monoidal attribute grammars, concisely captures the essence of the classical attribute grammars. We study monoidal attribute grammars in two categories: Rel and ωCPPO. It turns out that in Rel monoidal attribute grammars correspond to the graphtheoretic representation of attribute dependencies, while in ωCPPO monoidal attribute grammars are equivalent to Chirica and Martin’s K-systems. We also show that in traced symmetric monoidal closed categories every monoidal attribute grammar is equivalent to the one which does not use inherited attributes.