方案卫生准报价

Morten Rhiger
{"title":"方案卫生准报价","authors":"Morten Rhiger","doi":"10.1145/2661103.2661109","DOIUrl":null,"url":null,"abstract":"Quasiquotation in Scheme is nearly ideal for implementing programs that generate other programs. These programs lack only the ability to generate fresh bound identifiers, as required to make such code-manipulating programs hygienic, but any Scheme programmer knows how to provide this ability using gensym. In this tutorial we investigate hygienic quasiquotation in Scheme and in languages influenced by Scheme. Stepping back from implementation issues, we first identify the source of the freshness condition in the semantics of a hygienic quasiquotation facility. We then show how gensym is needed to break a meta-circularity in interpreters and compilers for hygienic quasiquotation. Finally, following our recent work, we present a type system for hygienic quasiquotation that supports evaluation under dynamic λ-abstraction, manipulation of open code, a first-class eval function, and mutable state. This tutorial outlines Scheme programs implementing an interpreter, a compiler, and a macro for hygienic quasiquotation.","PeriodicalId":113092,"journal":{"name":"Scheme and Functional Programming","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"Hygienic quasiquotation in scheme\",\"authors\":\"Morten Rhiger\",\"doi\":\"10.1145/2661103.2661109\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Quasiquotation in Scheme is nearly ideal for implementing programs that generate other programs. These programs lack only the ability to generate fresh bound identifiers, as required to make such code-manipulating programs hygienic, but any Scheme programmer knows how to provide this ability using gensym. In this tutorial we investigate hygienic quasiquotation in Scheme and in languages influenced by Scheme. Stepping back from implementation issues, we first identify the source of the freshness condition in the semantics of a hygienic quasiquotation facility. We then show how gensym is needed to break a meta-circularity in interpreters and compilers for hygienic quasiquotation. Finally, following our recent work, we present a type system for hygienic quasiquotation that supports evaluation under dynamic λ-abstraction, manipulation of open code, a first-class eval function, and mutable state. This tutorial outlines Scheme programs implementing an interpreter, a compiler, and a macro for hygienic quasiquotation.\",\"PeriodicalId\":113092,\"journal\":{\"name\":\"Scheme and Functional Programming\",\"volume\":\"22 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2012-09-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Scheme and Functional Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2661103.2661109\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Scheme and Functional Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2661103.2661109","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

摘要

Scheme中的拟引用对于实现生成其他程序的程序来说几乎是理想的。这些程序只缺乏生成新的绑定标识符的能力,而生成绑定标识符是使此类代码操作程序卫生所必需的,但是任何Scheme程序员都知道如何使用gensym提供这种能力。在本教程中,我们研究Scheme和受Scheme影响的语言中的卫生准引用。从实施问题退一步,我们首先在卫生准报价设施的语义中确定新鲜度条件的来源。然后,我们展示了如何需要gensym来打破解释器和编译器中卫生准引用的元循环。最后,根据我们最近的工作,我们提出了一个卫生的准引用类型系统,它支持动态抽象下的求值、对开放代码的操作、一级eval函数和可变状态。本教程概述了实现解释器、编译器和卫生准引用宏的Scheme程序。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Hygienic quasiquotation in scheme
Quasiquotation in Scheme is nearly ideal for implementing programs that generate other programs. These programs lack only the ability to generate fresh bound identifiers, as required to make such code-manipulating programs hygienic, but any Scheme programmer knows how to provide this ability using gensym. In this tutorial we investigate hygienic quasiquotation in Scheme and in languages influenced by Scheme. Stepping back from implementation issues, we first identify the source of the freshness condition in the semantics of a hygienic quasiquotation facility. We then show how gensym is needed to break a meta-circularity in interpreters and compilers for hygienic quasiquotation. Finally, following our recent work, we present a type system for hygienic quasiquotation that supports evaluation under dynamic λ-abstraction, manipulation of open code, a first-class eval function, and mutable state. This tutorial outlines Scheme programs implementing an interpreter, a compiler, and a macro for hygienic quasiquotation.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信