Zipper-based embedding of strategic attribute grammars
| dc.contributor.author | Macedo, José Nuno | por |
| dc.contributor.author | Rodrigues, Emanuel | por |
| dc.contributor.author | Viera, Marcos | por |
| dc.contributor.author | Saraiva, João | por |
| dc.date.accessioned | 2025-05-22T06:50:07Z | |
| dc.date.available | 2025-05-22T06:50:07Z | |
| dc.date.issued | 2024 | |
| dc.description.abstract | Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies to apply term re-write rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques. In addition, we increase the functionalities of strategic programming, enabling the definition of outwards traversals; i.e. outside the starting position. Such elegant embedding has a severe limitation since it recomputes attribute values. This paper presents a proper and efficient embedding of both techniques. First, attribute values are memoized in the zipper data structure, thus avoiding their re-computation. Moreover, strategic zipper based functions are adapted to access such memoized values. We have hosted our memoized zipper-based embedding of strategic attribute grammars both in the Haskell and Python programming languages. Moreover, we benchmarked the libraries supporting both embedding against the state-of-the-art Haskell-based Strafunski and Scala-based Kiama libraries. The first results show that our Haskell Ztrategic library is very competitive against those two well established libraries. | por |
| dc.description.sponsorship | FCT -Fundação para a Ciência e a Tecnologia(2021.08184) | por |
| dc.distribution | international | por |
| dc.identifier.doi | 10.1016/j.jss.2024.111975 | por |
| dc.identifier.eissn | 1873-1228 | |
| dc.identifier.issn | 0164-1212 | |
| dc.identifier.uri | https://hdl.handle.net/1822/95650 | |
| dc.language.iso | eng | por |
| dc.peerreviewed | yes | por |
| dc.publisher | Elsevier | por |
| dc.relation | LA/P/0063/2020 | por |
| dc.relation | 2021.08184.BD | por |
| dc.relation.publisherversion | https://www.sciencedirect.com/science/article/pii/S0164121224000189?via%3Dihub | por |
| dc.rights | openAccess | por |
| dc.subject | Strategic programming | por |
| dc.subject | Attribute grammars | por |
| dc.subject | Functional zippers | por |
| dc.title | Zipper-based embedding of strategic attribute grammars | por |
| dc.type | article | por |
| dspace.entity.type | Publication | en |
| oaire.citationVolume | 211 | por |
| sdum.journal | The Journal of Systems and Software | por |
Ficheiros
Pacote original
1 - 1 de 1
A carregar...
- Nome:
- 1-s2.0-S0164121224000189-main.pdf
- Tamanho:
- 1.7 MB
- Formato:
- Adobe Portable Document Format
- Descrição: