跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 程序设计语言

arXiv:1007.2885 (cs)
[提交于 2010年7月16日 (v1),最后修订于 2011年4月12日 (此版本, v2)]

标题:Multi-Level Languages are Generalized Arrows

作者:Adam Megacz
查看论文《Multi-Level Languages are Generalized Arrows》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Multi-level languages and Arrows both facilitate metaprogramming, the act of writing a program which generates a program. The arr function required of all Arrows turns arbitrary host language expressions into guest language expressions; because of this, Arrows may be used for metaprogramming only when the guest language is a superset of the host language. This restriction is also present in multi-level languages which offer unlimited cross-level persistence. <p> This paper introduces generalized arrows and proves that they generalize Arrows in the following sense: every Arrow in a programming language arises from a generalized arrow with that language's term category as its codomain. Generalized arrows impose no containment relationship between the guest language and host language; they facilitate heterogeneous metaprogramming. The category having all generalized arrows as its morphisms and the category having all multi-level languages as its morphisms are isomorphic categories. This is proven formally in Coq, and the proof is offered as justification for the assertion that multi-level languages are generalized arrows. <p> Combined with the existence of a particular kind of retraction in the host language, this proof can be used to define an invertible translation from two-level terms to one-level terms parameterized by a generalized arrow instance. This is ergonomically significant: it lets guest language providers write generalized arrow instances while the users of those guest languages write multi-level terms. This is beneficial because implementing a generalized arrow instance is easier than modifying a compiler, whereas writing two-level terms is easier than manipulating generalized arrow terms.
评论: 12 pages
主题: 程序设计语言 (cs.PL); 范畴论 (math.CT)
引用方式: arXiv:1007.2885 [cs.PL]
  (或者 arXiv:1007.2885v2 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.1007.2885

提交历史

来自:Adam Megacz
[v1] 2010年7月16日 星期五 22:42:04 UTC
[v2] 2011年4月12日 星期二 02:24:13 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

math
< 上一篇   |   下一篇 >
最新 | 近期 | 2011-04
切换浏览方式为:
cs
cs.PL
math.CT

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站