Document details

pyZtrategic: a zipper-based embedding of strategies and attribute grammars in Python

Author(s): Rodrigues, Emanuel ; Macedo, José Nuno Castro ; Viera, Marcos ; Saraiva, João

Date: 2024

Persistent ID: https://hdl.handle.net/1822/95663

Origin: RepositóriUM - Universidade do Minho

Subject(s): Attribute grammars; Strategic term rewriting; Software analysis and evolution; Evolution; Software Analysis


Description

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.

This work is financed by National Funds through the Portuguese funding agency, FCT – Fundação para a Ciência e a Tecnologia, within project LA/P/0063/2020. DOI 10.54499/LA/P/0063/2020. The second author is also sponsored by FCT grant 2021.08184.BD.

Document Type Conference paper
Language English
Contributor(s) Universidade do Minho
CC Licence
facebook logo  linkedin logo  twitter logo 
mendeley logo

Related documents