Zipping Strategies and Attribute Grammars
Jos\'e Nuno Macedo, Marcos Viera, Jo\~ao Saraiva

TL;DR
This paper introduces a unified, purely functional approach to embedding strategic term rewriting and attribute grammars using zippers, enabling easier extension, combination, and application to language processing tasks.
Contribution
It presents a novel zipper-based embedding that combines strategic rewriting and attribute grammars in a concise, maintainable, and extensible library for language engineering.
Findings
Successfully optimized Haskell let expressions
Expressed various Haskell refactorings
Solved language processing tasks in LDTA Challenge
Abstract
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 language transformations, while the latter is suitable to express context-dependent language processing algorithms. Each of these techniques, however, is usually implemented by its own powerful and large language processor system. As a result, it makes such systems harder to extend and to combine. In this paper, we present the embedding of both strategic tree rewriting and attribute grammars in a zipper-based, purely functional setting. Zippers provide a simple, but generic tree-walk mechanism that is the building block technique we use to express the purely-functional embedding of both techniques. The embedding of the two techniques in the same setting has several advantages: First, we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Logic, programming, and type systems · Software Testing and Debugging Techniques
