arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1507.07264cs.PL
收藏

一切旧的都是新的:引用的领域特定语言

Everything old is new again: Quoted Domain Specific Languages

Shayan Najd, Sam Lindley, Josef Svenningsson, Philip Wadler

摘要:

我们描述了一种新的方法,域特定语言(DSL),称为引用DSL(QDSL),复活了两个旧的想法:报价,从麦卡锡的Lisp的1960年,和子公式属性,从根森的自然演绎1935年。引用的术语允许DSL共享宿主语言的语法和类型系统。规范化引用项确保了子公式属性,这保证了可以在源中使用高阶类型,同时保证目标中的一阶类型,并允许使用类型来指导融合。我们通过将最初作为嵌入式DSL(EDSL)实现的Feldspar重新实现为QDSL来测试我们的想法;并且我们比较了QDSL和EDSL变体。

英文摘要:

We describe a new approach to domain specific languages (DSLs), called Quoted DSLs (QDSLs), that resurrects two old ideas: quotation, from McCarthy's Lisp of 1960, and the subformula property, from Gentzen's natural deduction of 1935. Quoted terms allow the DSL to share the syntax and type system of the host language. Normalising quoted terms ensures the subformula property, which guarantees that one can use higher-order types in the source while guaranteeing first-order types in the target, and enables using types to guide fusion. We test our ideas by re-implementing Feldspar, which was originally implemented as an Embedded DSL (EDSL), as a QDSL; and we compare the QDSL and EDSL variants.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑