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 easily combine/zip attribute grammars and strategies, thus providing language engineers the best of the two worlds. Second, the combined embedding is easier to maintain and extend since it is written in a concise and uniform setting. This results in a very small library which is able to express advanced (static) analysis and transformation tasks. We show the expressive power of our library in optimizing |Haskell| let expressions, expressing several |Haskell| refactorings and solving several language processing tasks of the LDTA Tool Challenge.


翻译:战略术语重写和属性语法是语言工程中广泛使用的两种强有力的编程技术。前者依赖在定义语言转换时适用术语重写规则的战略,而后者则适合表达基于背景的语文处理算法。但这两种技术通常都由其本身的强大和大型语言处理系统实施。因此,这些系统更难扩展和合并。在本文件中,我们介绍了将战略树重写和属性语法都嵌入一个基于拉链的纯功能设置。Zippers提供了一个简单但通用的树行机制,这是我们用来表达两种技术纯功能嵌入的建筑块技术。在同一环境中嵌入两种技术有若干优点:首先,我们很容易地将语法和策略组合起来,从而向语言工程师提供两种世界的最佳语言。第二,合并嵌入更容易维护和扩展,因为它以简洁和统一的形式写成。这导致一个非常小的图书馆能够表达先进的(静态)树行走机制,这是我们用来表达两种技术纯功能嵌入的嵌入。在同一个环境中嵌入两种技术具有若干项权限的流程,我们展示了一种最先进的(动的)处理和变压式的版本。我们的方法。我们要的图书馆,我们展示了几种语言的版本。

0
下载
关闭预览

相关内容

《工程》是中国工程院(CAE)于2015年推出的国际开放存取期刊。其目的是提供一个高水平的平台,传播和分享工程研发的前沿进展、当前主要研究成果和关键成果;报告工程科学的进展,讨论工程发展的热点、兴趣领域、挑战和前景,在工程中考虑人与环境的福祉和伦理道德,鼓励具有深远经济和社会意义的工程突破和创新,使之达到国际先进水平,成为新的生产力,从而改变世界,造福人类,创造新的未来。 期刊链接:https://www.sciencedirect.com/journal/engineering
【CVPR2021】多实例主动学习目标检测
专知会员服务
41+阅读 · 2021年4月18日
专知会员服务
123+阅读 · 2020年9月8日
强化学习最新教程,17页pdf
专知会员服务
174+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
计算机 | 入门级EI会议ICVRIS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年6月24日
计算机 | 中低难度国际会议信息8条
Call4Papers
9+阅读 · 2019年6月19日
计算机 | EMNLP 2019等国际会议信息6条
Call4Papers
18+阅读 · 2019年4月26日
学术会议 | 知识图谱顶会 ISWC 征稿:Poster/Demo
开放知识图谱
5+阅读 · 2019年4月16日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
Capsule Networks解析
机器学习研究会
11+阅读 · 2017年11月12日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
【计算机类】期刊专刊/国际会议截稿信息6条
Call4Papers
3+阅读 · 2017年10月13日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
0+阅读 · 2021年12月7日
Arxiv
0+阅读 · 2021年12月6日
Arxiv
4+阅读 · 2019年9月5日
Arxiv
4+阅读 · 2019年1月14日
Arxiv
16+阅读 · 2018年4月2日
VIP会员
相关VIP内容
【CVPR2021】多实例主动学习目标检测
专知会员服务
41+阅读 · 2021年4月18日
专知会员服务
123+阅读 · 2020年9月8日
强化学习最新教程,17页pdf
专知会员服务
174+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
相关资讯
计算机 | 入门级EI会议ICVRIS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年6月24日
计算机 | 中低难度国际会议信息8条
Call4Papers
9+阅读 · 2019年6月19日
计算机 | EMNLP 2019等国际会议信息6条
Call4Papers
18+阅读 · 2019年4月26日
学术会议 | 知识图谱顶会 ISWC 征稿:Poster/Demo
开放知识图谱
5+阅读 · 2019年4月16日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
Capsule Networks解析
机器学习研究会
11+阅读 · 2017年11月12日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
【计算机类】期刊专刊/国际会议截稿信息6条
Call4Papers
3+阅读 · 2017年10月13日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Top
微信扫码咨询专知VIP会员