Zipper-based embedding of strategic attribute grammars

dc.contributor.authorMacedo, José Nunopor
dc.contributor.authorRodrigues, Emanuelpor
dc.contributor.authorViera, Marcospor
dc.contributor.authorSaraiva, Joãopor
dc.date.accessioned2025-05-22T06:50:07Z
dc.date.available2025-05-22T06:50:07Z
dc.date.issued2024
dc.description.abstractStrategic 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.sponsorshipFCT -Fundação para a Ciência e a Tecnologia(2021.08184)por
dc.distributioninternationalpor
dc.identifier.doi10.1016/j.jss.2024.111975por
dc.identifier.eissn1873-1228
dc.identifier.issn0164-1212
dc.identifier.urihttps://hdl.handle.net/1822/95650
dc.language.isoengpor
dc.peerreviewedyespor
dc.publisherElsevierpor
dc.relationLA/P/0063/2020por
dc.relation2021.08184.BDpor
dc.relation.publisherversionhttps://www.sciencedirect.com/science/article/pii/S0164121224000189?via%3Dihubpor
dc.rightsopenAccesspor
dc.subjectStrategic programmingpor
dc.subjectAttribute grammarspor
dc.subjectFunctional zipperspor
dc.titleZipper-based embedding of strategic attribute grammarspor
dc.typearticlepor
dspace.entity.typePublicationen
oaire.citationVolume211por
sdum.journalThe Journal of Systems and Softwarepor

Ficheiros

Pacote original

A mostrar 1 - 1 de 1
A carregar...
Nome:
1-s2.0-S0164121224000189-main.pdf
Tamanho:
1.7 MB
Formato:
Adobe Portable Document Format
Descrição: