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

Emanuel Rodrigues, José Macedo, Marcos Viera, João Saraiva

2024

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.

Download


Paper Citation


in Harvard Style

Rodrigues E., Macedo J., Viera M. and Saraiva J. (2024). pyZtrategic: A Zipper-Based Embedding of Strategies and Attribute Grammars in Python. In Proceedings of the 19th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE; ISBN 978-989-758-696-5, SciTePress, pages 615-624. DOI: 10.5220/0012704000003687


in Bibtex Style

@conference{enase24,
author={Emanuel Rodrigues and José Macedo and Marcos Viera and João Saraiva},
title={pyZtrategic: A Zipper-Based Embedding of Strategies and Attribute Grammars in Python},
booktitle={Proceedings of the 19th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE},
year={2024},
pages={615-624},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0012704000003687},
isbn={978-989-758-696-5},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 19th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE
TI - pyZtrategic: A Zipper-Based Embedding of Strategies and Attribute Grammars in Python
SN - 978-989-758-696-5
AU - Rodrigues E.
AU - Macedo J.
AU - Viera M.
AU - Saraiva J.
PY - 2024
SP - 615
EP - 624
DO - 10.5220/0012704000003687
PB - SciTePress