Work

pyZtrategic: A Zipper-Based Embedding of Strategies and Attribute Grammars in Python

Year: 2024
Type: conference-paper
Abstract: This paper presents pyZtrategic: a library that embeds strategic term rewriting and attribute grammars in the Python programming language. Strategic term rewriting and attribute grammars are two powerful programming techniques widely used in language engineering: The former relies on strategies to apply term rewrite rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. Thus, pyZtrategic offers Python programmers recursion schemes (strategies) which apply term rewrite rules in defining large scale language transformations. It also offers attribute grammars to express context-dependent language processing algorithms. PyZtrategic offers the best of those two worlds, thus providing powerful abstractions to express software maintenance and evolution tasks. Moreover, we developed several language engineering problems in pyZtrategic, and we compare it to well established strategic programming and attribute grammar systems. Our preliminary results show that our library offers similar expressiveness as such systems, but, unfortunately, it does suffer from the current poor runtime performance of the Python language.
Authors: Emanuel Rodrigues, José Macedo, Marcos Viera, João Saraiva
Language: English
Subfield: Software
Open Access status: hybrid
OpenAlex ID: W4396554348
FWCI: 0.812
Cites: 28
Cited by: 5
Related to: 10