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

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

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

arXiv:2005.09028 (cs)
[提交于 2020年5月18日 (v1),最后修订于 2021年7月15日 (此版本, v2)]

标题:Sham: A DSL for Fast DSLs

作者:Rajan Walia, Chung-chieh Shan, Sam Tobin-Hochstadt
查看论文《Sham: A DSL for Fast DSLs》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Domain-specific languages (DSLs) are touted as both easy to embed in programs and easy to optimize. Yet these goals are often in tension. Embedded or internal DSLs fit naturally with a host language, while inheriting the host's performance characteristics. External DSLs can use external optimizers and languages but sit apart from the host. We present Sham, a toolkit designed to enable internal DSLs with high performance. Sham provides a domain-specific language (embedded in Racket) for implementing other high-performance DSLs, with transparent compilation to assembly code at runtime. Sham is well suited as both a compilation target for other embedded DSLs and for transparently replacing DSL support code with faster versions. Sham provides seamless inter-operation with its host language without requiring any additional effort from its users. Sham also provides a framework for defining language syntax which implements Sham's own language interface as well. We validate Sham's design on a series of case studies, ranging from Krishnamurthi's classic automata DSL to a sound synthesis DSL and a probabilistic programming language. All of these are existing DSLs where we replaced the backend using Sham, resulting in major performance gains. We present an example-driven description of how Sham can smoothly enhance an existing DSL into a high-performance one. When compared to existing approaches for implementing high-performance DSLs, Sham's design aims for both simplicity and programmer control. This makes it easier to port our techniques to other languages and frameworks, or borrow Sham's innovations "\`a la carte" without adopting the whole approach. Sham builds a sophisticated and powerful DSL construction toolkit atop fundamental language features including higher-order functions, data structures, and a foreign-function interface (FFI), all readily available in other languages. Furthermore, Sham's approach allows DSL developers to simply write functions, either using Sham or generating Sham, without needing to work through complex staging or partial evaluation systems.
主题: 程序设计语言 (cs.PL)
引用方式: arXiv:2005.09028 [cs.PL]
  (或者 arXiv:2005.09028v2 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2005.09028
期刊参考: The Art, Science, and Engineering of Programming, 2022, Vol. 6, Issue 1, Article 4
相关 DOI: https://doi.org/10.22152/programming-journal.org/2022/6/4

提交历史

来自:Rajan Walia
[v1] 2020年5月18日 星期一 18:49:58 UTC
[v2] 2021年7月15日 星期四 13:35:43 UTC
全文链接:

访问论文:

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

当前浏览上下文:

cs
< 上一篇   |   下一篇 >
最新 | 近期 | 2021-07
切换浏览方式为:
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

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